diff --git a/DEPS b/DEPS
index d59d9e0b..dfce07b 100644
--- a/DEPS
+++ b/DEPS
@@ -91,7 +91,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ANGLE
   # and whatever else without interference from each other.
-  'angle_revision': 'b7d1458615aace9d846b97ac1e23bbc2dae53286',
+  'angle_revision': '888081d59aae6bb4b2322501d84bd645b8a8c6de',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build tools
   # and whatever else without interference from each other.
@@ -135,7 +135,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling catapult
   # and whatever else without interference from each other.
-  'catapult_revision': '414af52e127323fe6ee9aa80100ef64cc8c16d91',
+  'catapult_revision': '406b235a95c475c4bd67cf13f46603a5a2e027e8',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -148,6 +148,10 @@
   # the commit queue can handle CLs rolling libprotobuf-mutator
   # and whatever else without interference from each other.
   'libprotobuf-mutator': '3fc43a01d721ef1bacfefed170bc22abf1b8b051',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling feed
+  # and whatever else without interference from each other.
+  'feed_revision': '5ebe38905c1a1d09e39a22cfb8ae59531553b65a',
 }
 
 # Only these hosts are allowed for dependencies in this DEPS file.
@@ -355,6 +359,11 @@
       'condition': 'checkout_android',
   },
 
+  'src/third_party/feed/src': {
+      'url': Var('chromium_git') + '/feed' + '@' + Var('feed_revision'),
+      'condition': 'checkout_android',
+  },
+
   'src/third_party/ffmpeg':
     Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '9ca66eafaf6fbbde11862e1468b365220ca142fd',
 
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index b5f115db..58c3b95 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -2610,6 +2610,7 @@
   results.extend(_CheckNoDeprecatedJs(input_api, output_api))
   results.extend(_CheckParseErrors(input_api, output_api))
   results.extend(_CheckForIPCRules(input_api, output_api))
+  results.extend(_CheckForIncludeGuards(input_api, output_api))
   results.extend(_CheckForWindowsLineEndings(input_api, output_api))
   results.extend(_CheckSingletonInHeaders(input_api, output_api))
   results.extend(_CheckPydepsNeedsUpdating(input_api, output_api))
@@ -2811,6 +2812,116 @@
     return []
 
 
+def _CheckForIncludeGuards(input_api, output_api):
+  """Check that header files have proper guards against multiple inclusion.
+  If a file should not have such guards (and it probably should) then it
+  should include the string "no-include-guard-because-multiply-included".
+  """
+  def is_header_file(f):
+    return f.LocalPath().endswith('.h')
+
+  def replace_special_with_underscore(string):
+    return input_api.re.sub(r'[\\/.-]', '_', string)
+
+  errors = []
+
+  for f in input_api.AffectedSourceFiles(is_header_file):
+    guard_name = None
+    guard_line_number = None
+    seen_guard_end = False
+
+    file_with_path = input_api.os_path.normpath(f.LocalPath())
+    base_file_name = input_api.os_path.splitext(
+      input_api.os_path.basename(file_with_path))[0]
+    upper_base_file_name = base_file_name.upper()
+
+    expected_guard = replace_special_with_underscore(
+      file_with_path.upper() + '_')
+    expected_guard_if_blink = base_file_name + '_h'
+
+    # For "path/elem/file_name.h" we should really only accept
+    # PATH_ELEM_FILE_NAME_H_ per coding style or, if Blink,
+    # file_name_h.  Unfortunately there are too many (1000+) files
+    # with slight deviations from the coding style. Since the most
+    # important part is that the include guard is there, and that it's
+    # unique, not the name, this check is forgiving for existing files.
+    #
+    # As code becomes more uniform, this could be made stricter.
+
+    guard_name_pattern_list = [
+      # Anything with the right suffix (maybe with an extra _).
+      r'\w+_H__?',
+
+      # To cover include guards with Blink style.
+      r'\w+_h',
+
+      # Anything including the uppercase name of the file.
+      r'\w*' + input_api.re.escape(replace_special_with_underscore(
+        upper_base_file_name)) + r'\w*',
+    ]
+    guard_name_pattern = '|'.join(guard_name_pattern_list)
+    guard_pattern = input_api.re.compile(
+      r'#ifndef\s+(' + guard_name_pattern + ')')
+
+    for line_number, line in enumerate(f.NewContents()):
+      if 'no-include-guard-because-multiply-included' in line:
+        guard_name = 'DUMMY'  # To not trigger check outside the loop.
+        break
+
+      if guard_name is None:
+        match = guard_pattern.match(line)
+        if match:
+          guard_name = match.group(1)
+          guard_line_number = line_number
+
+          # We allow existing files to use slightly wrong include
+          # guards, but new files should get it right.
+          if not f.OldContents():
+            is_in_blink = file_with_path.startswith(input_api.os_path.join(
+              'third_party', 'WebKit'))
+            if not (guard_name == expected_guard or
+                    is_in_blink and guard_name == expected_guard_if_blink):
+              if is_in_blink:
+                expected_text = "%s or %s" % (expected_guard,
+                                              expected_guard_if_blink)
+              else:
+                expected_text = expected_guard
+              errors.append(output_api.PresubmitPromptWarning(
+                'Header using the wrong include guard name %s' % guard_name,
+                ['%s:%d' % (f.LocalPath(), line_number + 1)],
+                'Expected: %r\nGot: %r' % (guard_name, expected_text)))
+      else:
+        # The line after #ifndef should have a #define of the same name.
+        if line_number == guard_line_number + 1:
+          expected_line = '#define %s' % guard_name
+          if line != expected_line:
+            errors.append(output_api.PresubmitPromptWarning(
+              'Missing "%s" for include guard' % expected_line,
+              ['%s:%d' % (f.LocalPath(), line_number + 1)],
+              'Expected: %r\nGot: %r' % (expected_line, line)))
+
+        if not seen_guard_end and line == '#endif  // %s' % guard_name:
+          seen_guard_end = True
+        elif seen_guard_end:
+          if line.strip() != '':
+            errors.append(output_api.PresubmitPromptWarning(
+              'Include guard %s not covering the whole file' % (
+                guard_name), [f.LocalPath()]))
+            break  # Nothing else to check and enough to warn once.
+
+    if guard_name is None:
+      errors.append(output_api.PresubmitPromptWarning(
+        'Missing include guard %s' % expected_guard,
+        [f.LocalPath()],
+        'Missing include guard in %s\n'
+        'Recommended name: %s\n'
+        'This check can be disabled by having the string\n'
+        'no-include-guard-because-multiply-included in the header.' %
+        (f.LocalPath(), expected_guard)))
+
+  return errors
+
+
 def _CheckForWindowsLineEndings(input_api, output_api):
   """Check source code and known ascii text files for Windows style line
   endings.
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 4f33a1d..bcca909f 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -741,6 +741,152 @@
     self.assertTrue('File is stale' in str(results[0]))
     self.assertTrue('File is stale' in str(results[1]))
 
+class IncludeGuardTest(unittest.TestCase):
+  def testIncludeGuardChecks(self):
+    mock_input_api = MockInputApi()
+    mock_output_api = MockOutputApi()
+    mock_input_api.files = [
+        MockAffectedFile('content/browser/thing/foo.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_THING_FOO_H_',
+          '#define CONTENT_BROWSER_THING_FOO_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_THING_FOO_H_',
+        ]),
+        MockAffectedFile('content/browser/thing/bar.h', [
+          '#ifndef CONTENT_BROWSER_THING_BAR_H_',
+          '#define CONTENT_BROWSER_THING_BAR_H_',
+          'namespace content {',
+          '#endif  // CONTENT_BROWSER_THING_BAR_H_',
+          '}  // namespace content',
+        ]),
+        MockAffectedFile('content/browser/test1.h', [
+          'namespace content {',
+          '}  // namespace content',
+        ]),
+        MockAffectedFile('content\\browser\\win.h', [
+          '#ifndef CONTENT_BROWSER_WIN_H_',
+          '#define CONTENT_BROWSER_WIN_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_WIN_H_',
+        ]),
+        MockAffectedFile('content/browser/test2.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_TEST2_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_TEST2_H_',
+        ]),
+        MockAffectedFile('content/browser/internal.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_INTERNAL_H_',
+          '#define CONTENT_BROWSER_INTERNAL_H_',
+          '// Comment',
+          '#ifndef INTERNAL_CONTENT_BROWSER_INTERNAL_H_',
+          '#define INTERNAL_CONTENT_BROWSER_INTERNAL_H_',
+          'namespace internal {',
+          '}  // namespace internal',
+          '#endif  // INTERNAL_CONTENT_BROWSER_THING_BAR_H_',
+          'namespace content {',
+          '}  // namespace content',
+          '#endif  // CONTENT_BROWSER_THING_BAR_H_',
+        ]),
+        MockAffectedFile('content/browser/thing/foo.cc', [
+          '// This is a non-header.',
+        ]),
+        MockAffectedFile('content/browser/disabled.h', [
+          '// no-include-guard-because-multiply-included',
+          'struct McBoatFace;',
+        ]),
+        # New files don't allow misspelled include guards.
+        MockAffectedFile('content/browser/spleling.h', [
+          '#ifndef CONTENT_BROWSER_SPLLEING_H_',
+          '#define CONTENT_BROWSER_SPLLEING_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_SPLLEING_H_',
+        ]),
+        # Old files allow misspelled include guards (for now).
+        MockAffectedFile('chrome/old.h', [
+          '// New contents',
+          '#ifndef CHROME_ODL_H_',
+          '#define CHROME_ODL_H_',
+          '#endif  // CHROME_ODL_H_',
+        ], [
+          '// Old contents',
+          '#ifndef CHROME_ODL_H_',
+          '#define CHROME_ODL_H_',
+          '#endif  // CHROME_ODL_H_',
+        ]),
+        # Using a Blink style include guard outside Blink is wrong.
+        MockAffectedFile('content/NotInBlink.h', [
+          '#ifndef NotInBlink_h',
+          '#define NotInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // NotInBlink_h',
+        ]),
+        # Using a Blink style include guard in Blink is ok for now.
+        MockAffectedFile('third_party/WebKit/InBlink.h', [
+          '#ifndef InBlink_h',
+          '#define InBlink_h',
+          'struct McBoatFace;',
+          '#endif  // InBlink_h',
+        ]),
+        # Using a bad include guard in Blink is not ok.
+        MockAffectedFile('third_party/WebKit/AlsoInBlink.h', [
+          '#ifndef WrongInBlink_h',
+          '#define WrongInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // WrongInBlink_h',
+        ]),
+        # Using a bad include guard in Blink is accepted if it's an old file.
+        MockAffectedFile('third_party/WebKit/StillInBlink.h', [
+          '// New contents',
+          '#ifndef AcceptedInBlink_h',
+          '#define AcceptedInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // AcceptedInBlink_h',
+        ], [
+          '// Old contents',
+          '#ifndef AcceptedInBlink_h',
+          '#define AcceptedInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // AcceptedInBlink_h',
+        ]),
+      ]
+    msgs = PRESUBMIT._CheckForIncludeGuards(
+        mock_input_api, mock_output_api)
+    expected_fail_count = 6
+    self.assertEqual(expected_fail_count, len(msgs),
+                     'Expected %d items, found %d: %s'
+                     % (expected_fail_count, len(msgs), msgs))
+    self.assertEqual(msgs[0].items, [ 'content/browser/thing/bar.h' ])
+    self.assertEqual(msgs[0].message,
+                     'Include guard CONTENT_BROWSER_THING_BAR_H_ '
+                     'not covering the whole file')
+
+    self.assertEqual(msgs[1].items, [ 'content/browser/test1.h' ])
+    self.assertEqual(msgs[1].message,
+                     'Missing include guard CONTENT_BROWSER_TEST1_H_')
+
+    self.assertEqual(msgs[2].items, [ 'content/browser/test2.h:3' ])
+    self.assertEqual(msgs[2].message,
+                     'Missing "#define CONTENT_BROWSER_TEST2_H_" for '
+                     'include guard')
+
+    self.assertEqual(msgs[3].items, [ 'content/browser/spleling.h:1' ])
+    self.assertEqual(msgs[3].message,
+                     'Header using the wrong include guard name '
+                     'CONTENT_BROWSER_SPLLEING_H_')
+
+    self.assertEqual(msgs[4].items, [ 'content/NotInBlink.h:1' ])
+    self.assertEqual(msgs[4].message,
+                     'Header using the wrong include guard name '
+                     'NotInBlink_h')
+
+    self.assertEqual(msgs[5].items, [ 'third_party/WebKit/AlsoInBlink.h:1' ])
+    self.assertEqual(msgs[5].message,
+                     'Header using the wrong include guard name '
+                     'WrongInBlink_h')
+
 class AndroidDeprecatedTestAnnotationTest(unittest.TestCase):
   def testCheckAndroidTestAnnotationUsage(self):
     mock_input_api = MockInputApi()
diff --git a/android_webview/browser/cookie_manager.cc b/android_webview/browser/cookie_manager.cc
index e626c60..f03fc0bb 100644
--- a/android_webview/browser/cookie_manager.cc
+++ b/android_webview/browser/cookie_manager.cc
@@ -318,7 +318,7 @@
       cookie_store_created_ = true;
     }
 
-    cookie_store_ = content::CreateCookieStore(cookie_config, nullptr);
+    cookie_store_ = content::CreateCookieStore(cookie_config);
   }
 
   return cookie_store_.get();
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 06d3b942..e830c3a 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -99,6 +99,10 @@
     "cast_config_controller.h",
     "debug.cc",
     "debug.h",
+    "detachable_base/detachable_base_handler.cc",
+    "detachable_base/detachable_base_handler.h",
+    "detachable_base/detachable_base_observer.h",
+    "detachable_base/detachable_base_pairing_status.h",
     "disconnected_app_handler.cc",
     "disconnected_app_handler.h",
     "display/ash_display_controller.cc",
@@ -737,6 +741,13 @@
     "system/tray_tracing.h",
     "system/unified/collapse_button.cc",
     "system/unified/collapse_button.h",
+    "system/unified/feature_pod_button.cc",
+    "system/unified/feature_pod_button.h",
+    "system/unified/feature_pod_controller_base.h",
+    "system/unified/feature_pods_container_view.cc",
+    "system/unified/feature_pods_container_view.h",
+    "system/unified/quiet_mode_feature_pod_controller.cc",
+    "system/unified/quiet_mode_feature_pod_controller.h",
     "system/unified/top_shortcut_button.cc",
     "system/unified/top_shortcut_button.h",
     "system/unified/top_shortcuts_view.cc",
@@ -1394,6 +1405,7 @@
     "app_list/app_list_presenter_delegate_unittest.cc",
     "ash_touch_exploration_manager_chromeos_unittest.cc",
     "autoclick/autoclick_unittest.cc",
+    "detachable_base/detachable_base_handler_unittest.cc",
     "dip_unittest.cc",
     "display/cursor_window_controller_unittest.cc",
     "display/display_color_manager_chromeos_unittest.cc",
diff --git a/ash/detachable_base/DEPS b/ash/detachable_base/DEPS
new file mode 100644
index 0000000..cd425fe
--- /dev/null
+++ b/ash/detachable_base/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+  "+chromeos/dbus/fake_hammerd_client.h",
+  "+chromeos/dbus/hammerd_client.h"
+]
diff --git a/ash/detachable_base/OWNERS b/ash/detachable_base/OWNERS
new file mode 100644
index 0000000..d063efc
--- /dev/null
+++ b/ash/detachable_base/OWNERS
@@ -0,0 +1 @@
+tbarzic@chromium.org
diff --git a/ash/detachable_base/detachable_base_handler.cc b/ash/detachable_base/detachable_base_handler.cc
new file mode 100644
index 0000000..5d18390
--- /dev/null
+++ b/ash/detachable_base/detachable_base_handler.cc
@@ -0,0 +1,241 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/detachable_base/detachable_base_handler.h"
+
+#include "ash/detachable_base/detachable_base_observer.h"
+#include "ash/public/cpp/ash_pref_names.h"
+#include "ash/shell.h"
+#include "base/bind.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/values.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/scoped_user_pref_update.h"
+#include "components/signin/core/account_id/account_id.h"
+
+namespace ash {
+
+namespace {
+
+// Keys in local state used to persist detachable base pairing state.
+// Example detachable base pref value:
+// {
+//   ash.detachable_base.devices: {
+//     user_key_1: {
+//       last_used: hex encoded base device ID
+//     },
+//     user_key_2: {
+//        // no detachable_base device info, e.g. the user has not ever used it
+//     }
+//   }
+// }
+constexpr char kLastUsedByUserPrefKey[] = "last_used";
+
+std::string GetKeyForPrefs(const AccountId& account_id) {
+  if (account_id.HasAccountIdKey())
+    return account_id.GetAccountIdKey();
+  return account_id.GetUserEmail();
+}
+
+}  // namespace
+
+// static
+void DetachableBaseHandler::RegisterPrefs(PrefRegistrySimple* registry) {
+  registry->RegisterDictionaryPref(prefs::kDetachableBaseDevices);
+}
+
+DetachableBaseHandler::DetachableBaseHandler(Shell* shell)
+    : shell_(shell),
+      hammerd_observer_(this),
+      power_manager_observer_(this),
+      weak_ptr_factory_(this) {
+  if (shell_)
+    shell_->AddShellObserver(this);
+
+  // TODO(tbarzic): Currently, the base paired state and firmware update state
+  // are lost on the session shutdown. This should be fixed.
+  // https://crbug.com/818057
+  hammerd_observer_.Add(chromeos::DBusThreadManager::Get()->GetHammerdClient());
+  chromeos::PowerManagerClient* power_manager_client =
+      chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
+  power_manager_observer_.Add(power_manager_client);
+
+  power_manager_client->GetSwitchStates(
+      base::BindOnce(&DetachableBaseHandler::OnGotPowerManagerSwitchStates,
+                     weak_ptr_factory_.GetWeakPtr()));
+}
+
+DetachableBaseHandler::~DetachableBaseHandler() {
+  if (shell_)
+    shell_->RemoveShellObserver(this);
+}
+
+void DetachableBaseHandler::AddObserver(DetachableBaseObserver* observer) {
+  observers_.AddObserver(observer);
+}
+
+void DetachableBaseHandler::RemoveObserver(DetachableBaseObserver* observer) {
+  observers_.RemoveObserver(observer);
+}
+
+void DetachableBaseHandler::RemoveUserData(const mojom::UserInfo& user) {
+  last_used_devices_.erase(user.account_id);
+
+  if (local_state_) {
+    DictionaryPrefUpdate update(local_state_, prefs::kDetachableBaseDevices);
+    update->RemoveKey(GetKeyForPrefs(user.account_id));
+  }
+}
+
+DetachableBasePairingStatus DetachableBaseHandler::GetPairingStatus() const {
+  if (!tablet_mode_.has_value() ||
+      *tablet_mode_ == chromeos::PowerManagerClient::TabletMode::ON) {
+    return DetachableBasePairingStatus::kNone;
+  }
+
+  return pairing_status_;
+}
+
+bool DetachableBaseHandler::PairedBaseMatchesLastUsedByUser(
+    const mojom::UserInfo& user) const {
+  if (GetPairingStatus() != DetachableBasePairingStatus::kAuthenticated)
+    return false;
+
+  DCHECK(!authenticated_base_id_.empty());
+
+  // If local state is not set for non-ephemeral users, the last used detachable
+  // base cannot be determined at this point.
+  // Assume no device has previously been used - the state will be evaluated
+  // again when the local state prefs get initialzized.
+  if (!local_state_ && !user.is_ephemeral)
+    return true;
+
+  DetachableBaseId last_used_base = GetLastUsedDeviceForUser(user);
+  return last_used_base.empty() || authenticated_base_id_ == last_used_base;
+}
+
+bool DetachableBaseHandler::SetPairedBaseAsLastUsedByUser(
+    const mojom::UserInfo& user) {
+  if (GetPairingStatus() != DetachableBasePairingStatus::kAuthenticated)
+    return false;
+
+  // Do not update the last paired device for non-ephemeral users if local state
+  // is not set, as the value would not be correctly preserved. Note that the
+  // observers will be notified about the pairing status change when the local
+  // state gets initialized - they should attempt to set this value at that
+  // point.
+  if (!local_state_ && !user.is_ephemeral)
+    return false;
+
+  last_used_devices_[user.account_id] = authenticated_base_id_;
+
+  if (!user.is_ephemeral) {
+    DictionaryPrefUpdate update(local_state_, prefs::kDetachableBaseDevices);
+    update->SetPath({GetKeyForPrefs(user.account_id), kLastUsedByUserPrefKey},
+                    base::Value(authenticated_base_id_));
+  }
+
+  return true;
+}
+
+void DetachableBaseHandler::OnLocalStatePrefServiceInitialized(
+    PrefService* pref_service) {
+  local_state_ = pref_service;
+
+  if (GetPairingStatus() != DetachableBasePairingStatus::kNone)
+    NotifyPairingStatusChanged();
+}
+
+void DetachableBaseHandler::BaseFirmwareUpdateNeeded() {}
+
+void DetachableBaseHandler::BaseFirmwareUpdateStarted() {}
+
+void DetachableBaseHandler::BaseFirmwareUpdateSucceeded() {}
+
+void DetachableBaseHandler::BaseFirmwareUpdateFailed() {}
+
+void DetachableBaseHandler::PairChallengeSucceeded(
+    const std::vector<uint8_t>& base_id) {
+  authenticated_base_id_ = base::HexEncode(base_id.data(), base_id.size());
+  pairing_status_ = DetachableBasePairingStatus::kAuthenticated;
+
+  if (GetPairingStatus() != DetachableBasePairingStatus::kNone)
+    NotifyPairingStatusChanged();
+}
+
+void DetachableBaseHandler::PairChallengeFailed() {
+  authenticated_base_id_.clear();
+  pairing_status_ = DetachableBasePairingStatus::kNotAuthenticated;
+
+  if (GetPairingStatus() != DetachableBasePairingStatus::kNone)
+    NotifyPairingStatusChanged();
+}
+
+void DetachableBaseHandler::InvalidBaseConnected() {
+  authenticated_base_id_.clear();
+  pairing_status_ = DetachableBasePairingStatus::kInvalidDevice;
+
+  if (GetPairingStatus() != DetachableBasePairingStatus::kNone)
+    NotifyPairingStatusChanged();
+}
+
+void DetachableBaseHandler::TabletModeEventReceived(
+    chromeos::PowerManagerClient::TabletMode mode,
+    const base::TimeTicks& timestamp) {
+  UpdateTabletMode(mode);
+}
+
+void DetachableBaseHandler::OnGotPowerManagerSwitchStates(
+    base::Optional<chromeos::PowerManagerClient::SwitchStates> switch_states) {
+  if (!switch_states.has_value() || tablet_mode_.has_value())
+    return;
+
+  UpdateTabletMode(switch_states->tablet_mode);
+}
+
+void DetachableBaseHandler::UpdateTabletMode(
+    chromeos::PowerManagerClient::TabletMode mode) {
+  DetachableBasePairingStatus old_pairing_status = GetPairingStatus();
+  tablet_mode_ = mode;
+
+  if (*tablet_mode_ == chromeos::PowerManagerClient::TabletMode::ON) {
+    authenticated_base_id_.clear();
+    pairing_status_ = DetachableBasePairingStatus::kNone;
+  }
+
+  if (GetPairingStatus() != old_pairing_status)
+    NotifyPairingStatusChanged();
+}
+
+DetachableBaseHandler::DetachableBaseId
+DetachableBaseHandler::GetLastUsedDeviceForUser(
+    const mojom::UserInfo& user) const {
+  const auto it = last_used_devices_.find(user.account_id);
+  // If the last used device was set within this session, bypass local state.
+  if (it != last_used_devices_.end())
+    return it->second;
+
+  // For ephemeral lookup do not attempt getting the value from local state;
+  // return empty string instead.
+  if (user.is_ephemeral)
+    return "";
+
+  const base::DictionaryValue* detachable_base_info =
+      local_state_->GetDictionary(prefs::kDetachableBaseDevices);
+  const base::Value* last_used = detachable_base_info->FindPathOfType(
+      {GetKeyForPrefs(user.account_id), kLastUsedByUserPrefKey},
+      base::Value::Type::STRING);
+  if (!last_used)
+    return "";
+  return last_used->GetString();
+}
+
+void DetachableBaseHandler::NotifyPairingStatusChanged() {
+  for (auto& observer : observers_)
+    observer.OnDetachableBasePairingStatusChanged(GetPairingStatus());
+}
+
+}  // namespace ash
diff --git a/ash/detachable_base/detachable_base_handler.h b/ash/detachable_base/detachable_base_handler.h
new file mode 100644
index 0000000..185f4b9
--- /dev/null
+++ b/ash/detachable_base/detachable_base_handler.h
@@ -0,0 +1,163 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_DETACHABLE_BASE_DETACHABLE_BASE_HANDLER_H_
+#define ASH_DETACHABLE_BASE_DETACHABLE_BASE_HANDLER_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "ash/ash_export.h"
+#include "ash/detachable_base/detachable_base_pairing_status.h"
+#include "ash/public/interfaces/user_info.mojom.h"
+#include "ash/shell_observer.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
+#include "base/optional.h"
+#include "base/scoped_observer.h"
+#include "chromeos/dbus/hammerd_client.h"
+#include "chromeos/dbus/power_manager_client.h"
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace ash {
+
+class DetachableBaseObserver;
+class Shell;
+
+// Keeps track of the state of Chrome OS device's detachable base. It tracks
+// whether:
+//   * a detachable base is paired, and authenticated
+//       * Detachable base is considered paired when hammerd connects Chrome OS
+//         with the base
+//       * During pairing, hammerd will issue a challenge to the detachable base
+//         to verify its identity. The base is authenticated if the challenge
+//         succeeds. If the pairing challenge fails, the base might still work,
+//         but it will not be identifiable.
+//   * the paired base requires a firmware update
+// This information is used to detect when a detachable base related
+// notification should be shown to the user.
+// Note that this does not track active/existing users, but it provides methods
+// to set and retrive per user state to and from local state - the
+// DetachableBaseHandler clients are expected to determine for which users the
+// detachable base state should be set or retrieved.
+class ASH_EXPORT DetachableBaseHandler
+    : public ShellObserver,
+      public chromeos::HammerdClient::Observer,
+      public chromeos::PowerManagerClient::Observer {
+ public:
+  // |shell| - the ash shell that owns the DetachableBaseHandler. May be null in
+  // tests.
+  explicit DetachableBaseHandler(ash::Shell* shell);
+  ~DetachableBaseHandler() override;
+
+  // Registers the local state prefs for detachable base devices.
+  static void RegisterPrefs(PrefRegistrySimple* registry);
+
+  void AddObserver(DetachableBaseObserver* observer);
+  void RemoveObserver(DetachableBaseObserver* observer);
+
+  // Removes the detachable base data associated with a user from local state.
+  void RemoveUserData(const mojom::UserInfo& user);
+
+  // Gets the detachable base pairing state.
+  DetachableBasePairingStatus GetPairingStatus() const;
+
+  // Whether the paired base matches the last base used by the user.
+  // Returns true only if the base has kAuthenticated pairing state.
+  // If this the user has not previously used any detachable bases (i.e. the
+  // last used detachable base is empty), this will return true.
+  bool PairedBaseMatchesLastUsedByUser(const mojom::UserInfo& user) const;
+
+  // Sets the currently paired base as the last used base for the user.
+  // If the user is not ephemeral, the last used base information will be
+  // persisted in the local state.
+  // No-op if a detachable base is not currently paired and authenticated.
+  // Returns whether the base state was successfully updated.
+  //
+  // Note that this will fail for non-ephemeral users if |local_state_| is not
+  // yet initialized. Observers will be notified that pairing status
+  // changed when local state is initialized (provided a base is still
+  // paired) - setting the last used base can be retried at that point.
+  bool SetPairedBaseAsLastUsedByUser(const mojom::UserInfo& user);
+
+  // ShellObserver:
+  void OnLocalStatePrefServiceInitialized(PrefService* pref_service) override;
+
+  // chromeos::HammerdClient::Observer:
+  void BaseFirmwareUpdateNeeded() override;
+  void BaseFirmwareUpdateStarted() override;
+  void BaseFirmwareUpdateSucceeded() override;
+  void BaseFirmwareUpdateFailed() override;
+  void PairChallengeSucceeded(const std::vector<uint8_t>& base_id) override;
+  void PairChallengeFailed() override;
+  void InvalidBaseConnected() override;
+
+  // chromeos::PowerManagerClient::Observer:
+  void TabletModeEventReceived(chromeos::PowerManagerClient::TabletMode mode,
+                               const base::TimeTicks& timestamp) override;
+
+ private:
+  // Identifier for a detachable base device - HEX encoded string created from
+  // data passed to PairChallengeSucceeded. It's known only if the base was
+  // successfully authenticated.
+  using DetachableBaseId = std::string;
+
+  // Callback for getting initial power manager switches - used to determine
+  // whether the tablet mode is on when the DetachableBaseHandler is created.
+  void OnGotPowerManagerSwitchStates(
+      base::Optional<chromeos::PowerManagerClient::SwitchStates> switch_states);
+
+  // Updates the tracked tablet mode state, and notifies observers about pairing
+  // status change if required.
+  void UpdateTabletMode(chromeos::PowerManagerClient::TabletMode mode);
+
+  // Retrieves the last known base used by a user. Returns an empty string if
+  // a detachable base usage was not previously recorded for the user.
+  DetachableBaseId GetLastUsedDeviceForUser(const mojom::UserInfo& user) const;
+
+  // Notifies observers that the detachable base pairing state has changed.
+  void NotifyPairingStatusChanged();
+
+  PrefService* local_state_ = nullptr;
+
+  // The shell that owns |this| - used to listen for local state initialization.
+  ash::Shell* shell_;
+
+  // Tablet mode state currently reported by power manager - tablet mode getting
+  // turned on is used as a signal that the base is detached.
+  base::Optional<chromeos::PowerManagerClient::TabletMode> tablet_mode_;
+
+  // The HEX encoded ID of the authenticated paired base device. This will
+  // be non empty iff pairing_status_ is kAuthenticated.
+  DetachableBaseId authenticated_base_id_;
+
+  // The paired base device pairing status.
+  DetachableBasePairingStatus pairing_status_ =
+      DetachableBasePairingStatus::kNone;
+
+  ScopedObserver<chromeos::HammerdClient, chromeos::HammerdClient::Observer>
+      hammerd_observer_;
+  ScopedObserver<chromeos::PowerManagerClient,
+                 chromeos::PowerManagerClient::Observer>
+      power_manager_observer_;
+
+  // In-memory map from a user account ID to last used device set for user using
+  // SetPairedBaseAsLastUsedByUser().
+  // Used for ephemeral users.
+  std::map<AccountId, DetachableBaseId> last_used_devices_;
+
+  base::ObserverList<DetachableBaseObserver> observers_;
+
+  base::WeakPtrFactory<DetachableBaseHandler> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(DetachableBaseHandler);
+};
+
+}  // namespace ash
+
+#endif  // ASH_DETACHABLE_BASE_DETACHABLE_BASE_HANDLER_H_
diff --git a/ash/detachable_base/detachable_base_handler_unittest.cc b/ash/detachable_base/detachable_base_handler_unittest.cc
new file mode 100644
index 0000000..bc07317
--- /dev/null
+++ b/ash/detachable_base/detachable_base_handler_unittest.cc
@@ -0,0 +1,623 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/detachable_base/detachable_base_handler.h"
+
+#include <memory>
+#include <utility>
+
+#include "ash/detachable_base/detachable_base_observer.h"
+#include "ash/detachable_base/detachable_base_pairing_status.h"
+#include "ash/public/interfaces/user_info.mojom.h"
+#include "base/macros.h"
+#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
+#include "base/time/time.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/fake_hammerd_client.h"
+#include "chromeos/dbus/fake_power_manager_client.h"
+#include "components/prefs/testing_pref_service.h"
+#include "components/signin/core/account_id/account_id.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using ash::DetachableBasePairingStatus;
+
+namespace {
+
+enum class UserType {
+  kNormal,
+  kEphemeral,
+};
+
+ash::mojom::UserInfoPtr CreateUser(const std::string& email,
+                                   const std::string& gaia_id,
+                                   UserType user_type) {
+  ash::mojom::UserInfoPtr user = ash::mojom::UserInfo::New();
+  user->account_id = AccountId::FromUserEmailGaiaId(email, gaia_id);
+  user->is_ephemeral = user_type == UserType::kEphemeral;
+  return user;
+}
+
+class TestBaseObserver : public ash::DetachableBaseObserver {
+ public:
+  TestBaseObserver() = default;
+  ~TestBaseObserver() override = default;
+
+  int pairing_status_changed_count() { return pairing_status_changed_count_; }
+
+  void reset_pairing_status_changed_count() {
+    pairing_status_changed_count_ = 0;
+  }
+
+  // ash::DetachableBaseObserver:
+  void OnDetachableBasePairingStatusChanged(
+      DetachableBasePairingStatus status) override {
+    pairing_status_changed_count_++;
+  }
+
+ private:
+  base::test::ScopedTaskEnvironment task_environment_;
+
+  int pairing_status_changed_count_ = 0;
+
+  DISALLOW_COPY_AND_ASSIGN(TestBaseObserver);
+};
+
+}  // namespace
+
+class DetachableBaseHandlerTest : public testing::Test {
+ public:
+  DetachableBaseHandlerTest() = default;
+  ~DetachableBaseHandlerTest() override = default;
+
+  // testing::Test:
+  void SetUp() override {
+    std::unique_ptr<chromeos::DBusThreadManagerSetter> dbus_setter =
+        chromeos::DBusThreadManager::GetSetterForTesting();
+
+    auto hammerd_client = std::make_unique<chromeos::FakeHammerdClient>();
+    hammerd_client_ = hammerd_client.get();
+    dbus_setter->SetHammerdClient(std::move(hammerd_client));
+
+    auto power_manager_client =
+        std::make_unique<chromeos::FakePowerManagerClient>();
+    power_manager_client->SetTabletMode(
+        chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+    power_manager_client_ = power_manager_client.get();
+    dbus_setter->SetPowerManagerClient(std::move(power_manager_client));
+
+    default_user_ = CreateUser("user_1@foo.bar", "111111", UserType::kNormal);
+
+    ash::DetachableBaseHandler::RegisterPrefs(local_state_.registry());
+    handler_ = std::make_unique<ash::DetachableBaseHandler>(nullptr);
+    handler_->OnLocalStatePrefServiceInitialized(&local_state_);
+    handler_->AddObserver(&detachable_base_observer_);
+  }
+  void TearDown() override {
+    handler_->RemoveObserver(&detachable_base_observer_);
+    handler_.reset();
+    hammerd_client_ = nullptr;
+    power_manager_client_ = nullptr;
+    chromeos::DBusThreadManager::Shutdown();
+  }
+
+ protected:
+  // Simulates system events associated with the detachable base being switched.
+  void ChangePairedBase(const std::vector<uint8_t>& base_id) {
+    power_manager_client_->SetTabletMode(
+        chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+    power_manager_client_->SetTabletMode(
+        chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+    detachable_base_observer_.reset_pairing_status_changed_count();
+
+    hammerd_client_->FirePairChallengeSucceededSignal(base_id);
+  }
+
+  void RestartHandler() {
+    handler_->RemoveObserver(&detachable_base_observer_);
+    handler_ = std::make_unique<ash::DetachableBaseHandler>(nullptr);
+    handler_->OnLocalStatePrefServiceInitialized(&local_state_);
+    handler_->AddObserver(&detachable_base_observer_);
+  }
+
+  void ResetHandlerWithNoLocalState() {
+    handler_->RemoveObserver(&detachable_base_observer_);
+    handler_ = std::make_unique<ash::DetachableBaseHandler>(nullptr);
+    handler_->AddObserver(&detachable_base_observer_);
+  }
+
+  void SimulateLocalStateInitialized() {
+    handler_->OnLocalStatePrefServiceInitialized(&local_state_);
+  }
+
+  // Owned by DBusThreadManager:
+  chromeos::FakeHammerdClient* hammerd_client_ = nullptr;
+  chromeos::FakePowerManagerClient* power_manager_client_ = nullptr;
+
+  TestBaseObserver detachable_base_observer_;
+
+  std::unique_ptr<ash::DetachableBaseHandler> handler_;
+
+  ash::mojom::UserInfoPtr default_user_;
+
+ private:
+  TestingPrefServiceSimple local_state_;
+
+  DISALLOW_COPY_AND_ASSIGN(DetachableBaseHandlerTest);
+};
+
+TEST_F(DetachableBaseHandlerTest, NoDetachableBase) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+}
+
+TEST_F(DetachableBaseHandlerTest, TabletModeOnOnStartup) {
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  RestartHandler();
+
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+}
+
+TEST_F(DetachableBaseHandlerTest, SuccessfullPairing) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  // The user should not be notified when they attach a base for the first time,
+  // so the first paired base should be reported as kAuthenticated rather than
+  // kAuthenticatedNotMatchingLastUsed.
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Assume the base has been detached when the device switches to tablet mode.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // When the device exits tablet mode again, the base should not be reported
+  // as paired until it's finished pairing.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, DetachableBasePairingFailure) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  hammerd_client_->FirePairChallengeFailedSignal();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNotAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Assume the base has been detached when the device switches to tablet mode.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, InvalidDetachableBase) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  hammerd_client_->FireInvalidBaseConnectedSignal();
+
+  EXPECT_EQ(DetachableBasePairingStatus::kInvalidDevice,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Assume the base has been detached when the device switches to tablet mode.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, PairingSuccessDuringInit) {
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+
+  // DetachableBaseHandler updates base pairing state only after it confirms the
+  // device is not in tablet mode.
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  // Run loop so the callback for getting the initial power manager state gets
+  // run.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, PairingFailDuringInit) {
+  hammerd_client_->FirePairChallengeFailedSignal();
+
+  // DetachableBaseHandler updates base pairing state only after it confirms the
+  // device is not in tablet mode.
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  // Run loop so the callback for getting the initial power manager state gets
+  // run.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNotAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, InvalidDeviceDuringInit) {
+  hammerd_client_->FireInvalidBaseConnectedSignal();
+
+  // DetachableBaseHandler updates base pairing state only after it confirms the
+  // device is not in tablet mode.
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  // Run loop so the callback for getting the initial power manager state gets
+  // run.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kInvalidDevice,
+            handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, TabletModeTurnedOnDuringHandlerInit) {
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+
+  // Run loop so the callback for getting the initial power manager state gets
+  // run.
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+}
+
+TEST_F(DetachableBaseHandlerTest, DetachableBaseChangeDetection) {
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+  // Run loop so the callback for getting the initial power manager state gets
+  // run.
+  base::RunLoop().RunUntilIdle();
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Set the current base as last used by the user.
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+
+  // Simulate the paired base change.
+  ChangePairedBase({0x04, 0x05, 0x06, 0x07});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Switch back to last used base.
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // The last used base should be preserved if the detachable base handler is
+  // restarted after the last used base was set.
+  RestartHandler();
+  base::RunLoop().RunUntilIdle();
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x04, 0x05, 0x06, 0x07});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, MultiUser) {
+  // Assume the user_1 has a last used base.
+  base::RunLoop().RunUntilIdle();
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Restart the handler, so it's initialized with the previously set up prefs
+  // state.
+  RestartHandler();
+  base::RunLoop().RunUntilIdle();
+
+  const ash::mojom::UserInfoPtr second_user =
+      CreateUser("user_2@foo.bar", "222222", UserType::kNormal);
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNone, handler_->GetPairingStatus());
+  EXPECT_EQ(0, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+
+  // Pair a detachable base different than the one used by user_1.
+  hammerd_client_->FirePairChallengeSucceededSignal({0x04, 0x05, 0x06, 0x07});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  // The base for user_1 has changed.
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  // User 2 has not used a detachable base yet - the base should be reported as
+  // matching last used base.
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Set the last used detachable base for user 2, and pair the initial base.
+  handler_->SetPairedBaseAsLastUsedByUser(*second_user);
+
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  // This time, the second user should be notified the base has been changed.
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Set the base for user 2 to the current one.
+  handler_->SetPairedBaseAsLastUsedByUser(*second_user);
+
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+
+  // When the base is paired next time, it should be considered authenticated
+  // for both users.
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, SwitchToNonAuthenticatedBase) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Switch to non-trusted base, and verify it's reported as such regardless
+  // of whether the user had previously used a detachable base.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  hammerd_client_->FirePairChallengeFailedSignal();
+
+  const ash::mojom::UserInfoPtr second_user =
+      CreateUser("user_2@foo.bar", "222222", UserType::kNormal);
+
+  EXPECT_EQ(DetachableBasePairingStatus::kNotAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, SwitchToInvalidBase) {
+  // Run loop so the handler picks up initial power manager state.
+  base::RunLoop().RunUntilIdle();
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Switch to an invalid base, and verify it's reported as such regardless
+  // of whether the user had previously used a base.
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::ON, base::TimeTicks());
+  power_manager_client_->SetTabletMode(
+      chromeos::PowerManagerClient::TabletMode::OFF, base::TimeTicks());
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  hammerd_client_->FireInvalidBaseConnectedSignal();
+
+  const ash::mojom::UserInfoPtr second_user =
+      CreateUser("user_2@foo.bar", "222222", UserType::kNormal);
+
+  EXPECT_EQ(DetachableBasePairingStatus::kInvalidDevice,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, RemoveUserData) {
+  const ash::mojom::UserInfoPtr second_user =
+      CreateUser("user_2@foo.bar", "222222", UserType::kNormal);
+
+  // Assume the user_1 has a last used base.
+  base::RunLoop().RunUntilIdle();
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+  handler_->SetPairedBaseAsLastUsedByUser(*second_user);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  ChangePairedBase({0x04, 0x05, 0x06});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Remove the data for user_2, and verify that the paired base is reported
+  // as authenticated when the paired base changes again.
+  handler_->RemoveUserData(*second_user);
+  ChangePairedBase({0x07, 0x08, 0x09});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Verify that paired base will be properly set again for the previously
+  // removed user.
+  handler_->SetPairedBaseAsLastUsedByUser(*second_user);
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*second_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, NoLocalState) {
+  base::RunLoop().RunUntilIdle();
+
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*default_user_);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  ResetHandlerWithNoLocalState();
+  base::RunLoop().RunUntilIdle();
+
+  ChangePairedBase({0x04, 0x05, 0x06});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  detachable_base_observer_.reset_pairing_status_changed_count();
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  SimulateLocalStateInitialized();
+
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  detachable_base_observer_.reset_pairing_status_changed_count();
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  detachable_base_observer_.reset_pairing_status_changed_count();
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*default_user_));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
+
+TEST_F(DetachableBaseHandlerTest, EphemeralUser) {
+  base::RunLoop().RunUntilIdle();
+
+  const ash::mojom::UserInfoPtr ephemeral_user =
+      CreateUser("user_3@foo.bar", "333333", UserType::kEphemeral);
+  hammerd_client_->FirePairChallengeSucceededSignal({0x01, 0x02, 0x03, 0x04});
+  handler_->SetPairedBaseAsLastUsedByUser(*ephemeral_user);
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  ChangePairedBase({0x04, 0x05, 0x06});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_FALSE(handler_->PairedBaseMatchesLastUsedByUser(*ephemeral_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  ChangePairedBase({0x01, 0x02, 0x03, 0x04});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*ephemeral_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+
+  // Verify that the information about the last used base gets lost if the
+  // detachable base handler is reset (given that the info was saved for an
+  // ephemeral user).
+  RestartHandler();
+  base::RunLoop().RunUntilIdle();
+  hammerd_client_->FirePairChallengeSucceededSignal({0x04, 0x05, 0x06, 0x07});
+
+  EXPECT_EQ(DetachableBasePairingStatus::kAuthenticated,
+            handler_->GetPairingStatus());
+  EXPECT_EQ(1, detachable_base_observer_.pairing_status_changed_count());
+  EXPECT_TRUE(handler_->PairedBaseMatchesLastUsedByUser(*ephemeral_user));
+  detachable_base_observer_.reset_pairing_status_changed_count();
+}
diff --git a/ash/detachable_base/detachable_base_observer.h b/ash/detachable_base/detachable_base_observer.h
new file mode 100644
index 0000000..8a33968
--- /dev/null
+++ b/ash/detachable_base/detachable_base_observer.h
@@ -0,0 +1,27 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_DETACHABLE_BASE_DETACHABLE_BASE_OBSERVER_H_
+#define ASH_DETACHABLE_BASE_DETACHABLE_BASE_OBSERVER_H_
+
+#include "ash/ash_export.h"
+#include "ash/detachable_base/detachable_base_pairing_status.h"
+
+namespace ash {
+
+// Registered with DetachableBaseHandler to observe the detachable base status.
+class ASH_EXPORT DetachableBaseObserver {
+ public:
+  virtual ~DetachableBaseObserver() = default;
+
+  // Called when the detachable base pairing status changes. For example when a
+  // new detachable base is paired, or when the current detachable base gets
+  // detached.
+  virtual void OnDetachableBasePairingStatusChanged(
+      DetachableBasePairingStatus status) = 0;
+};
+
+}  // namespace ash
+
+#endif  // ASH_DETACHABLE_BASE_DETACHABLE_BASE_OBSERVER_H_
diff --git a/ash/detachable_base/detachable_base_pairing_status.h b/ash/detachable_base/detachable_base_pairing_status.h
new file mode 100644
index 0000000..7536482d
--- /dev/null
+++ b/ash/detachable_base/detachable_base_pairing_status.h
@@ -0,0 +1,31 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_DETACHABLE_BASE_DETACHABLE_BASE_PAIRING_STATUS_H_
+#define ASH_DETACHABLE_BASE_DETACHABLE_BASE_PAIRING_STATUS_H_
+
+#include "ash/ash_export.h"
+
+namespace ash {
+
+// Enum describing current detachable base device pairing status.
+enum class ASH_EXPORT DetachableBasePairingStatus {
+  // A detachable base is not currently paired.
+  kNone,
+
+  // A detachable base is paired, and successfully authenticated.
+  kAuthenticated,
+
+  // A detachable base is paired, but it was not successfully authenticated.
+  kNotAuthenticated,
+
+  // A detachable base is paired, but it was not verified to be a valid base -
+  // e.g. unlike bases in kNotAuthenticated state, the paired device might not
+  // support authentication at all.
+  kInvalidDevice,
+};
+
+}  // namespace ash
+
+#endif  // ASH_DETACHABLE_BASE_DETACHABLE_BASE_PAIRING_STATUS_H_
diff --git a/ash/public/cpp/ash_features.cc b/ash/public/cpp/ash_features.cc
index 6efb78f..0d464aa 100644
--- a/ash/public/cpp/ash_features.cc
+++ b/ash/public/cpp/ash_features.cc
@@ -10,6 +10,9 @@
 const base::Feature kDockedMagnifier{"DockedMagnifier",
                                      base::FEATURE_ENABLED_BY_DEFAULT};
 
+const base::Feature kKeyboardShortcutViewer{"KeyboardShortcutViewer",
+                                            base::FEATURE_ENABLED_BY_DEFAULT};
+
 const base::Feature kSystemTrayUnified{"SystemTrayUnified",
                                        base::FEATURE_DISABLED_BY_DEFAULT};
 
@@ -17,6 +20,10 @@
   return base::FeatureList::IsEnabled(kDockedMagnifier);
 }
 
+bool IsKeyboardShortcutViewerEnabled() {
+  return base::FeatureList::IsEnabled(kKeyboardShortcutViewer);
+}
+
 bool IsSystemTrayUnifiedEnabled() {
   return base::FeatureList::IsEnabled(kSystemTrayUnified);
 }
diff --git a/ash/public/cpp/ash_features.h b/ash/public/cpp/ash_features.h
index c0159cfe..67a905a 100644
--- a/ash/public/cpp/ash_features.h
+++ b/ash/public/cpp/ash_features.h
@@ -16,11 +16,18 @@
 // https://crbug.com/709824.
 ASH_PUBLIC_EXPORT extern const base::Feature kDockedMagnifier;
 
+// Enables the keyboard shortcut viewer.
+// TODO(wutao): Remove this after the feature is fully launched.
+// https://crbug.com/755448.
+ASH_PUBLIC_EXPORT extern const base::Feature kKeyboardShortcutViewer;
+
 // Enables new system menu.
 ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayUnified;
 
 ASH_PUBLIC_EXPORT bool IsDockedMagnifierEnabled();
 
+ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerEnabled();
+
 ASH_PUBLIC_EXPORT bool IsSystemTrayUnifiedEnabled();
 
 }  // namespace features
diff --git a/ash/public/cpp/ash_pref_names.cc b/ash/public/cpp/ash_pref_names.cc
index 642116c..5a596e0 100644
--- a/ash/public/cpp/ash_pref_names.cc
+++ b/ash/public/cpp/ash_pref_names.cc
@@ -160,6 +160,10 @@
 // String pref storing the salt for the pin quick unlock mechanism.
 const char kQuickUnlockPinSalt[] = "quick_unlock.pin.salt";
 
+// Dictionary prefs in local state that keeps information about detachable
+// bases - for exmaple the last used base per user.
+const char kDetachableBaseDevices[] = "ash.detachable_base.devices";
+
 // NOTE: New prefs should start with the "ash." prefix. Existing prefs moved
 // into this file should not be renamed, since they may be synced.
 
diff --git a/ash/public/cpp/ash_pref_names.h b/ash/public/cpp/ash_pref_names.h
index d239579..f2997cbb 100644
--- a/ash/public/cpp/ash_pref_names.h
+++ b/ash/public/cpp/ash_pref_names.h
@@ -64,6 +64,8 @@
 
 ASH_PUBLIC_EXPORT extern const char kQuickUnlockPinSalt[];
 
+ASH_PUBLIC_EXPORT extern const char kDetachableBaseDevices[];
+
 }  // namespace prefs
 
 }  // namespace ash
diff --git a/ash/public/cpp/ash_switches.cc b/ash/public/cpp/ash_switches.cc
index e730eff..46cab86 100644
--- a/ash/public/cpp/ash_switches.cc
+++ b/ash/public/cpp/ash_switches.cc
@@ -52,11 +52,6 @@
 const char kAshEnableDisplayMoveWindowAccels[] =
     "ash-enable-display-move-window-accels";
 
-// Enables keyboard shortcut viewer.
-// TODO(wutao): Remove this once the feature is launched. crbug.com/768932.
-const char kAshEnableKeyboardShortcutViewer[] =
-    "ash-enable-keyboard-shortcut-viewer";
-
 // Enables key bindings to scroll magnified screen.
 const char kAshEnableMagnifierKeyScroller[] =
     "ash-enable-magnifier-key-scroller";
diff --git a/ash/public/cpp/ash_switches.h b/ash/public/cpp/ash_switches.h
index 054753b1..1573a1c0 100644
--- a/ash/public/cpp/ash_switches.h
+++ b/ash/public/cpp/ash_switches.h
@@ -27,7 +27,6 @@
 ASH_PUBLIC_EXPORT extern const char kAshDisableTouchExplorationMode[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableV1AppBackButton[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableDisplayMoveWindowAccels[];
-ASH_PUBLIC_EXPORT extern const char kAshEnableKeyboardShortcutViewer[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableMagnifierKeyScroller[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableNewOverviewAnimations[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableNewOverviewUi[];
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 0f67238..0ff96ef 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -471,6 +471,8 @@
 
 void RootWindowController::CloseChildWindows() {
   // NOTE: this may be called multiple times.
+  // TODO: Only call this once. The multiple calls cause complexity in the
+  // dependent Shelf and ShelfWidget code.
 
   // Deactivate keyboard container before closing child windows and shutting
   // down associated layout managers.
@@ -505,6 +507,7 @@
     while (!toplevel_windows.windows().empty())
       delete toplevel_windows.Pop();
   }
+
   // And then remove the containers.
   while (!root->children().empty()) {
     aura::Window* child = root->children()[0];
@@ -514,6 +517,8 @@
       root->RemoveChild(child);
   }
 
+  // Removing the containers destroys ShelfLayoutManager. ShelfWidget outlives
+  // ShelfLayoutManager because ShelfLayoutManager holds a pointer to it.
   shelf_->DestroyShelfWidget();
 
   aura::client::SetDragDropClient(GetRootWindow(), nullptr);
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc
index 2a252fc..cc55443 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/shelf/shelf.cc
@@ -90,6 +90,7 @@
 }
 
 void Shelf::ShutdownShelfWidget() {
+  // May be called multiple times during shutdown.
   if (shelf_widget_)
     shelf_widget_->Shutdown();
 }
diff --git a/ash/shelf/shelf_constants.h b/ash/shelf/shelf_constants.h
index f29671f..bf70054 100644
--- a/ash/shelf/shelf_constants.h
+++ b/ash/shelf/shelf_constants.h
@@ -10,6 +10,10 @@
 
 namespace ash {
 
+// The fallback notifier id for ARC notifications. Used when ArcNotificationItem
+// is provided with an empty app id.
+ASH_EXPORT constexpr char kDefaultArcNotifierId[] = "ARC_NOTIFICATION";
+
 // Size of the shelf when visible (height when the shelf is horizontal and
 // width when the shelf is vertical).
 ASH_EXPORT constexpr int kShelfSize = 48;
diff --git a/ash/shelf/shelf_controller.cc b/ash/shelf/shelf_controller.cc
index 5a69f13..d0f4b352 100644
--- a/ash/shelf/shelf_controller.cc
+++ b/ash/shelf/shelf_controller.cc
@@ -14,6 +14,7 @@
 #include "ash/session/session_controller.h"
 #include "ash/shelf/app_list_shelf_item_delegate.h"
 #include "ash/shelf/shelf.h"
+#include "ash/shelf/shelf_constants.h"
 #include "ash/shell.h"
 #include "ash/strings/grit/ash_strings.h"
 #include "ash/wm/tablet_mode/tablet_mode_controller.h"
@@ -374,12 +375,21 @@
       message_center::MessageCenter::Get()->FindVisibleNotificationById(
           notification_id);
 
-  // TODO(newcomer): Support ARC app notifications.
-  if (!notification || notification->notifier_id().type !=
-                           message_center::NotifierId::APPLICATION) {
+  if (!notification)
+    return;
+
+  // Skip this if the notification shouldn't badge an app.
+  if (notification->notifier_id().type !=
+          message_center::NotifierId::APPLICATION &&
+      notification->notifier_id().type !=
+          message_center::NotifierId::ARC_APPLICATION) {
     return;
   }
 
+  // Skip this if the notification doesn't have a valid app id.
+  if (notification->notifier_id().id == ash::kDefaultArcNotifierId)
+    return;
+
   model_.AddNotificationRecord(notification->notifier_id().id, notification_id);
 }
 
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index a3ea8ae4..dc3b623 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -73,7 +73,8 @@
     default_last_focusable_child_ = default_last_focusable_child;
   }
 
-  // views::WidgetDelegateView:
+  // views::WidgetDelegate:
+  void DeleteDelegate() override { delete this; }
   views::Widget* GetWidget() override { return View::GetWidget(); }
   const views::Widget* GetWidget() const override { return View::GetWidget(); }
 
@@ -106,6 +107,8 @@
       focus_cycler_(nullptr),
       opaque_background_(ui::LAYER_SOLID_COLOR) {
   DCHECK(shelf_widget_);
+  set_owned_by_client();  // Deleted by DeleteDelegate().
+
   SetLayoutManager(std::make_unique<views::FillLayout>());
   set_allow_deactivate_on_esc(true);
   opaque_background_.SetBounds(GetLocalBounds());
@@ -216,12 +219,36 @@
 
 ShelfWidget::~ShelfWidget() {
   // Must call Shutdown() before destruction.
-  DCHECK(!status_area_widget_);
+  DCHECK(did_shutdown_);
+}
+
+void ShelfWidget::Shutdown() {
+  if (did_shutdown_)
+    return;
+
+  // Shutting down the status area widget may cause some widgets (e.g. bubbles)
+  // to close, so uninstall the ShelfLayoutManager event filters first. Don't
+  // reset the pointer until later because other widgets (e.g. app list) may
+  // access it later in shutdown.
+  if (shelf_layout_manager_)
+    shelf_layout_manager_->PrepareForShutdown();
+
+  if (status_area_widget_) {
+    background_animator_.RemoveObserver(status_area_widget_.get());
+    Shell::Get()->focus_cycler()->RemoveWidget(status_area_widget_.get());
+    status_area_widget_.reset();
+  }
+
+  // Don't need to update the shelf background during shutdown.
   background_animator_.RemoveObserver(delegate_view_);
   background_animator_.RemoveObserver(this);
+
+  // Don't need to observe focus/activation during shutdown.
   Shell::Get()->focus_cycler()->RemoveWidget(this);
   SetFocusCycler(nullptr);
   RemoveObserver(this);
+
+  did_shutdown_ = true;
 }
 
 void ShelfWidget::CreateStatusAreaWidget(aura::Window* status_container) {
@@ -290,23 +317,6 @@
   return delegate_view_->focus_cycler();
 }
 
-void ShelfWidget::Shutdown() {
-  // Shutting down the status area widget may cause some widgets (e.g. bubbles)
-  // to close, so uninstall the ShelfLayoutManager event filters first. Don't
-  // reset the pointer until later because other widgets (e.g. app list) may
-  // access it later in shutdown.
-  if (shelf_layout_manager_)
-    shelf_layout_manager_->PrepareForShutdown();
-
-  if (status_area_widget_) {
-    background_animator_.RemoveObserver(status_area_widget_.get());
-    Shell::Get()->focus_cycler()->RemoveWidget(status_area_widget_.get());
-    status_area_widget_.reset();
-  }
-
-  CloseNow();
-}
-
 void ShelfWidget::UpdateIconPositionForPanel(aura::Window* panel) {
   ShelfID id = ShelfID::Deserialize(panel->GetProperty(kShelfIDKey));
   if (id.IsNull())
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h
index 695a549c..ce4a0367 100644
--- a/ash/shelf/shelf_widget.h
+++ b/ash/shelf/shelf_widget.h
@@ -143,6 +143,8 @@
 
   ScopedSessionObserver scoped_session_observer_;
 
+  bool did_shutdown_ = false;
+
   DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
 };
 
diff --git a/ash/shell.cc b/ash/shell.cc
index 9d2dfa1..bf9a4eb 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -21,6 +21,7 @@
 #include "ash/ash_constants.h"
 #include "ash/autoclick/autoclick_controller.h"
 #include "ash/cast_config_controller.h"
+#include "ash/detachable_base/detachable_base_handler.h"
 #include "ash/display/ash_display_controller.h"
 #include "ash/display/cursor_window_controller.h"
 #include "ash/display/display_color_manager_chromeos.h"
@@ -377,6 +378,7 @@
   PaletteTray::RegisterLocalStatePrefs(registry);
   WallpaperController::RegisterLocalStatePrefs(registry);
   BluetoothPowerController::RegisterLocalStatePrefs(registry);
+  DetachableBaseHandler::RegisterPrefs(registry);
 }
 
 // static
@@ -721,8 +723,6 @@
 
   toast_manager_.reset();
 
-  for (aura::Window* root : GetAllRootWindows())
-    Shelf::ForWindow(root)->ShutdownShelfWidget();
   tray_bluetooth_helper_.reset();
 
   // Accesses root window containers.
@@ -854,6 +854,9 @@
   // TouchDevicesController depends on the PrefService and must be destructed
   // before it.
   touch_devices_controller_ = nullptr;
+  // DetachableBaseHandler depends on the PrefService and must be destructed
+  // before it.
+  detachable_base_handler_.reset();
 
   local_state_.reset();
   shell_delegate_.reset();
@@ -875,6 +878,7 @@
     night_light_controller_ = std::make_unique<NightLightController>();
   touch_devices_controller_ = std::make_unique<TouchDevicesController>();
   bluetooth_power_controller_ = std::make_unique<BluetoothPowerController>();
+  detachable_base_handler_ = std::make_unique<DetachableBaseHandler>(this);
 
   // Connector can be null in tests.
   if (shell_delegate_->GetShellConnector()) {
diff --git a/ash/shell.h b/ash/shell.h
index ce33dba1..0c99232 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -92,6 +92,7 @@
 class BluetoothPowerController;
 class BrightnessControlDelegate;
 class CastConfigController;
+class DetachableBaseHandler;
 class DisplayColorManager;
 class DisplayConfigurationController;
 class DisplayErrorObserver;
@@ -335,6 +336,10 @@
   // Returns nullptr in mash which has no global cursor manager.
   ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
 
+  DetachableBaseHandler* detachable_base_handler() {
+    return detachable_base_handler_.get();
+  }
+
   display::DisplayManager* display_manager() { return display_manager_.get(); }
   DisplayConfigurationController* display_configuration_controller() {
     return display_configuration_controller_.get();
@@ -661,6 +666,7 @@
   std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
   std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
   std::unique_ptr<CastConfigController> cast_config_;
+  std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
   std::unique_ptr<DragDropController> drag_drop_controller_;
   std::unique_ptr<FocusCycler> focus_cycler_;
   std::unique_ptr<ImeController> ime_controller_;
diff --git a/ash/system/OWNERS b/ash/system/OWNERS
index bae17c8..026949c7 100644
--- a/ash/system/OWNERS
+++ b/ash/system/OWNERS
@@ -2,5 +2,6 @@
 stevenjb@chromium.org
 jennyz@chromium.org
 skuhne@chromium.org
+yoshiki@chromium.org
 
 # COMPONENT: UI>Shell>StatusArea
diff --git a/ash/system/network/network_list.cc b/ash/system/network/network_list.cc
index b78fc65..036eb9b 100644
--- a/ash/system/network/network_list.cc
+++ b/ash/system/network/network_list.cc
@@ -845,21 +845,18 @@
   for (const auto& info : network_list_) {
     if (info->type != type)
       continue;
-    if (UpdateNetworkChild(index, info.get()))
-      ++index;
+    UpdateNetworkChild(index++, info.get());
     new_guids->insert(info->guid);
   }
   return new_guids;
 }
 
-bool NetworkListView::UpdateNetworkChild(int index, const NetworkInfo* info) {
-  bool added = false;
+void NetworkListView::UpdateNetworkChild(int index, const NetworkInfo* info) {
   HoverHighlightView* network_view = nullptr;
   NetworkGuidMap::const_iterator found = network_guid_map_.find(info->guid);
   if (found == network_guid_map_.end()) {
     network_view = new HoverHighlightView(this);
     UpdateViewForNetwork(network_view, *info);
-    added = true;
   } else {
     network_view = found->second;
     if (NeedUpdateViewForNetwork(*info))
@@ -870,7 +867,6 @@
     network_view->SetEnabled(false);
   network_map_[network_view] = info->guid;
   network_guid_map_[info->guid] = network_view;
-  return added;
 }
 
 void NetworkListView::PlaceViewAtIndex(views::View* view, int index) {
diff --git a/ash/system/network/network_list.h b/ash/system/network/network_list.h
index 6ae1f8f..f1f59e8a 100644
--- a/ash/system/network/network_list.h
+++ b/ash/system/network/network_list.h
@@ -93,8 +93,7 @@
   std::unique_ptr<std::set<std::string>> UpdateNetworkChildren(
       NetworkInfo::Type type,
       int child_index);
-  // Returns true if a new child was added.
-  bool UpdateNetworkChild(int index, const NetworkInfo* info);
+  void UpdateNetworkChild(int index, const NetworkInfo* info);
 
   // Reorders children of |scroll_content()| as necessary placing |view| at
   // |index|.
diff --git a/ash/system/tray/tray_constants.h b/ash/system/tray/tray_constants.h
index 64864f7..ff802ae 100644
--- a/ash/system/tray/tray_constants.h
+++ b/ash/system/tray/tray_constants.h
@@ -8,6 +8,7 @@
 #include "ash/ash_export.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/geometry/insets.h"
+#include "ui/gfx/geometry/size.h"
 
 namespace ash {
 
@@ -132,10 +133,19 @@
     SkColorSetA(kUnifiedMenuIconColor, 0xa3);
 constexpr SkColor kUnifiedMenuButtonColor =
     SkColorSetA(kUnifiedMenuIconColor, 0x14);
+constexpr SkColor kUnifiedMenuButtonColorActive =
+    SkColorSetRGB(0x25, 0x81, 0xdf);
 
 constexpr int kUnifiedTopShortcutSpacing = 16;
+constexpr gfx::Insets kUnifiedTopShortcutPadding(0, 16);
 
-constexpr gfx::Insets kUnifiedTopShortcutPadding(0, 16, 16, 16);
+// Constants used in FeaturePodsView of UnifiedSystemTray.
+constexpr int kUnifiedFeaturePodIconSize = 48;
+constexpr gfx::Size kUnifiedFeaturePodSize(64, 88);
+constexpr int kUnifiedFeaturePodVerticalPadding = 28;
+constexpr int kUnifiedFeaturePodHorizontalSidePadding = 52;
+constexpr int kUnifiedFeaturePodHorizontalMiddlePadding = 32;
+constexpr int kUnifiedFeaturePodItemsInRow = 3;
 
 }  // namespace ash
 
diff --git a/ash/system/unified/feature_pod_button.cc b/ash/system/unified/feature_pod_button.cc
new file mode 100644
index 0000000..97281292
--- /dev/null
+++ b/ash/system/unified/feature_pod_button.cc
@@ -0,0 +1,134 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/unified/feature_pod_button.h"
+
+#include "ash/system/tray/tray_constants.h"
+#include "ash/system/tray/tray_popup_utils.h"
+#include "ash/system/unified/feature_pod_controller_base.h"
+#include "ui/gfx/canvas.h"
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
+#include "ui/views/animation/ink_drop_highlight.h"
+#include "ui/views/animation/ink_drop_impl.h"
+#include "ui/views/animation/ink_drop_mask.h"
+#include "ui/views/controls/label.h"
+#include "ui/views/layout/box_layout.h"
+
+namespace ash {
+
+namespace {
+
+void ConfigureFeaturePodLabel(views::Label* label) {
+  label->SetAutoColorReadabilityEnabled(false);
+  label->SetEnabledColor(kUnifiedMenuTextColor);
+  label->SetMultiLine(true);
+  label->SizeToFit(kUnifiedFeaturePodSize.width());
+  label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
+}
+
+}  // namespace
+
+FeaturePodIconButton::FeaturePodIconButton(views::ButtonListener* listener)
+    : views::ImageButton(listener) {
+  SetPreferredSize(
+      gfx::Size(kUnifiedFeaturePodIconSize, kUnifiedFeaturePodIconSize));
+  SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE);
+  TrayPopupUtils::ConfigureTrayPopupButton(this);
+}
+
+FeaturePodIconButton::~FeaturePodIconButton() = default;
+
+void FeaturePodIconButton::SetToggled(bool toggled) {
+  toggled_ = toggled;
+  SchedulePaint();
+}
+
+void FeaturePodIconButton::PaintButtonContents(gfx::Canvas* canvas) {
+  gfx::Rect rect(GetContentsBounds());
+  cc::PaintFlags flags;
+  flags.setAntiAlias(true);
+  flags.setColor(toggled_ ? kUnifiedMenuButtonColorActive
+                          : kUnifiedMenuButtonColor);
+  flags.setStyle(cc::PaintFlags::kFill_Style);
+  canvas->DrawCircle(gfx::PointF(rect.CenterPoint()),
+                     kUnifiedFeaturePodIconSize / 2, flags);
+
+  views::ImageButton::PaintButtonContents(canvas);
+}
+
+std::unique_ptr<views::InkDrop> FeaturePodIconButton::CreateInkDrop() {
+  return TrayPopupUtils::CreateInkDrop(this);
+}
+
+std::unique_ptr<views::InkDropRipple>
+FeaturePodIconButton::CreateInkDropRipple() const {
+  return TrayPopupUtils::CreateInkDropRipple(
+      TrayPopupInkDropStyle::FILL_BOUNDS, this,
+      GetInkDropCenterBasedOnLastEvent(), kUnifiedMenuIconColor);
+}
+
+std::unique_ptr<views::InkDropHighlight>
+FeaturePodIconButton::CreateInkDropHighlight() const {
+  return TrayPopupUtils::CreateInkDropHighlight(
+      TrayPopupInkDropStyle::FILL_BOUNDS, this, kUnifiedMenuIconColor);
+}
+
+std::unique_ptr<views::InkDropMask> FeaturePodIconButton::CreateInkDropMask()
+    const {
+  return std::make_unique<views::CircleInkDropMask>(
+      size(), GetContentsBounds().CenterPoint(),
+      kUnifiedFeaturePodIconSize / 2);
+}
+
+FeaturePodButton::FeaturePodButton(FeaturePodControllerBase* controller)
+    : controller_(controller) {
+  auto layout = std::make_unique<views::BoxLayout>(
+      views::BoxLayout::kVertical, gfx::Insets(), kUnifiedTopShortcutSpacing);
+  layout->set_cross_axis_alignment(
+      views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
+  SetLayoutManager(std::move(layout));
+
+  icon_button_ = new FeaturePodIconButton(this);
+  AddChildView(icon_button_);
+
+  label_ = new views::Label();
+  label_->SetVisible(false);
+  ConfigureFeaturePodLabel(label_);
+  AddChildView(label_);
+}
+
+FeaturePodButton::~FeaturePodButton() = default;
+
+void FeaturePodButton::SetVectorIcon(const gfx::VectorIcon& icon) {
+  icon_button_->SetImage(views::Button::STATE_NORMAL,
+                         gfx::CreateVectorIcon(icon, kUnifiedMenuIconColor));
+}
+
+void FeaturePodButton::SetLabel(const base::string16& label) {
+  label_->SetVisible(true);
+  label_->SetText(label);
+}
+
+void FeaturePodButton::SetSubLabel(const base::string16& sub_label) {
+  if (!sub_label_) {
+    sub_label_ = new views::Label();
+    ConfigureFeaturePodLabel(sub_label_);
+    // Insert |sub_label_| right after |label_|.
+    AddChildViewAt(sub_label_, GetIndexOf(label_) + 1);
+  }
+
+  sub_label_->SetText(sub_label);
+}
+
+void FeaturePodButton::SetToggled(bool toggled) {
+  icon_button_->SetToggled(toggled);
+}
+
+void FeaturePodButton::ButtonPressed(views::Button* sender,
+                                     const ui::Event& event) {
+  controller_->OnPressed();
+}
+
+}  // namespace ash
diff --git a/ash/system/unified/feature_pod_button.h b/ash/system/unified/feature_pod_button.h
new file mode 100644
index 0000000..01d34f9
--- /dev/null
+++ b/ash/system/unified/feature_pod_button.h
@@ -0,0 +1,84 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_UNIFIED_FEATURE_POD_BUTTON_H_
+#define ASH_SYSTEM_UNIFIED_FEATURE_POD_BUTTON_H_
+
+#include "ui/gfx/vector_icon_types.h"
+#include "ui/views/controls/button/image_button.h"
+#include "ui/views/view.h"
+
+namespace views {
+class Label;
+}
+
+namespace ash {
+
+class FeaturePodControllerBase;
+
+// ImageButon internally used in FeaturePodButton. Should not be used directly.
+class FeaturePodIconButton : public views::ImageButton {
+ public:
+  explicit FeaturePodIconButton(views::ButtonListener* listener);
+  ~FeaturePodIconButton() override;
+
+  // Change the toggle state. See FeaturePodButton::SetToggled.
+  void SetToggled(bool toggled);
+
+  // views::ImageButton:
+  void PaintButtonContents(gfx::Canvas* canvas) override;
+  std::unique_ptr<views::InkDrop> CreateInkDrop() override;
+  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
+  std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
+      const override;
+  std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override;
+
+ private:
+  // Ture if the button is currently toggled.
+  bool toggled_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(FeaturePodIconButton);
+};
+
+// A button in FeaturePodsView. These buttons are main entry points of features
+// in UnifiedSystemTray. Each button has its icon, label, and sub-label placed
+// vertically. They are also togglable and the background color indicates the
+// current state.
+// See the comment in FeaturePodsView for detail.
+class FeaturePodButton : public views::View, public views::ButtonListener {
+ public:
+  explicit FeaturePodButton(FeaturePodControllerBase* controller);
+  ~FeaturePodButton() override;
+
+  // Set the vector icon shown in a circle.
+  void SetVectorIcon(const gfx::VectorIcon& icon);
+
+  // Set the text of label shown below the icon.
+  void SetLabel(const base::string16& label);
+
+  // Set the text of sub-label shown below the label.
+  void SetSubLabel(const base::string16& sub_label);
+
+  // Change the toggled state. If toggled, the background color of the circle
+  // will change.
+  void SetToggled(bool toggled);
+
+  // views::ButtonListener:
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ private:
+  // Unowned.
+  FeaturePodControllerBase* controller_;
+
+  // Owned by views hierarchy.
+  FeaturePodIconButton* icon_button_ = nullptr;
+  views::Label* label_ = nullptr;
+  views::Label* sub_label_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(FeaturePodButton);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_UNIFIED_FEATURE_POD_BUTTON_H_
diff --git a/ash/system/unified/feature_pod_controller_base.h b/ash/system/unified/feature_pod_controller_base.h
new file mode 100644
index 0000000..67d939b
--- /dev/null
+++ b/ash/system/unified/feature_pod_controller_base.h
@@ -0,0 +1,29 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_UNIFIED_FEATURE_POD_CONTROLLER_BASE_H_
+#define ASH_SYSTEM_UNIFIED_FEATURE_POD_CONTROLLER_BASE_H_
+
+namespace ash {
+
+class FeaturePodButton;
+
+// Base class for controllers of feature pod buttons.
+// To add a new feature pod button, implement this class, and add to the list in
+// UnifiedSystemTrayController::InitFeaturePods().
+class FeaturePodControllerBase {
+ public:
+  virtual ~FeaturePodControllerBase() {}
+
+  // Create the view. Subclasses instantiate FeaturePodButton.
+  // The view will be onwed by views hierarchy.
+  virtual FeaturePodButton* CreateButton() = 0;
+
+  // Called when the feature pod button is clicked.
+  virtual void OnPressed() = 0;
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_UNIFIED_FEATURE_POD_CONTROLLER_BASE_H_
diff --git a/ash/system/unified/feature_pods_container_view.cc b/ash/system/unified/feature_pods_container_view.cc
new file mode 100644
index 0000000..880157a5
--- /dev/null
+++ b/ash/system/unified/feature_pods_container_view.cc
@@ -0,0 +1,65 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/unified/feature_pods_container_view.h"
+
+#include "ash/system/tray/tray_constants.h"
+
+namespace ash {
+
+FeaturePodsContainerView::FeaturePodsContainerView() {}
+
+FeaturePodsContainerView::~FeaturePodsContainerView() = default;
+
+gfx::Size FeaturePodsContainerView::CalculatePreferredSize() const {
+  int visible_count = 0;
+  for (int i = 0; i < child_count(); ++i) {
+    if (child_at(i)->visible())
+      ++visible_count;
+  }
+
+  // floor(visible_count / kUnifiedFeaturePodItemsInRow)
+  int number_of_lines = (visible_count + kUnifiedFeaturePodItemsInRow - 1) /
+                        kUnifiedFeaturePodItemsInRow;
+  return gfx::Size(0, kUnifiedFeaturePodVerticalPadding +
+                          (kUnifiedFeaturePodVerticalPadding +
+                           kUnifiedFeaturePodSize.height()) *
+                              number_of_lines);
+}
+
+void FeaturePodsContainerView::ChildVisibilityChanged(View* child) {
+  Layout();
+  SchedulePaint();
+}
+
+void FeaturePodsContainerView::Layout() {
+  int x = kUnifiedFeaturePodHorizontalSidePadding;
+  int y = kUnifiedFeaturePodVerticalPadding;
+  int visible_count = 0;
+  for (int i = 0; i < child_count(); ++i) {
+    views::View* child = child_at(i);
+    if (!child->visible())
+      continue;
+    ++visible_count;
+
+    child->SetBounds(x, y, kUnifiedFeaturePodSize.width(),
+                     kUnifiedFeaturePodSize.height());
+    child->Layout();
+
+    x += kUnifiedFeaturePodSize.width() +
+         kUnifiedFeaturePodHorizontalMiddlePadding;
+    // Go to the next line if the number of items exceeds
+    // kUnifiedFeaturePodItemsInRow.
+    if (visible_count % kUnifiedFeaturePodItemsInRow == 0) {
+      // Check if the total width fits into the menu width.
+      DCHECK(x - kUnifiedFeaturePodHorizontalMiddlePadding +
+                 kUnifiedFeaturePodHorizontalSidePadding ==
+             kTrayMenuWidth);
+      x = kUnifiedFeaturePodHorizontalSidePadding;
+      y += kUnifiedFeaturePodSize.height() + kUnifiedFeaturePodVerticalPadding;
+    }
+  }
+}
+
+}  // namespace ash
diff --git a/ash/system/unified/feature_pods_container_view.h b/ash/system/unified/feature_pods_container_view.h
new file mode 100644
index 0000000..907eceb
--- /dev/null
+++ b/ash/system/unified/feature_pods_container_view.h
@@ -0,0 +1,33 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_UNIFIED_FEATURE_PODS_CONTAINER_VIEW_H_
+#define ASH_SYSTEM_UNIFIED_FEATURE_PODS_CONTAINER_VIEW_H_
+
+#include "ui/views/view.h"
+
+namespace ash {
+
+// Container of feature pods buttons in the middle of UnifiedSystemTrayView.
+// The container has number of buttons placed in plane at regular distances such
+// as 3x2. FeaturePodButtons implements these individual buttons.
+// The container will also implement collapsed state where all the buttons are
+// horizontally placed.
+class FeaturePodsContainerView : public views::View {
+ public:
+  FeaturePodsContainerView();
+  ~FeaturePodsContainerView() override;
+
+  // Overridden views::View:
+  gfx::Size CalculatePreferredSize() const override;
+  void ChildVisibilityChanged(View* child) override;
+  void Layout() override;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(FeaturePodsContainerView);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_UNIFIED_FEATURE_PODS_CONTAINER_VIEW_H_
diff --git a/ash/system/unified/quiet_mode_feature_pod_controller.cc b/ash/system/unified/quiet_mode_feature_pod_controller.cc
new file mode 100644
index 0000000..72b3e0c
--- /dev/null
+++ b/ash/system/unified/quiet_mode_feature_pod_controller.cc
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/unified/quiet_mode_feature_pod_controller.h"
+
+#include "ash/resources/vector_icons/vector_icons.h"
+#include "ash/strings/grit/ash_strings.h"
+#include "ash/system/unified/feature_pod_button.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/message_center/message_center.h"
+
+using message_center::MessageCenter;
+
+namespace ash {
+
+QuietModeFeaturePodController::QuietModeFeaturePodController() {
+  MessageCenter::Get()->AddObserver(this);
+}
+
+QuietModeFeaturePodController::~QuietModeFeaturePodController() {
+  MessageCenter::Get()->RemoveObserver(this);
+}
+
+FeaturePodButton* QuietModeFeaturePodController::CreateButton() {
+  DCHECK(!button_);
+  button_ = new FeaturePodButton(this);
+  button_->SetLabel(l10n_util::GetStringUTF16(
+      IDS_ASH_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP));
+  OnQuietModeChanged(MessageCenter::Get()->IsQuietMode());
+  return button_;
+}
+
+void QuietModeFeaturePodController::OnPressed() {
+  MessageCenter* message_center = MessageCenter::Get();
+  bool is_quiet_mode = message_center->IsQuietMode();
+  message_center->SetQuietMode(!is_quiet_mode);
+}
+
+void QuietModeFeaturePodController::OnQuietModeChanged(bool in_quiet_mode) {
+  button_->SetVectorIcon(in_quiet_mode
+                             ? kNotificationCenterDoNotDisturbOnIcon
+                             : kNotificationCenterDoNotDisturbOffIcon);
+  button_->SetToggled(in_quiet_mode);
+}
+
+}  // namespace ash
diff --git a/ash/system/unified/quiet_mode_feature_pod_controller.h b/ash/system/unified/quiet_mode_feature_pod_controller.h
new file mode 100644
index 0000000..ed14228
--- /dev/null
+++ b/ash/system/unified/quiet_mode_feature_pod_controller.h
@@ -0,0 +1,40 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_UNIFIED_QUIET_MODE_FEATURE_POD_CONTROLLER_H_
+#define ASH_SYSTEM_UNIFIED_QUIET_MODE_FEATURE_POD_CONTROLLER_H_
+
+#include "ash/system/unified/feature_pod_controller_base.h"
+#include "base/macros.h"
+#include "base/strings/string16.h"
+#include "ui/message_center/message_center_observer.h"
+
+namespace ash {
+
+// Controller of a feature pod button that toggles do-not-disturb mode.
+// If the do-not-disturb mode is enabled, the button indicates it by bright
+// background color and different icon.
+class QuietModeFeaturePodController
+    : public FeaturePodControllerBase,
+      public message_center::MessageCenterObserver {
+ public:
+  QuietModeFeaturePodController();
+  ~QuietModeFeaturePodController() override;
+
+  // FeaturePodControllerBase:
+  FeaturePodButton* CreateButton() override;
+  void OnPressed() override;
+
+  // message_center::MessageCenterObserver:
+  void OnQuietModeChanged(bool in_quiet_mode) override;
+
+ private:
+  FeaturePodButton* button_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(QuietModeFeaturePodController);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_UNIFIED_QUIET_MODE_FEATURE_POD_CONTROLLER_H_
diff --git a/ash/system/unified/unified_system_tray_controller.cc b/ash/system/unified/unified_system_tray_controller.cc
index 985d1890..e086630 100644
--- a/ash/system/unified/unified_system_tray_controller.cc
+++ b/ash/system/unified/unified_system_tray_controller.cc
@@ -8,6 +8,8 @@
 #include "ash/metrics/user_metrics_recorder.h"
 #include "ash/shell.h"
 #include "ash/system/tray/system_tray_controller.h"
+#include "ash/system/unified/feature_pod_controller_base.h"
+#include "ash/system/unified/quiet_mode_feature_pod_controller.h"
 #include "ash/system/unified/unified_system_tray_view.h"
 #include "ash/wm/lock_state_controller.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -22,6 +24,7 @@
 UnifiedSystemTrayView* UnifiedSystemTrayController::CreateView() {
   DCHECK(!unified_view_);
   unified_view_ = new UnifiedSystemTrayView(this);
+  InitFeaturePods();
   return unified_view_;
 }
 
@@ -47,4 +50,23 @@
   // TODO(tetsui): Implement.
 }
 
+void UnifiedSystemTrayController::InitFeaturePods() {
+  AddFeaturePodItem(std::make_unique<QuietModeFeaturePodController>());
+
+  // If you want to add a new feature pod item, add here.
+
+  // TODO(tetsui): Add more feature pod items in spec:
+  // * RotationLockFeaturePodController
+  // * NetworkFeaturePodController
+  // * BluetoothFeaturePodController
+  // * NightLightFeaturePodController
+}
+
+void UnifiedSystemTrayController::AddFeaturePodItem(
+    std::unique_ptr<FeaturePodControllerBase> controller) {
+  DCHECK(unified_view_);
+  unified_view_->AddFeaturePodButton(controller->CreateButton());
+  feature_pod_controllers_.push_back(std::move(controller));
+}
+
 }  // namespace ash
diff --git a/ash/system/unified/unified_system_tray_controller.h b/ash/system/unified/unified_system_tray_controller.h
index a795757..f017e01 100644
--- a/ash/system/unified/unified_system_tray_controller.h
+++ b/ash/system/unified/unified_system_tray_controller.h
@@ -5,10 +5,14 @@
 #ifndef ASH_SYSTEM_UNIFIED_UNIFIED_SYSTEM_TRAY_CONTROLLER_H_
 #define ASH_SYSTEM_UNIFIED_UNIFIED_SYSTEM_TRAY_CONTROLLER_H_
 
+#include <memory>
+#include <vector>
+
 #include "base/macros.h"
 
 namespace ash {
 
+class FeaturePodControllerBase;
 class UnifiedSystemTrayView;
 
 // Controller class of UnifiedSystemTrayView. Handles events of the view.
@@ -30,9 +34,20 @@
   void ToggleExpanded();
 
  private:
+  // Initialize feature pod controllers and their views.
+  // If you want to add a new feature pod item, you have to add here.
+  void InitFeaturePods();
+
+  // Add the feature pod controller and its view.
+  void AddFeaturePodItem(std::unique_ptr<FeaturePodControllerBase> controller);
+
   // Unowned. Owned by Views hierarchy.
   UnifiedSystemTrayView* unified_view_ = nullptr;
 
+  // Controllers of feature pod buttons. Owned by this.
+  std::vector<std::unique_ptr<FeaturePodControllerBase>>
+      feature_pod_controllers_;
+
   DISALLOW_COPY_AND_ASSIGN(UnifiedSystemTrayController);
 };
 
diff --git a/ash/system/unified/unified_system_tray_view.cc b/ash/system/unified/unified_system_tray_view.cc
index 1c8f441..e18fa17 100644
--- a/ash/system/unified/unified_system_tray_view.cc
+++ b/ash/system/unified/unified_system_tray_view.cc
@@ -4,6 +4,8 @@
 
 #include "ash/system/unified/unified_system_tray_view.h"
 
+#include "ash/system/unified/feature_pod_button.h"
+#include "ash/system/unified/feature_pods_container_view.h"
 #include "ash/system/unified/top_shortcuts_view.h"
 #include "ui/views/layout/box_layout.h"
 
@@ -18,8 +20,15 @@
       std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
 
   AddChildView(new TopShortcutsView(controller_));
+
+  feature_pods_container_ = new FeaturePodsContainerView();
+  AddChildView(feature_pods_container_);
 }
 
 UnifiedSystemTrayView::~UnifiedSystemTrayView() = default;
 
+void UnifiedSystemTrayView::AddFeaturePodButton(FeaturePodButton* button) {
+  feature_pods_container_->AddChildView(button);
+}
+
 }  // namespace ash
diff --git a/ash/system/unified/unified_system_tray_view.h b/ash/system/unified/unified_system_tray_view.h
index 4ba2087e..b592f16 100644
--- a/ash/system/unified/unified_system_tray_view.h
+++ b/ash/system/unified/unified_system_tray_view.h
@@ -9,17 +9,26 @@
 
 namespace ash {
 
+class FeaturePodButton;
+class FeaturePodsContainerView;
 class UnifiedSystemTrayController;
 
-// View class of default view in UnifiedSystemTray.
+// View class of the main bubble in UnifiedSystemTray.
 class UnifiedSystemTrayView : public views::View {
  public:
   explicit UnifiedSystemTrayView(UnifiedSystemTrayController* controller);
   ~UnifiedSystemTrayView() override;
 
+  // Add feature pod button to |feature_pods_|.
+  void AddFeaturePodButton(FeaturePodButton* button);
+
  private:
+  // Unowned.
   UnifiedSystemTrayController* controller_;
 
+  // Owned by views hierarchy.
+  FeaturePodsContainerView* feature_pods_container_ = nullptr;
+
   DISALLOW_COPY_AND_ASSIGN(UnifiedSystemTrayView);
 };
 
diff --git a/ash/test/ui_controls_factory_ash.cc b/ash/test/ui_controls_factory_ash.cc
index 6262fb95..8952192 100644
--- a/ash/test/ui_controls_factory_ash.cc
+++ b/ash/test/ui_controls_factory_ash.cc
@@ -115,14 +115,6 @@
     return ui_controls && ui_controls->SendMouseClick(type);
   }
 
-  void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) override {
-    UIControlsAura* ui_controls =
-        GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows());
-    if (ui_controls)
-      ui_controls->RunClosureAfterAllPendingUIEvents(closure);
-  }
-
  private:
   DISALLOW_COPY_AND_ASSIGN(UIControlsAsh);
 };
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index b2216ec..b807fc81 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -2351,7 +2351,8 @@
 
 // Tests that AlwaysOnTopWindow can be handled correctly in new overview
 // animations.
-TEST_F(WindowSelectorTest, HandleAlwaysOnTopWindow) {
+// Fails consistently; see https://crbug.com/812497.
+TEST_F(WindowSelectorTest, DISABLED_HandleAlwaysOnTopWindow) {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kAshEnableNewOverviewAnimations);
 
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 7678f68..ecaacaf 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -3022,9 +3022,10 @@
           _rebased_import_path = [ rebase_path(_import_path, root_build_dir) ]
           _rebased_import_paths += _rebased_import_path
           _java_files_build_rel = []
-          _java_files_build_rel = exec_script("//build/android/gyp/find.py",
-                                              _rebased_import_path,
-                                              "list lines")
+          _java_files_build_rel =
+              exec_script("//build/android/gyp/find.py",
+                          [ "--pattern=*.java" ] + _rebased_import_path,
+                          "list lines")
           inputs += rebase_path(_java_files_build_rel, ".", root_build_dir)
         }
         args += [ "--includes=$_rebased_import_paths" ]
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 4f5c5fe3..7f4474a 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -686,8 +686,8 @@
 
     # Animation test files.
     "animation/animation_host_unittest.cc",
-    "animation/animation_player_unittest.cc",
     "animation/animation_timeline_unittest.cc",
+    "animation/animation_unittest.cc",
     "animation/element_animations_unittest.cc",
     "animation/keyframe_model_unittest.cc",
     "animation/keyframed_animation_curve_unittest.cc",
diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
index f6efdcce..2fb7199 100644
--- a/cc/animation/animation_host.cc
+++ b/cc/animation/animation_host.cc
@@ -659,7 +659,7 @@
   // If an animation is being run on the compositor, it will have a ticking
   // Animation (which will have a corresponding impl-thread version). Therefore
   // to find the count of main-only animations, we can simply subtract the
-  // number of ticking players from the total count.
+  // number of ticking animations from the total count.
   size_t ticking_animations_count = ticking_animations_.size();
   if (main_thread_animations_count_ !=
       total_animations_count - ticking_animations_count) {
diff --git a/cc/animation/animation_player_unittest.cc b/cc/animation/animation_unittest.cc
similarity index 100%
rename from cc/animation/animation_player_unittest.cc
rename to cc/animation/animation_unittest.cc
diff --git a/cc/paint/oop_pixeltest.cc b/cc/paint/oop_pixeltest.cc
index 824e4c7d..efdb550 100644
--- a/cc/paint/oop_pixeltest.cc
+++ b/cc/paint/oop_pixeltest.cc
@@ -151,12 +151,11 @@
 
     // Create and allocate a texture on the raster interface.
     GLuint raster_texture_id;
-    raster_implementation_->GenTextures(1, &raster_texture_id);
-    raster_implementation_->BindTexture(GL_TEXTURE_2D, raster_texture_id);
-    raster_implementation_->TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height,
-                                       0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
-    raster_implementation_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
-                                          GL_LINEAR);
+    raster_texture_id = raster_implementation_->CreateTexture(
+        false, gfx::BufferUsage::GPU_READ, viz::ResourceFormat::RGBA_8888);
+    raster_implementation_->TexStorage2D(raster_texture_id, 1, width, height);
+    raster_implementation_->TexParameteri(raster_texture_id,
+                                          GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 
     EXPECT_EQ(raster_implementation_->GetError(),
               static_cast<unsigned>(GL_NO_ERROR));
@@ -186,9 +185,9 @@
     // Produce a mailbox and insert an ordering barrier (assumes the raster
     // interface and gl are on the same scheduling group).
     gpu::Mailbox mailbox;
-    raster_implementation_->GenMailboxCHROMIUM(mailbox.name);
-    raster_implementation_->ProduceTextureDirectCHROMIUM(raster_texture_id,
-                                                         mailbox.name);
+    raster_implementation_->GenMailbox(mailbox.name);
+    raster_implementation_->ProduceTextureDirect(raster_texture_id,
+                                                 mailbox.name);
     raster_implementation_->OrderingBarrierCHROMIUM();
 
     EXPECT_EQ(raster_implementation_->GetError(),
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc
index 43fca42..96a97fe 100644
--- a/cc/raster/gpu_raster_buffer_provider.cc
+++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -56,7 +56,9 @@
     bool use_distance_field_text,
     int msaa_sample_count) {
   gpu::raster::RasterInterface* ri = context_provider->RasterInterface();
-  GLuint texture_id = ri->CreateAndConsumeTextureCHROMIUM(mailbox.name);
+  GLuint texture_id = ri->CreateAndConsumeTexture(
+      texture_is_overlay_candidate, gfx::BufferUsage::SCANOUT, resource_format,
+      mailbox.name);
   if (!texture_storage_allocated) {
     viz::TextureAllocation alloc = {texture_id, texture_target,
                                     texture_is_overlay_candidate};
@@ -126,10 +128,10 @@
     viz::RasterContextProvider* context_provider,
     bool use_distance_field_text,
     int msaa_sample_count) {
-  ScopedGrContextAccess gr_context_access(context_provider);
-
   gpu::raster::RasterInterface* ri = context_provider->RasterInterface();
-  GLuint texture_id = ri->CreateAndConsumeTextureCHROMIUM(mailbox.name);
+  GLuint texture_id = ri->CreateAndConsumeTexture(
+      texture_is_overlay_candidate, gfx::BufferUsage::SCANOUT, resource_format,
+      mailbox.name);
   if (!texture_storage_allocated) {
     viz::TextureAllocation alloc = {texture_id, texture_target,
                                     texture_is_overlay_candidate};
@@ -139,6 +141,7 @@
   }
 
   {
+    ScopedGrContextAccess gr_context_access(context_provider);
     LayerTreeResourceProvider::ScopedSkSurface scoped_surface(
         context_provider->GrContext(), texture_id, texture_target,
         resource_size, resource_format, use_distance_field_text,
diff --git a/cc/raster/one_copy_raster_buffer_provider.cc b/cc/raster/one_copy_raster_buffer_provider.cc
index 872e159..d55894c5 100644
--- a/cc/raster/one_copy_raster_buffer_provider.cc
+++ b/cc/raster/one_copy_raster_buffer_provider.cc
@@ -392,7 +392,10 @@
   // making the mailbox. This ensures that the mailbox we consume here is valid
   // by the time the consume command executes.
   ri->WaitSyncTokenCHROMIUM(sync_token.GetConstData());
-  GLuint mailbox_texture_id = ri->CreateAndConsumeTextureCHROMIUM(mailbox.name);
+  GLuint mailbox_texture_id = ri->CreateAndConsumeTexture(
+      mailbox_texture_is_overlay_candidate, gfx::BufferUsage::SCANOUT,
+      resource_format, mailbox.name);
+
   if (!mailbox_texture_storage_allocated) {
     viz::TextureAllocation alloc = {mailbox_texture_id, mailbox_texture_target,
                                     mailbox_texture_is_overlay_candidate};
@@ -401,20 +404,18 @@
         resource_size, alloc, color_space);
   }
 
-  GLenum image_target = resource_provider_->GetImageTextureTarget(
-      worker_context_provider_->ContextCapabilities(), StagingBufferUsage(),
-      staging_buffer->format);
-
   // Create and bind staging texture.
   if (!staging_buffer->texture_id) {
-    ri->GenTextures(1, &staging_buffer->texture_id);
-    ri->BindTexture(image_target, staging_buffer->texture_id);
-    ri->TexParameteri(image_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    ri->TexParameteri(image_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    ri->TexParameteri(image_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    ri->TexParameteri(image_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-  } else {
-    ri->BindTexture(image_target, staging_buffer->texture_id);
+    staging_buffer->texture_id =
+        ri->CreateTexture(true, StagingBufferUsage(), staging_buffer->format);
+    ri->TexParameteri(staging_buffer->texture_id, GL_TEXTURE_MIN_FILTER,
+                      GL_NEAREST);
+    ri->TexParameteri(staging_buffer->texture_id, GL_TEXTURE_MAG_FILTER,
+                      GL_NEAREST);
+    ri->TexParameteri(staging_buffer->texture_id, GL_TEXTURE_WRAP_S,
+                      GL_CLAMP_TO_EDGE);
+    ri->TexParameteri(staging_buffer->texture_id, GL_TEXTURE_WRAP_T,
+                      GL_CLAMP_TO_EDGE);
   }
 
   // Create and bind image.
@@ -424,15 +425,19 @@
           staging_buffer->gpu_memory_buffer->AsClientBuffer(),
           staging_buffer->size.width(), staging_buffer->size.height(),
           GLInternalFormat(staging_buffer->format));
-      ri->BindTexImage2DCHROMIUM(image_target, staging_buffer->image_id);
+      ri->BindTexImage2DCHROMIUM(staging_buffer->texture_id,
+                                 staging_buffer->image_id);
     }
   } else {
-    ri->ReleaseTexImage2DCHROMIUM(image_target, staging_buffer->image_id);
-    ri->BindTexImage2DCHROMIUM(image_target, staging_buffer->image_id);
+    ri->ReleaseTexImage2DCHROMIUM(staging_buffer->texture_id,
+                                  staging_buffer->image_id);
+    ri->BindTexImage2DCHROMIUM(staging_buffer->texture_id,
+                               staging_buffer->image_id);
   }
 
   // Unbind staging texture.
-  ri->BindTexture(image_target, 0);
+  // TODO(vmiura): Need a way to ensure we don't hold onto bindings?
+  // ri->BindTexture(image_target, 0);
 
   if (resource_provider_->use_sync_query()) {
     if (!staging_buffer->query_id)
@@ -466,10 +471,8 @@
       int rows_to_copy = std::min(chunk_size_in_rows, height - y);
       DCHECK_GT(rows_to_copy, 0);
 
-      ri->CopySubTextureCHROMIUM(staging_buffer->texture_id, 0,
-                                 mailbox_texture_target, mailbox_texture_id, 0,
-                                 0, y, 0, y, rect_to_copy.width(), rows_to_copy,
-                                 false, false, false);
+      ri->CopySubTexture(staging_buffer->texture_id, mailbox_texture_id, 0, y,
+                         0, y, rect_to_copy.width(), rows_to_copy);
       y += rows_to_copy;
 
       // Increment |bytes_scheduled_since_last_flush_| by the amount of memory
diff --git a/cc/resources/layer_tree_resource_provider.cc b/cc/resources/layer_tree_resource_provider.cc
index 38f17c0..2c62ec28 100644
--- a/cc/resources/layer_tree_resource_provider.cc
+++ b/cc/resources/layer_tree_resource_provider.cc
@@ -790,6 +790,7 @@
   DCHECK_EQ(resource->type, viz::ResourceType::kTexture);
   resource_provider->CreateTexture(resource);
   size_ = resource->size;
+  usage_ = resource->usage;
   format_ = resource->format;
   color_space_ = resource_provider_->GetResourceColorSpaceForRaster(resource);
   texture_id_ = resource->gl_id;
@@ -892,7 +893,8 @@
   DCHECK(ri);
   DCHECK(!mailbox_.IsZero());
 
-  GLuint texture_id = ri->CreateAndConsumeTextureCHROMIUM(mailbox_.name);
+  GLuint texture_id =
+      ri->CreateAndConsumeTexture(is_overlay_, usage_, format_, mailbox_.name);
   DCHECK(texture_id);
 
   LazyAllocate(ri, texture_id);
@@ -911,13 +913,10 @@
     return;
   allocated_ = true;
 
-  ri->BindTexture(target_, texture_id);
-  ri->TexStorageForRaster(
-      target_, format_, size_.width(), size_.height(),
-      is_overlay_ ? gpu::raster::kOverlay : gpu::raster::kNone);
+  ri->TexStorage2D(texture_id, 1, size_.width(), size_.height());
   if (is_overlay_ && color_space_.IsValid()) {
-    ri->SetColorSpaceMetadataCHROMIUM(
-        texture_id, reinterpret_cast<GLColorSpace>(&color_space_));
+    ri->SetColorSpaceMetadata(texture_id,
+                              reinterpret_cast<GLColorSpace>(&color_space_));
   }
 }
 
diff --git a/cc/resources/layer_tree_resource_provider.h b/cc/resources/layer_tree_resource_provider.h
index 92ae354a..257e249 100644
--- a/cc/resources/layer_tree_resource_provider.h
+++ b/cc/resources/layer_tree_resource_provider.h
@@ -185,6 +185,7 @@
 
     // The following are copied from the resource.
     gfx::Size size_;
+    gfx::BufferUsage usage_;
     viz::ResourceFormat format_;
     gfx::ColorSpace color_space_;
     GLuint texture_id_;
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 033d17c..9fefa22 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -362,11 +362,6 @@
   if (input_handler_client_ && impl_thread_phase_ == ImplThreadPhase::IDLE)
     input_handler_client_->DeliverInputForBeginFrame();
 
-  UpdateSyncTreeAfterCommitOrImplSideInvalidation();
-  micro_benchmark_controller_.DidCompleteCommit();
-}
-
-void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() {
   if (CommitToActiveTree()) {
     active_tree_->HandleScrollbarShowRequestsFromMain();
 
@@ -385,6 +380,11 @@
   else
     AnimatePendingTreeAfterCommit();
 
+  UpdateSyncTreeAfterCommitOrImplSideInvalidation();
+  micro_benchmark_controller_.DidCompleteCommit();
+}
+
+void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() {
   // LayerTreeHost may have changed the GPU rasterization flags state, which
   // may require an update of the tree resources.
   UpdateTreeResourcesForGpuRasterizationIfNeeded();
@@ -1188,6 +1188,8 @@
 
 void LayerTreeHostImpl::InvalidateContentOnImplSide() {
   DCHECK(!pending_tree_);
+  // Invalidation should never be ran outside the impl frame.
+  DCHECK_EQ(impl_thread_phase_, ImplThreadPhase::INSIDE_IMPL_FRAME);
 
   if (!CommitToActiveTree())
     CreatePendingTree();
@@ -1921,7 +1923,7 @@
   if (render_frame_metadata_observer_) {
     RenderFrameMetadata render_frame_metadata = MakeRenderFrameMetadata();
     render_frame_metadata_observer_->OnRenderFrameSubmission(
-        render_frame_metadata);
+        std::move(render_frame_metadata));
   }
 
   metadata.latency_info.emplace_back(ui::SourceEventType::FRAME);
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 59be896..7466524 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -13568,6 +13568,10 @@
   scoped_refptr<RasterSource> raster_source =
       recording_source->CreateRasterSource();
 
+  viz::BeginFrameArgs begin_frame_args =
+      viz::CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1);
+  host_impl_->WillBeginImplFrame(begin_frame_args);
+
   // Create the pending tree.
   host_impl_->BeginCommit();
   LayerTreeImpl* pending_tree = host_impl_->pending_tree();
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 683856d..0cf2a7c 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -26,6 +26,7 @@
 #include "cc/test/fake_content_layer_client.h"
 #include "cc/test/fake_picture_layer.h"
 #include "cc/test/layer_tree_test.h"
+#include "cc/trees/effect_node.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/transform_node.h"
 
@@ -1773,6 +1774,196 @@
 
 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestImplSideInvalidation);
 
+class LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit
+    : public LayerTreeHostAnimationTest {
+ public:
+  void SetupTree() override {
+    LayerTreeHostAnimationTest::SetupTree();
+    layer_ = FakePictureLayer::Create(&client_);
+    layer_->SetBounds(gfx::Size(4, 4));
+    client_.set_bounds(layer_->bounds());
+    layer_tree_host()->root_layer()->AddChild(layer_);
+    AttachAnimationsToTimeline();
+    animation_child_->AttachElement(layer_->element_id());
+    num_draws_ = 0;
+  }
+
+  void UpdateAnimationState(LayerTreeHostImpl* host_impl,
+                            bool has_unfinished_animation) override {
+    if (!has_unfinished_animation && !did_request_impl_side_invalidation_) {
+      // The animation on the active tree has finished, now request an impl-side
+      // invalidation and verify that the final value on an impl-side pending
+      // tree is correct.
+      did_request_impl_side_invalidation_ = true;
+      host_impl->RequestImplSideInvalidationForCheckerImagedTiles();
+    }
+  }
+
+  void AfterTest() override {}
+
+ protected:
+  scoped_refptr<Layer> layer_;
+  FakeContentLayerClient client_;
+  bool did_request_impl_side_invalidation_ = false;
+  int num_draws_;
+};
+
+class ImplSideInvalidationWithoutCommitTestOpacity
+    : public LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit {
+ public:
+  void BeginTest() override {
+    AddOpacityTransitionToAnimation(animation_child_.get(), 0.04, 0.2f, 0.8f,
+                                    false);
+    PostSetNeedsCommitToMainThread();
+  }
+
+  void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+    if (num_draws_++ > 0)
+      return;
+    EXPECT_EQ(0, host_impl->active_tree()->source_frame_number());
+    LayerImpl* layer_impl = host_impl->active_tree()->LayerById(layer_->id());
+    EXPECT_FLOAT_EQ(0.2f, layer_impl->Opacity());
+  }
+
+  void DidInvalidateContentOnImplSide(LayerTreeHostImpl* host_impl) override {
+    ASSERT_TRUE(did_request_impl_side_invalidation_);
+    EXPECT_EQ(0, host_impl->sync_tree()->source_frame_number());
+    const float expected_opacity = 0.8f;
+    LayerImpl* layer_impl = host_impl->sync_tree()->LayerById(layer_->id());
+    EXPECT_FLOAT_EQ(expected_opacity, layer_impl->Opacity());
+    EndTest();
+  }
+};
+
+MULTI_THREAD_TEST_F(ImplSideInvalidationWithoutCommitTestOpacity);
+
+class ImplSideInvalidationWithoutCommitTestTransform
+    : public LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit {
+ public:
+  void BeginTest() override {
+    AddAnimatedTransformToAnimation(animation_child_.get(), 0.04, 5, 5);
+    PostSetNeedsCommitToMainThread();
+  }
+
+  void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+    if (num_draws_++ > 0)
+      return;
+    EXPECT_EQ(0, host_impl->active_tree()->source_frame_number());
+    LayerImpl* layer_impl = host_impl->active_tree()->LayerById(layer_->id());
+    EXPECT_TRANSFORMATION_MATRIX_EQ(gfx::Transform(),
+                                    layer_impl->DrawTransform());
+  }
+
+  void DidInvalidateContentOnImplSide(LayerTreeHostImpl* host_impl) override {
+    ASSERT_TRUE(did_request_impl_side_invalidation_);
+    EXPECT_EQ(0, host_impl->sync_tree()->source_frame_number());
+    gfx::Transform expected_transform;
+    expected_transform.Translate(5.f, 5.f);
+    LayerImpl* layer_impl = host_impl->sync_tree()->LayerById(layer_->id());
+    EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform,
+                                    layer_impl->DrawTransform());
+    EndTest();
+  }
+};
+
+MULTI_THREAD_TEST_F(ImplSideInvalidationWithoutCommitTestTransform);
+
+class ImplSideInvalidationWithoutCommitTestFilter
+    : public LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit {
+ public:
+  void BeginTest() override {
+    AddAnimatedFilterToAnimation(animation_child_.get(), 0.04, 0.f, 1.f);
+    PostSetNeedsCommitToMainThread();
+  }
+
+  void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+    if (num_draws_++ > 0)
+      return;
+    EXPECT_EQ(0, host_impl->active_tree()->source_frame_number());
+    EXPECT_EQ(
+        std::string("{\"FilterOperations\":[{\"type\":5,\"amount\":0.0}]}"),
+        host_impl->active_tree()
+            ->property_trees()
+            ->effect_tree.FindNodeFromElementId(layer_->element_id())
+            ->filters.ToString());
+  }
+
+  void DidInvalidateContentOnImplSide(LayerTreeHostImpl* host_impl) override {
+    ASSERT_TRUE(did_request_impl_side_invalidation_);
+    EXPECT_EQ(0, host_impl->sync_tree()->source_frame_number());
+    // AddAnimatedFilterToAnimation adds brightness filter which is type 5.
+    EXPECT_EQ(
+        std::string("{\"FilterOperations\":[{\"type\":5,\"amount\":1.0}]}"),
+        host_impl->sync_tree()
+            ->property_trees()
+            ->effect_tree.FindNodeFromElementId(layer_->element_id())
+            ->filters.ToString());
+    EndTest();
+  }
+};
+
+MULTI_THREAD_TEST_F(ImplSideInvalidationWithoutCommitTestFilter);
+
+class ImplSideInvalidationWithoutCommitTestScroll
+    : public LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit {
+ public:
+  void SetupTree() override {
+    LayerTreeHostAnimationTestImplSideInvalidationWithoutCommit::SetupTree();
+
+    layer_->SetScrollable(gfx::Size(100, 100));
+    layer_->SetBounds(gfx::Size(1000, 1000));
+    client_.set_bounds(layer_->bounds());
+    layer_->SetScrollOffset(gfx::ScrollOffset(10.f, 20.f));
+  }
+
+  void BeginTest() override {
+    std::unique_ptr<ScrollOffsetAnimationCurve> curve(
+        ScrollOffsetAnimationCurve::Create(
+            gfx::ScrollOffset(500.f, 550.f),
+            CubicBezierTimingFunction::CreatePreset(
+                CubicBezierTimingFunction::EaseType::EASE_IN_OUT)));
+    std::unique_ptr<KeyframeModel> keyframe_model(KeyframeModel::Create(
+        std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
+    keyframe_model->set_needs_synchronized_start_time(true);
+    ASSERT_TRUE(proxy()->SupportsImplScrolling());
+    animation_child_->AddKeyframeModel(std::move(keyframe_model));
+    PostSetNeedsCommitToMainThread();
+  }
+
+  void WillCommit() override {
+    if (layer_tree_host()->SourceFrameNumber() == 1) {
+      // Block until the invalidation is done after animation finishes on the
+      // compositor thread. We need to make sure the pending tree has valid
+      // information based on invalidation only.
+      completion_.Wait();
+    }
+  }
+
+  void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+    if (num_draws_++ > 0)
+      return;
+    EXPECT_EQ(0, host_impl->active_tree()->source_frame_number());
+    LayerImpl* layer_impl = host_impl->active_tree()->LayerById(layer_->id());
+    EXPECT_VECTOR2DF_EQ(gfx::ScrollOffset(10.f, 20.f),
+                        layer_impl->CurrentScrollOffset());
+  }
+
+  void DidInvalidateContentOnImplSide(LayerTreeHostImpl* host_impl) override {
+    ASSERT_TRUE(did_request_impl_side_invalidation_);
+    EXPECT_EQ(0, host_impl->sync_tree()->source_frame_number());
+    LayerImpl* layer_impl = host_impl->pending_tree()->LayerById(layer_->id());
+    EXPECT_VECTOR2DF_EQ(gfx::ScrollOffset(500.f, 550.f),
+                        layer_impl->CurrentScrollOffset());
+    completion_.Signal();
+    EndTest();
+  }
+
+ private:
+  CompletionEvent completion_;
+};
+
+MULTI_THREAD_TEST_F(ImplSideInvalidationWithoutCommitTestScroll);
+
 class LayerTreeHostAnimationTestNotifyAnimationFinished
     : public LayerTreeHostAnimationTest {
  public:
diff --git a/cc/trees/render_frame_metadata.cc b/cc/trees/render_frame_metadata.cc
index d20da91f..fd3a1b9 100644
--- a/cc/trees/render_frame_metadata.cc
+++ b/cc/trees/render_frame_metadata.cc
@@ -15,6 +15,13 @@
 
 RenderFrameMetadata::~RenderFrameMetadata() {}
 
+bool RenderFrameMetadata::HasAlwaysUpdateMetadataChanged(
+    const RenderFrameMetadata& rfm1,
+    const RenderFrameMetadata& rfm2) {
+  // TODO(jonross): as low frequency fields are added, update this method.
+  return false;
+}
+
 RenderFrameMetadata& RenderFrameMetadata::operator=(
     const RenderFrameMetadata&) = default;
 
diff --git a/cc/trees/render_frame_metadata.h b/cc/trees/render_frame_metadata.h
index 3c029591..a733fe6d 100644
--- a/cc/trees/render_frame_metadata.h
+++ b/cc/trees/render_frame_metadata.h
@@ -5,6 +5,7 @@
 #ifndef CC_TREES_RENDER_FRAME_METADATA_H_
 #define CC_TREES_RENDER_FRAME_METADATA_H_
 
+#include "base/optional.h"
 #include "cc/cc_export.h"
 #include "ui/gfx/geometry/vector2d_f.h"
 
@@ -17,14 +18,20 @@
   RenderFrameMetadata(RenderFrameMetadata&& other);
   ~RenderFrameMetadata();
 
+  // Certain fields should always have their changes reported. This will return
+  // true when there is a difference between |rfm1| and |rfm2| for those fields.
+  // These fields have a low frequency rate of change.
+  static bool HasAlwaysUpdateMetadataChanged(const RenderFrameMetadata& rfm1,
+                                             const RenderFrameMetadata& rfm2);
+
   RenderFrameMetadata& operator=(const RenderFrameMetadata&);
   RenderFrameMetadata& operator=(RenderFrameMetadata&& other);
   bool operator==(const RenderFrameMetadata& other);
   bool operator!=(const RenderFrameMetadata& other);
 
-  // Scroll offset and scale of the root layer. This can be used for tasks
-  // like positioning windowed plugins.
-  gfx::Vector2dF root_scroll_offset;
+  // Scroll offset of the root layer. This optional parameter is only valid
+  // during tests.
+  base::Optional<gfx::Vector2dF> root_scroll_offset;
 };
 
 }  // namespace cc
diff --git a/cc/trees/render_frame_metadata_observer.h b/cc/trees/render_frame_metadata_observer.h
index f1055ec..9f95fe58 100644
--- a/cc/trees/render_frame_metadata_observer.h
+++ b/cc/trees/render_frame_metadata_observer.h
@@ -26,7 +26,7 @@
 
   // Notification of the RendarFrameMetadata for the frame being submitted to
   // the display compositor.
-  virtual void OnRenderFrameSubmission(const RenderFrameMetadata& metadata) = 0;
+  virtual void OnRenderFrameSubmission(RenderFrameMetadata metadata) = 0;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RenderFrameMetadataObserver);
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 7bce3c46..fa8f770 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -11,6 +11,7 @@
 import("//chrome/chrome_paks.gni")
 import("//chrome/common/features.gni")
 import("//chrome/process_version_rc_template.gni")  # For branding_file_path.
+import("//components/feed/features.gni")  # For disabling Feed library.
 import("//device/vr/features/features.gni")
 import("//testing/test.gni")
 import("//third_party/icu/config.gni")
@@ -274,6 +275,10 @@
     "//url/mojom:url_mojom_gurl_java",
   ]
 
+  if (enable_feed_in_chrome) {
+    deps += [ "//third_party/feed:feed_java" ]
+  }
+
   srcjar_deps = [
     ":chrome_android_java_enums_srcjar",
     ":chrome_android_java_google_api_keys_srcjar",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 15a3a27b..fb375f2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -651,7 +651,7 @@
         if (shouldDestroyIncognitoProfile()) {
             Profile.getLastUsedProfile().getOffTheRecordProfile().destroyWhenAppropriate();
         } else {
-            CookiesFetcher.restoreCookies(this);
+            CookiesFetcher.restoreCookies();
         }
 
         StartupMetrics.getInstance().recordHistogram(false);
@@ -692,7 +692,7 @@
     @Override
     public void onPauseWithNative() {
         mTabModelSelectorImpl.commitAllTabClosures();
-        CookiesFetcher.persistCookies(this);
+        CookiesFetcher.persistCookies();
 
         mLocaleManager.setSnackbarManager(null);
         mLocaleManager.stopObservingPhoneChanges();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
index 714f639..9322416 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
@@ -4,9 +4,9 @@
 
 package org.chromium.chrome.browser.cookies;
 
-import android.content.Context;
 import android.os.AsyncTask;
 
+import org.chromium.base.ContextUtils;
 import org.chromium.base.ImportantFileWriterAndroid;
 import org.chromium.base.Log;
 import org.chromium.base.ThreadUtils;
@@ -38,72 +38,46 @@
     /** Used for logging. */
     private static final String TAG = "CookiesFetcher";
 
-    /** Native-side pointer. */
-    private final long mNativeCookiesFetcher;
-
-    private final Context mContext;
-
-    /**
-     * Creates a new fetcher that can use to fetch cookies from cookie jar
-     * or from a file.
-     *
-     * The lifetime of this object is handled internally. Callers only call
-     * the public static methods which construct a CookiesFetcher object.
-     * It remains alive only during the static call or when it is still
-     * waiting for a callback to be invoked. In the latter case, the native
-     * counter part will hold a strong reference to this Java class so the GC
-     * would not collect it until the callback has been invoked.
-     */
-    private CookiesFetcher(Context context) {
-        // Native side is responsible for destroying itself under all code paths.
-        mNativeCookiesFetcher = nativeInit();
-        mContext = context.getApplicationContext();
-    }
+    private CookiesFetcher() {}
 
     /**
      * Fetches the cookie file's path on demand to prevent IO on the main thread.
      *
      * @return Path to the cookie file.
      */
-    private static String fetchFileName(Context context) {
+    private static String fetchFileName() {
         assert !ThreadUtils.runningOnUiThread();
-        return context.getFileStreamPath(DEFAULT_COOKIE_FILE_NAME).getAbsolutePath();
+        return ContextUtils.getApplicationContext()
+                .getFileStreamPath(DEFAULT_COOKIE_FILE_NAME)
+                .getAbsolutePath();
     }
 
     /**
      * Asynchronously fetches cookies from the incognito profile and saves them to a file.
-     *
-     * @param context Context for accessing the file system.
      */
-    public static void persistCookies(Context context) {
+    public static void persistCookies() {
         try {
-            new CookiesFetcher(context).persistCookiesInternal();
+            nativePersistCookies();
         } catch (RuntimeException e) {
             e.printStackTrace();
         }
     }
 
-    private void persistCookiesInternal() {
-        nativePersistCookies(mNativeCookiesFetcher);
-    }
-
     /**
      * If an incognito profile exists, synchronously fetch cookies from the file specified and
-     * populate the incognito profile with it.  Otherwise deletes the file and does not restore the
+     * populate the incognito profile with it. Otherwise deletes the file and does not restore the
      * cookies.
-     *
-     * @param context Context for accessing the file system.
      */
-    public static void restoreCookies(Context context) {
+    public static void restoreCookies() {
         try {
-            if (deleteCookiesIfNecessary(context)) return;
-            restoreCookiesInternal(context);
+            if (deleteCookiesIfNecessary()) return;
+            restoreCookiesInternal();
         } catch (RuntimeException e) {
             e.printStackTrace();
         }
     }
 
-    private static void restoreCookiesInternal(final Context context) {
+    private static void restoreCookiesInternal() {
         new AsyncTask<Void, Void, List<CanonicalCookie>>() {
             @Override
             protected List<CanonicalCookie> doInBackground(Void... voids) {
@@ -116,7 +90,7 @@
                         // Something is wrong. Can't encrypt, don't restore cookies.
                         return cookies;
                     }
-                    File fileIn = new File(fetchFileName(context));
+                    File fileIn = new File(fetchFileName());
                     if (!fileIn.exists()) return cookies; // Nothing to read
 
                     FileInputStream streamIn = new FileInputStream(fileIn);
@@ -125,7 +99,7 @@
 
                     // The Cookie File should not be restored again. It'll be overwritten
                     // on the next onPause.
-                    scheduleDeleteCookiesFile(context);
+                    scheduleDeleteCookiesFile();
 
                 } catch (IOException e) {
                     Log.w(TAG, "IOException during Cookie Restore", e);
@@ -159,13 +133,12 @@
     /**
      * Ensure the incognito cookies are deleted when the incognito profile is gone.
      *
-     * @param context Context for accessing the file system.
      * @return Whether or not the cookies were deleted.
      */
-    public static boolean deleteCookiesIfNecessary(Context context) {
+    public static boolean deleteCookiesIfNecessary() {
         try {
             if (Profile.getLastUsedProfile().hasOffTheRecordProfile()) return false;
-            scheduleDeleteCookiesFile(context);
+            scheduleDeleteCookiesFile();
         } catch (RuntimeException e) {
             e.printStackTrace();
             return false;
@@ -176,11 +149,11 @@
     /**
      * Delete the cookies file. Called when we detect that all incognito tabs have been closed.
      */
-    private static void scheduleDeleteCookiesFile(final Context context) {
+    private static void scheduleDeleteCookiesFile() {
         new AsyncTask<Void, Void, Void>() {
             @Override
             protected Void doInBackground(Void... voids) {
-                File cookiesFile = new File(fetchFileName(context));
+                File cookiesFile = new File(fetchFileName());
                 if (cookiesFile.exists()) {
                     if (!cookiesFile.delete()) {
                         Log.e(TAG, "Failed to delete " + cookiesFile.getName());
@@ -192,15 +165,15 @@
     }
 
     @CalledByNative
-    private CanonicalCookie createCookie(String name, String value, String domain, String path,
-            long creation, long expiration, long lastAccess, boolean secure, boolean httpOnly,
-            int sameSite, int priority) {
+    private static CanonicalCookie createCookie(String name, String value, String domain,
+            String path, long creation, long expiration, long lastAccess, boolean secure,
+            boolean httpOnly, int sameSite, int priority) {
         return new CanonicalCookie(name, value, domain, path, creation, expiration, lastAccess,
                 secure, httpOnly, sameSite, priority);
     }
 
     @CalledByNative
-    private void onCookieFetchFinished(final CanonicalCookie[] cookies) {
+    private static void onCookieFetchFinished(final CanonicalCookie[] cookies) {
         // Cookies fetching requires operations with the profile and must be
         // done in the main thread. Once that is done, do the save to disk
         // part in {@link AsyncTask} to avoid strict mode violations.
@@ -213,7 +186,7 @@
         }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
     }
 
-    private void saveFetchedCookiesToDisk(CanonicalCookie[] cookies) {
+    private static void saveFetchedCookiesToDisk(CanonicalCookie[] cookies) {
         DataOutputStream out = null;
         try {
             Cipher cipher = CipherFactory.getInstance().getCipher(Cipher.ENCRYPT_MODE);
@@ -228,8 +201,7 @@
             out = new DataOutputStream(cipherOut);
             CanonicalCookie.saveListToStream(out, cookies);
             out.close();
-            ImportantFileWriterAndroid.writeFileAtomically(
-                    fetchFileName(mContext), byteOut.toByteArray());
+            ImportantFileWriterAndroid.writeFileAtomically(fetchFileName(), byteOut.toByteArray());
             out = null;
         } catch (IOException e) {
             Log.w(TAG, "IOException during Cookie Fetch");
@@ -245,12 +217,11 @@
     }
 
     @CalledByNative
-    private CanonicalCookie[] createCookiesArray(int size) {
+    private static CanonicalCookie[] createCookiesArray(int size) {
         return new CanonicalCookie[size];
     }
 
-    private native long nativeInit();
-    private native void nativePersistCookies(long nativeCookiesFetcher);
+    private static native void nativePersistCookies();
     private static native void nativeRestoreCookies(String name, String value, String domain,
             String path, long creation, long expiration, long lastAccess, boolean secure,
             boolean httpOnly, int sameSite, int priority);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
index 22dd11ab..9fac2bd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -47,7 +47,6 @@
 import android.view.inputmethod.InputMethodManager;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 
@@ -161,7 +160,6 @@
     protected TintedImageButton mDeleteButton;
     protected TintedImageButton mMicButton;
     protected UrlBar mUrlBar;
-    private LinearLayout mUrlActionContainer;
 
     /** A handle to the bottom sheet for chrome home. */
     protected BottomSheet mBottomSheet;
@@ -722,8 +720,6 @@
         mSuggestionListAdapter = new OmniboxResultsAdapter(getContext(), this, mSuggestionItems);
 
         mMicButton = (TintedImageButton) findViewById(R.id.mic_button);
-
-        mUrlActionContainer = (LinearLayout) findViewById(R.id.url_action_container);
     }
 
     @Override
@@ -1538,21 +1534,22 @@
             }
         }
 
+        assert urlContainerChildIndex != -1;
+        int urlContainerMarginEnd = 0;
+
         // When Chrome Home is enabled, the URL actions container slides out of view during the
         // URL defocus animation. Adding margin during this animation creates a hole.
         boolean addMarginForActionsContainer =
-                (mBottomSheet == null || !mUrlFocusChangeInProgress || mUrlHasFocus)
-                && mUrlActionContainer.getVisibility() != GONE;
-        int urlContainerMarginEnd = 0;
+                mBottomSheet == null || !mUrlFocusChangeInProgress || mUrlHasFocus;
         if (addMarginForActionsContainer) {
-            for (int i = 0; i < mUrlActionContainer.getChildCount(); i++) {
-                View button = mUrlActionContainer.getChildAt(i);
-                LinearLayout.LayoutParams buttonLayoutParams =
-                        (LinearLayout.LayoutParams) button.getLayoutParams();
-                if (button.getVisibility() != GONE) {
-                    urlContainerMarginEnd += buttonLayoutParams.width
-                            + ApiCompatibilityUtils.getMarginStart(buttonLayoutParams)
-                            + ApiCompatibilityUtils.getMarginEnd(buttonLayoutParams);
+            for (int i = urlContainerChildIndex + 1; i < getChildCount(); i++) {
+                View childView = getChildAt(i);
+                if (childView.getVisibility() != GONE) {
+                    LayoutParams childLayoutParams = (LayoutParams) childView.getLayoutParams();
+                    urlContainerMarginEnd = Math.max(urlContainerMarginEnd,
+                            childLayoutParams.width
+                                    + ApiCompatibilityUtils.getMarginStart(childLayoutParams)
+                                    + ApiCompatibilityUtils.getMarginEnd(childLayoutParams));
                 }
             }
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/profiles/Profile.java b/chrome/android/java/src/org/chromium/chrome/browser/profiles/Profile.java
index fd5c15c2..d1356fb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/profiles/Profile.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/profiles/Profile.java
@@ -4,9 +4,6 @@
 
 package org.chromium.chrome.browser.profiles;
 
-import android.content.Context;
-
-import org.chromium.base.ContextUtils;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.CalledByNative;
 import org.chromium.base.library_loader.LibraryProcessType;
@@ -88,8 +85,7 @@
         mNativeProfileAndroid = 0;
 
         if (mIsOffTheRecord) {
-            Context context = ContextUtils.getApplicationContext();
-            CookiesFetcher.deleteCookiesIfNecessary(context);
+            CookiesFetcher.deleteCookiesIfNecessary();
         }
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
index aac1008..a7de78bf1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
@@ -415,6 +415,7 @@
 
     private void initializeImeForVr() {
         assert mTab != null;
+        if (mTab.getWebContents() == null) return;
         ImeAdapter imeAdapter = ImeAdapter.fromWebContents(mTab.getWebContents());
         if (imeAdapter != null) {
             imeAdapter.setInputMethodManagerWrapper(
@@ -424,6 +425,7 @@
 
     private void uninitializeImeForVr() {
         assert mTab != null;
+        if (mTab.getWebContents() == null) return;
         ImeAdapter imeAdapter = ImeAdapter.fromWebContents(mTab.getWebContents());
         if (imeAdapter != null) {
             imeAdapter.setInputMethodManagerWrapper(
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd
index 068d12b..67fd36e 100644
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -746,8 +746,8 @@
            Note: these strings should only be used by Google Chrome, but
                  omitting them brings up a hash collision error. -->
       <if expr="is_win">
-        <message name="IDS_CHROME_CLEANUP_PROMPT_EXPLANATION" desc="Description in the Chrome Cleanup dialog that Chrome browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is found on the user's computer. Appears under the title asking 'Remove harmful software?' Actor is Chrome; we are asking, Do you want Chrome to remove harmful software? 'it' is harmful software. User has the option of clicking 'Remove' to proceed with a cleanup, or 'Details' to see more details. Preferrably, the translation for this string should have the same meaning as IDS_SETTINGS_RESET_CLEANUP_EXPLANATION.">
-          Chromium found harmful software on your computer. Chromium can remove it and restore your settings to make your browser work normally again.
+        <message name="IDS_CHROME_CLEANUP_PROMPT_EXPLANATION" desc="Description in the Chrome Cleanup dialog that Chromium browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is found on the user's computer. Appears under the title asking 'Remove harmful software?' Actor is Chromium; we are asking, Do you want Chromium to remove harmful software? 'it' is harmful software. User has the option of clicking 'Remove' to proceed with a cleanup, or 'Details' to see more details. The description is also shown on the Chrome Cleanup section of the Settings page, under 'Remove harmful software' title. Preferrably, the translation for this string should parallel IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_CURRENTLY_REMOVING.">
+          There's harmful software on your computer. Chromium can remove it and restore your settings to make your browser work normally again.
         </message>
       </if>
 
@@ -1249,11 +1249,12 @@
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_DAYS" desc="The title of a dialog that tells users the browser must be relaunched within two or more days.">
           {0, plural,
+           =1 {Relaunch Chromium within a day}}
            other {Relaunch Chromium within # days}}
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_HOURS" desc="The title of a dialog that tells users the browser must be relaunched within one or more hours.">
           {0, plural,
-           =1 {Chromium will relaunch in 1 hour}
+           =1 {Chromium will relaunch in an hour}
            other {Chromium will relaunch in # hours}}
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_MINUTES" desc="The title of a dialog that tells users the browser must be relaunched within one or more minutes.">
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd
index 0cc8777..d3341d0 100644
--- a/chrome/app/google_chrome_strings.grd
+++ b/chrome/app/google_chrome_strings.grd
@@ -754,8 +754,8 @@
 
       <!-- Chrome Cleanup prompt -->
       <if expr="is_win">
-        <message name="IDS_CHROME_CLEANUP_PROMPT_EXPLANATION" desc="Description in the Chrome Cleanup dialog that Chrome browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is found on the user's computer. Appears under the title asking 'Remove harmful software?' Actor is Chrome; we are asking, Do you want Chrome to remove harmful software? 'it' is harmful software. User has the option of clicking 'Remove' to proceed with a cleanup, or 'Details' to see more details. Preferrably, the translation for this string should match IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_REMOVE.">
-          Chrome found harmful software on your computer. Chrome can remove it and restore your settings to make your browser work normally again.
+        <message name="IDS_CHROME_CLEANUP_PROMPT_EXPLANATION" desc="Description in the Chrome Cleanup dialog that Chrome browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is found on the user's computer. Appears under the title asking 'Remove harmful software?' Actor is Chrome; we are asking, Do you want Chrome to remove harmful software? 'it' is harmful software. User has the option of clicking 'Remove' to proceed with a cleanup, or 'Details' to see more details. The description is also shown on the Chrome Cleanup section of the Settings page, under 'Remove harmful software' title. Preferrably, the translation for this string should parallel IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_CURRENTLY_REMOVING.">
+          There's harmful software on your computer. Chrome can remove it and restore your settings to make your browser work normally again.
         </message>
       </if>
 
@@ -1266,11 +1266,12 @@
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_DAYS" desc="The title of a dialog that tells users the browser must be relaunched within two or more days.">
           {0, plural,
+           =1 {Relaunch Chrome within a day}
            other {Relaunch Chrome within # days}}
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_HOURS" desc="The title of a dialog that tells users the browser must be relaunched within one or more hours.">
           {0, plural,
-           =1 {Chrome will relaunch in 1 hour}
+           =1 {Chrome will relaunch in an hour}
            other {Chrome will relaunch in # hours}}
         </message>
         <message name="IDS_RELAUNCH_REQUIRED_TITLE_MINUTES" desc="The title of a dialog that tells users the browser must be relaunched within one or more minutes.">
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index b8e750a..cefe6d0 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3833,8 +3833,8 @@
     <message name="IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_PERMISSIONS_NEEDED" desc="Body of error message that could appear during the cleanup of harmful software. Imperative. ">
       Click Try Again, and accept the prompt on your computer
     </message>
-    <message name="IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_REMOVE" desc="Description in the Chrome Cleanup web page that Chrome browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is found on the user's computer. Appears under the title asking 'Remove harmful software.' Actor is Chrome; we are asking, Do you want Chrome to remove harmful software? 'it' is harmful software. The user can click 'Remove' to proceed with a cleanup. Preferrably, the translation for this string should match IDS_CHROME_CLEANUP_PROMPT_EXPLANATION.">
-      Chrome found harmful software on your computer. Chrome can remove it and restore your settings to make your browser work normally again.
+    <message name="IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_CURRENTLY_REMOVING" desc="Description in the Chrome Cleanup web page that Chrome browser shows when unwanted software, like ad injectors or software that changes the user's settings without their knowledge, is being removed by Chrome from the user's computer. Appears under the title 'Removing harmful software...' Actor is Chrome; we are indicating that harmful software is currently being removed. 'it' is harmful software. Preferrably, the translation for this string should parallel IDS_CHROME_CLEANUP_PROMPT_EXPLANATION.">
+      There's harmful software on your computer. Chrome is removing it and will restore your settings to make your browser work normally again.
     </message>
     <message name="IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_SCAN_ERROR" desc="Body of error message that could appear during the cleanup of harmful software.">
       An error occurred while Chrome was searching for harmful software
@@ -3858,7 +3858,7 @@
       Done! Harmful software removed.
     </message>
     <message name="IDS_SETTINGS_RESET_CLEANUP_TITLE_ERROR_CANT_REMOVE" desc="An error message, appearing on the Chrome Cleanup web page, that Chrome tried to clean up unwanted software, as requested by the user, but was unsuccessful. Omits subject, i.e. Chrome can't remove harmful software.">
-      Can't remove harmful software
+      Cleanup failed
     </message>
     <message name="IDS_SETTINGS_RESET_CLEANUP_TITLE_ERROR_PERMISSIONS_NEEDED" desc="Title of error message that could appear during the cleanup of harmful software. 'permission' refers to the user granting permission, e.g. from an operating system prompt, before the cleanup operation can continue.">
       Chrome needs permission to continue
@@ -3888,7 +3888,7 @@
       Checking for harmful software...
     </message>
     <message name="IDS_SETTINGS_RESET_CLEANUP_TITLE_ERROR_SCANNING_FAILED" desc="Title of error message that could appear during the cleanup of harmful software.">
-      Scanning failed
+      Search failed
     </message>
     <message name="IDS_SETTINGS_RESET_CLEANUP_TRY_AGAIN_BUTTON_LABEL" desc="Generic button that appears next to a message indicating that an operation failed during the cleanup of harmful software." meaning="Button referred to in the string 'Click Try Again, and accept the prompt on your computer', IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_PERMISSIONS_NEEDED">
       Try again
diff --git a/chrome/app/vector_icons/usb_security_key.icon b/chrome/app/vector_icons/usb_security_key.icon
index de8dcf0c..c8110ea3 100644
--- a/chrome/app/vector_icons/usb_security_key.icon
+++ b/chrome/app/vector_icons/usb_security_key.icon
@@ -2,15 +2,30 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-CANVAS_DIMENSIONS, 45,
-ROUND_RECT, 0.23f, 14.75f, 31.56f, 15.01f, 0,
-ROUND_RECT, 31.05f, 16.79f, 13.63f, 10.94f, 0,
-ROUND_RECT, 34.31f, 17.75f, 9.69f, 1.92f, 0,
-ROUND_RECT, 34.31f, 24.95f, 9.79f, 1.92f, 0,
-ROUND_RECT, 34.31f, 20.15f, 8.45f, 1.92f, 0,
-ROUND_RECT, 34.31f, 22.55f, 8.45f, 1.92f, 0,
-MOVE_TO, 19.72f, 22.07f,
-R_ARC_TO, 3.94f, 3.94f, 0, 1, 1, -7.87f, 0,
-R_ARC_TO, 3.94f, 3.94f, 0, 0, 1, 7.87f, 0,
+CANVAS_DIMENSIONS, 4,
+MOVE_TO, 0.34f, 3.5f,
+R_H_LINE_TO, 3.03f,
+R_ARC_TO, 0.35f, 0.35f, 0, 0, 0, 0.34f, -0.35f,
+V_LINE_TO, 0.68f,
+R_ARC_TO, 0.35f, 0.35f, 0, 0, 0, -0.34f, -0.35f,
+H_LINE_TO, 0.34f,
+ARC_TO, 0.35f, 0.35f, 0, 0, 0, 0, 0.68f,
+R_V_LINE_TO, 2.47f,
+R_CUBIC_TO, 0, 0.19f, 0.15f, 0.35f, 0.34f, 0.35f,
+CLOSE,
+R_MOVE_TO, 1.52f, -0.93f,
+R_H_LINE_TO, 1.32f,
+R_V_LINE_TO, 0.4f,
+H_LINE_TO, 1.85f,
+CLOSE,
+R_MOVE_TO, 0, -0.79f,
+R_H_LINE_TO, 1.32f,
+R_V_LINE_TO, 0.4f,
+H_LINE_TO, 1.85f,
+CLOSE,
+R_MOVE_TO, 0, -0.93f,
+R_H_LINE_TO, 1.32f,
+R_V_LINE_TO, 0.4f,
+H_LINE_TO, 1.85f,
 CLOSE,
 END
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index f8e3890..64643d83 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -770,7 +770,7 @@
     "net/loading_predictor_observer.cc",
     "net/loading_predictor_observer.h",
     "net/net_error_diagnostics_dialog.h",
-    "net/net_error_diagnostics_dialog_mac.cc",
+    "net/net_error_diagnostics_dialog_posix.cc",
     "net/net_error_diagnostics_dialog_win.cc",
     "net/net_error_tab_helper.cc",
     "net/net_error_tab_helper.h",
@@ -1941,8 +1941,7 @@
       "android/contextualsearch/ctr_suppression.h",
       "android/contextualsearch/resolved_search_term.cc",
       "android/contextualsearch/resolved_search_term.h",
-      "android/cookies/cookies_fetcher.cc",
-      "android/cookies/cookies_fetcher.h",
+      "android/cookies/cookies_fetcher_util.cc",
       "android/crash/pure_java_exception_handler.cc",
       "android/crash/pure_java_exception_handler.h",
       "android/customtabs/detached_resource_request.cc",
@@ -3102,8 +3101,6 @@
       "recovery/recovery_install_global_error_factory.cc",
       "recovery/recovery_install_global_error_factory.h",
     ]
-  } else {
-    sources += [ "net/net_error_diagnostics_dialog_generic.cc" ]
   }
 
   if (is_win || is_linux) {
@@ -3856,6 +3853,8 @@
       "plugins/plugin_prefs.h",
       "plugins/plugin_prefs_factory.cc",
       "plugins/plugin_prefs_factory.h",
+      "plugins/plugin_response_interceptor_url_loader_throttle.cc",
+      "plugins/plugin_response_interceptor_url_loader_throttle.h",
       "plugins/plugin_status_pref_setter.cc",
       "plugins/plugin_status_pref_setter.h",
       "plugins/plugin_utils.cc",
@@ -4733,8 +4732,6 @@
       "sessions/session_service_test_helper.h",
       "ui/tabs/tab_activity_simulator.cc",
       "ui/tabs/tab_activity_simulator.h",
-      "ui/tabs/tab_ukm_test_helper.cc",
-      "ui/tabs/tab_ukm_test_helper.h",
     ]
   }
 
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index f1ffdd7..5e3665d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3426,8 +3426,7 @@
      flag_descriptions::kEnableManualFallbacksFillingName,
      flag_descriptions::kEnableManualFallbacksFillingDescription,
      kOsDesktop | kOsAndroid,
-     FEATURE_VALUE_TYPE(
-         password_manager::features::kManualFallbacksFilling)},
+     FEATURE_VALUE_TYPE(password_manager::features::kManualFallbacksFilling)},
 
 #if !defined(OS_ANDROID)
     {"voice-search-on-local-ntp", flag_descriptions::kVoiceSearchOnLocalNtpName,
@@ -3615,7 +3614,7 @@
     {"ash-enable-keyboard-shortcut-viewer",
      flag_descriptions::kAshEnableKeyboardShortcutViewerName,
      flag_descriptions::kAshEnableKeyboardShortcutViewerDescription, kOsCrOS,
-     SINGLE_VALUE_TYPE(ash::switches::kAshEnableKeyboardShortcutViewer)},
+     FEATURE_VALUE_TYPE(ash::features::kKeyboardShortcutViewer)},
 
     {"ash-disable-login-dim-and-blur",
      flag_descriptions::kAshDisableLoginDimAndBlurName,
diff --git a/chrome/browser/android/cookies/cookies_fetcher.cc b/chrome/browser/android/cookies/cookies_fetcher.cc
deleted file mode 100644
index 83b27976..0000000
--- a/chrome/browser/android/cookies/cookies_fetcher.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/cookies/cookies_fetcher.h"
-
-#include "base/android/jni_android.h"
-#include "base/android/jni_string.h"
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/time/time.h"
-#include "chrome/browser/profiles/profile_manager.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/storage_partition.h"
-#include "content/public/common/content_switches.h"
-#include "jni/CookiesFetcher_jni.h"
-#include "net/url_request/url_request_context.h"
-#include "services/network/public/mojom/cookie_manager.mojom.h"
-
-using base::android::JavaParamRef;
-using base::android::ScopedJavaLocalRef;
-
-namespace {
-
-// Returns the cookie service at the client end of the mojo pipe.
-network::mojom::CookieManager* GetCookieServiceClient() {
-  return content::BrowserContext::GetDefaultStoragePartition(
-             ProfileManager::GetPrimaryUserProfile()->GetOffTheRecordProfile())
-      ->GetCookieManagerForBrowserProcess();
-}
-
-}  // namespace
-
-CookiesFetcher::CookiesFetcher() = default;
-
-CookiesFetcher::~CookiesFetcher() = default;
-
-void CookiesFetcher::PersistCookies(JNIEnv* env,
-                                    const JavaParamRef<jobject>& obj) {
-  if (!ProfileManager::GetPrimaryUserProfile()->HasOffTheRecordProfile()) {
-    // There is no work to be done. We might consider calling
-    // the Java callback if needed.
-    return;
-  }
-
-  // Take a strong global reference to the Java counter part and hold
-  // on to it. This ensures the object would not be GC'd so we can call
-  // the Java callback.
-  jobject_.Reset(env, obj);
-
-  GetCookieServiceClient()->GetAllCookies(
-      base::Bind(&CookiesFetcher::OnCookiesFetchFinished, base::Owned(this)));
-}
-
-void CookiesFetcher::OnCookiesFetchFinished(const net::CookieList& cookies) {
-  JNIEnv* env = base::android::AttachCurrentThread();
-
-  ScopedJavaLocalRef<jobjectArray> joa =
-      Java_CookiesFetcher_createCookiesArray(env, jobject_, cookies.size());
-
-  int index = 0;
-  for (net::CookieList::const_iterator i = cookies.begin();
-      i != cookies.end(); ++i) {
-    std::string domain = i->Domain();
-    if (domain.length() > 1 && domain[0] == '.')
-      domain = domain.substr(1);
-    ScopedJavaLocalRef<jobject> java_cookie = Java_CookiesFetcher_createCookie(
-        env, jobject_, base::android::ConvertUTF8ToJavaString(env, i->Name()),
-        base::android::ConvertUTF8ToJavaString(env, i->Value()),
-        base::android::ConvertUTF8ToJavaString(env, i->Domain()),
-        base::android::ConvertUTF8ToJavaString(env, i->Path()),
-        i->CreationDate().ToInternalValue(), i->ExpiryDate().ToInternalValue(),
-        i->LastAccessDate().ToInternalValue(), i->IsSecure(), i->IsHttpOnly(),
-        static_cast<int>(i->SameSite()), i->Priority());
-    env->SetObjectArrayElement(joa.obj(), index++, java_cookie.obj());
-  }
-
-  Java_CookiesFetcher_onCookieFetchFinished(env, jobject_, joa);
-}
-
-static void JNI_CookiesFetcher_RestoreCookies(
-    JNIEnv* env,
-    const JavaParamRef<jclass>& jcaller,
-    const JavaParamRef<jstring>& name,
-    const JavaParamRef<jstring>& value,
-    const JavaParamRef<jstring>& domain,
-    const JavaParamRef<jstring>& path,
-    jlong creation,
-    jlong expiration,
-    jlong last_access,
-    jboolean secure,
-    jboolean httponly,
-    jint same_site,
-    jint priority) {
-  if (!ProfileManager::GetPrimaryUserProfile()->HasOffTheRecordProfile()) {
-    return;  // Don't create it. There is nothing to do.
-  }
-
-  std::unique_ptr<net::CanonicalCookie> cookie(
-      std::make_unique<net::CanonicalCookie>(
-          base::android::ConvertJavaStringToUTF8(env, name),
-          base::android::ConvertJavaStringToUTF8(env, value),
-          base::android::ConvertJavaStringToUTF8(env, domain),
-          base::android::ConvertJavaStringToUTF8(env, path),
-          base::Time::FromInternalValue(creation),
-          base::Time::FromInternalValue(expiration),
-          base::Time::FromInternalValue(last_access), secure, httponly,
-          static_cast<net::CookieSameSite>(same_site),
-          static_cast<net::CookiePriority>(priority)));
-
-  // Assume HTTPS - since the cookies are being restored from another store,
-  // they have already gone through the strict secure check.
-  GetCookieServiceClient()->SetCanonicalCookie(
-      *cookie, true /* secure_source */, true /* modify_http_only */,
-      network::mojom::CookieManager::SetCanonicalCookieCallback());
-}
-
-// JNI functions
-static jlong JNI_CookiesFetcher_Init(JNIEnv* env,
-                                     const JavaParamRef<jobject>& obj) {
-  return reinterpret_cast<intptr_t>(new CookiesFetcher());
-}
diff --git a/chrome/browser/android/cookies/cookies_fetcher.h b/chrome/browser/android/cookies/cookies_fetcher.h
deleted file mode 100644
index 6f87d32a..0000000
--- a/chrome/browser/android/cookies/cookies_fetcher.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_ANDROID_COOKIES_COOKIES_FETCHER_H_
-#define CHROME_BROWSER_ANDROID_COOKIES_COOKIES_FETCHER_H_
-
-#include <stdint.h>
-
-#include "base/android/jni_weak_ref.h"
-#include "base/android/scoped_java_ref.h"
-#include "base/macros.h"
-#include "net/cookies/canonical_cookie.h"
-#include "net/url_request/url_request_context_getter.h"
-
-// This class can be used to retrieve an array of cookies from the cookie jar
-// as well as insert an array of cookies into it. This class is the underlying
-// glue that interacts with CookiesFetcher.java and its lifetime is governed by
-// the Java counter part.
-class CookiesFetcher {
- public:
-  // Constructs a fetcher that can interact with the cookie jar.
-  CookiesFetcher();
-
-  ~CookiesFetcher();
-
-  // Fetches all cookies from the cookie jar.
-  void PersistCookies(JNIEnv* env,
-                      const base::android::JavaParamRef<jobject>& obj);
-
- private:
-  // Callback used after the cookie jar populate the cookie list for us.
-  void OnCookiesFetchFinished(const net::CookieList& cookies);
-
-  base::android::ScopedJavaGlobalRef<jobject> jobject_;
-
-  DISALLOW_COPY_AND_ASSIGN(CookiesFetcher);
-};
-
-#endif // CHROME_BROWSER_ANDROID_COOKIES_COOKIES_FETCHER_H_
diff --git a/chrome/browser/android/cookies/cookies_fetcher_util.cc b/chrome/browser/android/cookies/cookies_fetcher_util.cc
new file mode 100644
index 0000000..c278a09
--- /dev/null
+++ b/chrome/browser/android/cookies/cookies_fetcher_util.cc
@@ -0,0 +1,118 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "base/bind.h"
+#include "base/command_line.h"
+#include "base/time/time.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
+#include "content/public/common/content_switches.h"
+#include "jni/CookiesFetcher_jni.h"
+#include "net/url_request/url_request_context.h"
+#include "services/network/public/mojom/cookie_manager.mojom.h"
+
+using base::android::JavaParamRef;
+using base::android::ScopedJavaLocalRef;
+
+namespace {
+
+// Returns the cookie service at the client end of the mojo pipe.
+network::mojom::CookieManager* GetCookieServiceClient() {
+  return content::BrowserContext::GetDefaultStoragePartition(
+             ProfileManager::GetPrimaryUserProfile()->GetOffTheRecordProfile())
+      ->GetCookieManagerForBrowserProcess();
+}
+
+// Passes the fetched |cookies| to the application so that can be saved in a
+// file.
+void OnCookiesFetchFinished(const net::CookieList& cookies) {
+  JNIEnv* env = base::android::AttachCurrentThread();
+
+  ScopedJavaLocalRef<jobjectArray> joa =
+      Java_CookiesFetcher_createCookiesArray(env, cookies.size());
+
+  int index = 0;
+  for (auto i = cookies.cbegin(); i != cookies.cend(); ++i) {
+    std::string domain = i->Domain();
+    if (domain.length() > 1 && domain[0] == '.')
+      domain = domain.substr(1);
+    ScopedJavaLocalRef<jobject> java_cookie = Java_CookiesFetcher_createCookie(
+        env, base::android::ConvertUTF8ToJavaString(env, i->Name()),
+        base::android::ConvertUTF8ToJavaString(env, i->Value()),
+        base::android::ConvertUTF8ToJavaString(env, i->Domain()),
+        base::android::ConvertUTF8ToJavaString(env, i->Path()),
+        i->CreationDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
+        i->ExpiryDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
+        i->LastAccessDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
+        i->IsSecure(), i->IsHttpOnly(), static_cast<int>(i->SameSite()),
+        i->Priority());
+    env->SetObjectArrayElement(joa.obj(), index++, java_cookie.obj());
+  }
+
+  Java_CookiesFetcher_onCookieFetchFinished(env, joa);
+}
+
+}  // namespace
+
+// Fetches cookies for the off-the-record session (i.e. incognito mode). It is a
+// no-op for the standard session. Typically associated with the #onPause of
+// Android's activty lifecycle.
+void JNI_CookiesFetcher_PersistCookies(JNIEnv* env,
+                                       const JavaParamRef<jclass>& jcaller) {
+  if (!ProfileManager::GetPrimaryUserProfile()->HasOffTheRecordProfile()) {
+    // There is no work to be done. We might consider calling
+    // the Java callback if needed.
+    return;
+  }
+
+  GetCookieServiceClient()->GetAllCookies(
+      base::BindOnce(&OnCookiesFetchFinished));
+}
+
+// Creates and sets a canonical cookie for the off-the-record session (i.e.
+// incognito mode). It is a no-op for the standard session. Typically associated
+// with the #onResume of Android's activty lifecycle.
+static void JNI_CookiesFetcher_RestoreCookies(
+    JNIEnv* env,
+    const JavaParamRef<jclass>& jcaller,
+    const JavaParamRef<jstring>& name,
+    const JavaParamRef<jstring>& value,
+    const JavaParamRef<jstring>& domain,
+    const JavaParamRef<jstring>& path,
+    jlong creation,
+    jlong expiration,
+    jlong last_access,
+    jboolean secure,
+    jboolean httponly,
+    jint same_site,
+    jint priority) {
+  if (!ProfileManager::GetPrimaryUserProfile()->HasOffTheRecordProfile()) {
+    return;  // Don't create it. There is nothing to do.
+  }
+
+  std::unique_ptr<net::CanonicalCookie> cookie(
+      std::make_unique<net::CanonicalCookie>(
+          base::android::ConvertJavaStringToUTF8(env, name),
+          base::android::ConvertJavaStringToUTF8(env, value),
+          base::android::ConvertJavaStringToUTF8(env, domain),
+          base::android::ConvertJavaStringToUTF8(env, path),
+          base::Time::FromDeltaSinceWindowsEpoch(
+              base::TimeDelta::FromMicroseconds(creation)),
+          base::Time::FromDeltaSinceWindowsEpoch(
+              base::TimeDelta::FromMicroseconds(expiration)),
+          base::Time::FromDeltaSinceWindowsEpoch(
+              base::TimeDelta::FromMicroseconds(last_access)),
+          secure, httponly, static_cast<net::CookieSameSite>(same_site),
+          static_cast<net::CookiePriority>(priority)));
+
+  // Assume HTTPS - since the cookies are being restored from another store,
+  // they have already gone through the strict secure check.
+  GetCookieServiceClient()->SetCanonicalCookie(
+      *cookie, true /* secure_source */, true /* modify_http_only */,
+      network::mojom::CookieManager::SetCanonicalCookieCallback());
+}
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index e7a7440..6426433 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -1326,7 +1326,13 @@
 #if defined(USE_AURA)
 // Test validates that select tag can be shown and hidden in webview safely
 // using quick touch.
-IN_PROC_BROWSER_TEST_P(WebViewTest, SelectShowHide) {
+// Very high timeout rate under Linux MSAN; see https://crbug.com/818161.
+#if defined(OS_LINUX) && defined(MEMORY_SANITIZER)
+#define MAYBE_SelectShowHide DISABLED_SelectShowHide
+#else
+#define MAYBE_SelectShowHide SelectShowHide
+#endif
+IN_PROC_BROWSER_TEST_P(WebViewTest, MAYBE_SelectShowHide) {
   LoadAppWithGuest("web_view/select");
 
   content::WebContents* embedder_contents = GetFirstAppWindowWebContents();
diff --git a/chrome/browser/background_fetch/background_fetch_browsertest.cc b/chrome/browser/background_fetch/background_fetch_browsertest.cc
new file mode 100644
index 0000000..e836d0ea
--- /dev/null
+++ b/chrome/browser/background_fetch/background_fetch_browsertest.cc
@@ -0,0 +1,168 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "base/run_loop.h"
+#include "chrome/browser/download/download_service_factory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "chrome/test/base/ui_test_utils.h"
+#include "components/download/public/background_service/download_service.h"
+#include "components/download/public/background_service/logger.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
+#include "content/public/test/browser_test_utils.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
+
+namespace {
+
+// URL of the test helper page that helps drive these tests.
+const char kHelperPage[] = "/background_fetch/background_fetch.html";
+
+// Name of the Background Fetch client as known by the download service.
+const char kBackgroundFetchClient[] = "BackgroundFetch";
+
+// Stringified values of request services made to the download service.
+const char kResultAccepted[] = "ACCEPTED";
+
+// Implementation of a download system logger that provides the ability to wait
+// for certain events to happen, notably added and progressing downloads.
+class WaitableDownloadLoggerObserver : public download::Logger::Observer {
+ public:
+  using DownloadAcceptedCallback =
+      base::OnceCallback<void(const std::string& guid)>;
+
+  WaitableDownloadLoggerObserver() = default;
+  ~WaitableDownloadLoggerObserver() override = default;
+
+  // Sets the |callback| to be invoked when a download has been accepted.
+  void set_download_accepted_callback(DownloadAcceptedCallback callback) {
+    download_accepted_callback_ = std::move(callback);
+  }
+
+  // download::Logger::Observer implementation:
+  void OnServiceStatusChanged(const base::Value& service_status) override {}
+  void OnServiceDownloadsAvailable(
+      const base::Value& service_downloads) override {}
+  void OnServiceDownloadChanged(const base::Value& service_download) override {}
+  void OnServiceDownloadFailed(const base::Value& service_download) override {}
+  void OnServiceRequestMade(const base::Value& service_request) override {
+    const std::string& client = service_request.FindKey("client")->GetString();
+    const std::string& guid = service_request.FindKey("guid")->GetString();
+    const std::string& result = service_request.FindKey("result")->GetString();
+
+    if (client != kBackgroundFetchClient)
+      return;  // this event is not targeted to us
+
+    if (result == kResultAccepted)
+      std::move(download_accepted_callback_).Run(guid);
+  }
+
+ private:
+  DownloadAcceptedCallback download_accepted_callback_;
+
+  DISALLOW_COPY_AND_ASSIGN(WaitableDownloadLoggerObserver);
+};
+
+class BackgroundFetchBrowserTest : public InProcessBrowserTest {
+ public:
+  BackgroundFetchBrowserTest() = default;
+  ~BackgroundFetchBrowserTest() override = default;
+
+  // InProcessBrowserTest overrides:
+  void SetUpCommandLine(base::CommandLine* command_line) override {
+    // Background Fetch is available as an experimental Web Platform feature.
+    command_line->AppendSwitch(
+        switches::kEnableExperimentalWebPlatformFeatures);
+  }
+
+  void SetUpOnMainThread() override {
+    https_server_ = std::make_unique<net::EmbeddedTestServer>(
+        net::EmbeddedTestServer::TYPE_HTTPS);
+    https_server_->ServeFilesFromSourceDirectory("chrome/test/data");
+    ASSERT_TRUE(https_server_->Start());
+
+    observer_ = std::make_unique<WaitableDownloadLoggerObserver>();
+
+    download_service_ =
+        DownloadServiceFactory::GetForBrowserContext(browser()->profile());
+    download_service_->GetLogger()->AddObserver(observer_.get());
+
+    // Load the helper page that helps drive these tests.
+    ui_test_utils::NavigateToURL(browser(), https_server_->GetURL(kHelperPage));
+
+    // Register the Service Worker that's required for Background Fetch. The
+    // behaviour without an activated worker is covered by layout tests.
+    {
+      std::string script_result;
+      ASSERT_TRUE(RunScript("RegisterServiceWorker()", &script_result));
+      ASSERT_EQ("ok - service worker registered", script_result);
+    }
+  }
+
+  void TearDownOnMainThread() override {
+    download_service_->GetLogger()->RemoveObserver(observer_.get());
+    download_service_ = nullptr;
+  }
+
+  // Runs the |script| in the current tab and writes the output to |*result|.
+  bool RunScript(const std::string& script, std::string* result) {
+    return content::ExecuteScriptAndExtractString(
+        browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(),
+        script, result);
+  }
+
+  // Runs the given |function| and asserts that it responds with "ok".
+  // Must be wrapped with ASSERT_NO_FATAL_FAILURE().
+  void RunScriptFunction(const std::string& function) {
+    std::string result;
+    ASSERT_TRUE(RunScript(function, &result));
+    ASSERT_EQ("ok", result);
+  }
+
+  // Callback for WaitableDownloadLoggerObserver::DownloadAcceptedCallback().
+  void DidAcceptDownloadCallback(base::OnceClosure quit_closure,
+                                 std::string* out_guid,
+                                 const std::string& guid) {
+    DCHECK(out_guid);
+    *out_guid = guid;
+
+    std::move(quit_closure).Run();
+  }
+
+ protected:
+  download::DownloadService* download_service_{nullptr};
+  std::unique_ptr<WaitableDownloadLoggerObserver> observer_;
+
+ private:
+  std::unique_ptr<net::EmbeddedTestServer> https_server_;
+
+  DISALLOW_COPY_AND_ASSIGN(BackgroundFetchBrowserTest);
+};
+
+IN_PROC_BROWSER_TEST_F(BackgroundFetchBrowserTest, DownloadSingleFile) {
+  // Starts a Background Fetch for a single to-be-downloaded file and waits for
+  // that request to be scheduled with the Download Service.
+
+  std::string guid;
+  {
+    base::RunLoop run_loop;
+    observer_->set_download_accepted_callback(
+        base::BindOnce(&BackgroundFetchBrowserTest::DidAcceptDownloadCallback,
+                       base::Unretained(this), run_loop.QuitClosure(), &guid));
+
+    ASSERT_NO_FATAL_FAILURE(RunScriptFunction("StartSingleFileDownload()"));
+    run_loop.Run();
+  }
+
+  EXPECT_FALSE(guid.empty());
+}
+
+}  // namespace
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 4a2a10e..d2916a7 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -407,6 +407,7 @@
 #if BUILDFLAG(ENABLE_PLUGINS)
 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h"
 #include "chrome/browser/plugins/flash_download_interception.h"
+#include "chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h"
 #endif
 
 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
@@ -3749,6 +3750,13 @@
     }
   }
 
+#if BUILDFLAG(ENABLE_PLUGINS)
+  if (network_service_enabled) {
+    result.push_back(
+        std::make_unique<PluginResponseInterceptorURLLoaderThrottle>(
+            resource_context, request.resource_type, frame_tree_node_id));
+  }
+#endif
   return result;
 }
 
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.cc b/chrome/browser/chromeos/arc/arc_service_launcher.cc
index 89b47ef..5df484a12 100644
--- a/chrome/browser/chromeos/arc/arc_service_launcher.cc
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -154,7 +154,10 @@
   ArcMetricsService::GetForBrowserContext(profile);
   ArcMidisBridge::GetForBrowserContext(profile);
   ArcNetHostImpl::GetForBrowserContext(profile);
-  ArcNotificationManager::GetForBrowserContext(profile);
+  // TODO(https://crbug.com/816441): Remove the callback workaround.
+  ArcNotificationManager::GetForBrowserContext(profile)
+      ->set_get_app_id_callback(
+          ArcAppListPrefs::Get(profile)->GetAppIdByPackageNameCallback());
   ArcObbMounterBridge::GetForBrowserContext(profile);
   ArcOemCryptoBridge::GetForBrowserContext(profile);
   ArcPolicyBridge::GetForBrowserContext(profile);
diff --git a/chrome/browser/chromeos/login/DEPS b/chrome/browser/chromeos/login/DEPS
index 430d17f..5daf5c89 100644
--- a/chrome/browser/chromeos/login/DEPS
+++ b/chrome/browser/chromeos/login/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+  "+ash/public/cpp",
   "+ash/public/interfaces",
   "+components/captive_portal",
   "+components/login",
diff --git a/chrome/browser/chromeos/login/eula_browsertest.cc b/chrome/browser/chromeos/login/eula_browsertest.cc
index b3a3bfa8..c858dc5 100644
--- a/chrome/browser/chromeos/login/eula_browsertest.cc
+++ b/chrome/browser/chromeos/login/eula_browsertest.cc
@@ -191,7 +191,8 @@
 
 // Tests that offline version is shown when the online version is not
 // accessible.
-IN_PROC_BROWSER_TEST_F(EulaTest, LoadOffline) {
+// Disabled due to flaky timeouts; https://crbug.com/817995.
+IN_PROC_BROWSER_TEST_F(EulaTest, DISABLED_LoadOffline) {
   set_allow_online_eula(false);
   ShowEulaScreen();
 
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
index 131208a9..083c05f4 100644
--- a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
@@ -11,6 +11,7 @@
 #include <utility>
 
 #include "ash/multi_profile_uma.h"
+#include "ash/public/cpp/ash_pref_names.h"
 #include "ash/public/interfaces/constants.mojom.h"
 #include "ash/public/interfaces/session_controller.mojom.h"
 #include "base/bind.h"
@@ -1022,6 +1023,15 @@
   WallpaperControllerClient::Get()->RemoveUserWallpaper(account_id);
   GetUserImageManager(account_id)->DeleteUserImage();
   ExternalPrintersFactory::Get()->RemoveForUserId(account_id);
+  // TODO(tbarzic): Forward data removal request to ash::HammerDeviceHandler,
+  // instead of removing the prefs value here.
+  if (GetLocalState()->FindPreference(ash::prefs::kDetachableBaseDevices)) {
+    DictionaryPrefUpdate update(GetLocalState(),
+                                ash::prefs::kDetachableBaseDevices);
+    update->RemoveKey(account_id.HasAccountIdKey()
+                          ? account_id.GetAccountIdKey()
+                          : account_id.GetUserEmail());
+  }
 
   supervised_user_manager_->RemoveNonCryptohomeData(account_id.GetUserEmail());
 
diff --git a/chrome/browser/client_hints/client_hints.cc b/chrome/browser/client_hints/client_hints.cc
index 2561fbc..afc02919 100644
--- a/chrome/browser/client_hints/client_hints.cc
+++ b/chrome/browser/client_hints/client_hints.cc
@@ -71,10 +71,8 @@
 
   blink::WebEnabledClientHints web_client_hints;
 
-  // Since this is a navigation request, |url| is also the URL of the document.
   GetAllowedClientHintsFromSource(
-      url /* resource url */, url.GetOrigin() /* document origin */,
-      client_hints_host_settings, &web_client_hints);
+      url /* resource url */, client_hints_host_settings, &web_client_hints);
 
   std::unique_ptr<net::HttpRequestHeaders> additional_headers(
       std::make_unique<net::HttpRequestHeaders>());
diff --git a/chrome/browser/client_hints/client_hints_browsertest.cc b/chrome/browser/client_hints/client_hints_browsertest.cc
index 2052a5a..ef80069 100644
--- a/chrome/browser/client_hints/client_hints_browsertest.cc
+++ b/chrome/browser/client_hints/client_hints_browsertest.cc
@@ -716,7 +716,7 @@
 }
 
 // Ensure that when the JavaScript is blocked, client hints requested using
-// Accept-CH are still attached to the request headers for subresources.
+// Accept-CH are not attached to the request headers for subresources.
 IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest,
                        ClientHintsNoLifetimeScriptNotAllowed) {
   base::HistogramTester histogram_tester;
@@ -727,8 +727,8 @@
                               &host_settings);
   EXPECT_EQ(0u, host_settings.size());
 
-  // Block the Javascript: Client hints should still be attached.
-  SetClientHintExpectationsOnSubresources(true);
+  // Block the Javascript: Client hints should not be attached.
+  SetClientHintExpectationsOnSubresources(false);
   HostContentSettingsMapFactory::GetForProfile(browser()->profile())
       ->SetContentSettingDefaultScope(
           accept_ch_without_lifetime_img_localhost(), GURL(),
@@ -736,12 +736,11 @@
           CONTENT_SETTING_BLOCK);
   ui_test_utils::NavigateToURL(browser(),
                                accept_ch_without_lifetime_img_localhost());
-  EXPECT_EQ(2u, count_client_hints_headers_seen());
+  EXPECT_EQ(0u, count_client_hints_headers_seen());
   EXPECT_EQ(1u, third_party_request_count_seen());
-  // Client hints should be attached to third party subresources as well.
-  EXPECT_EQ(2u, third_party_client_hints_count_seen());
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 
-  // Allow the Javascript.
+  // Allow the Javascript: Client hints should now be attached.
   HostContentSettingsMapFactory::GetForProfile(browser()->profile())
       ->SetContentSettingDefaultScope(
           accept_ch_without_lifetime_img_localhost(), GURL(),
@@ -751,17 +750,18 @@
   SetClientHintExpectationsOnSubresources(true);
   ui_test_utils::NavigateToURL(browser(),
                                accept_ch_without_lifetime_img_localhost());
-  // Headers are attached to the two image subresources.
-  EXPECT_EQ(4u, count_client_hints_headers_seen());
+
+  // Client hints are attached to only the first party image subresource.
+  EXPECT_EQ(2u, count_client_hints_headers_seen());
   EXPECT_EQ(2u, third_party_request_count_seen());
-  EXPECT_EQ(4u, third_party_client_hints_count_seen());
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 
   // Clear settings.
   HostContentSettingsMapFactory::GetForProfile(browser()->profile())
       ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
 
   // Block the Javascript again: Client hints should not be attached.
-  SetClientHintExpectationsOnSubresources(true);
+  SetClientHintExpectationsOnSubresources(false);
   HostContentSettingsMapFactory::GetForProfile(browser()->profile())
       ->SetContentSettingDefaultScope(
           accept_ch_without_lifetime_img_localhost(), GURL(),
@@ -769,13 +769,13 @@
           CONTENT_SETTING_BLOCK);
   ui_test_utils::NavigateToURL(browser(),
                                accept_ch_without_lifetime_img_localhost());
-  EXPECT_EQ(6u, count_client_hints_headers_seen());
+  EXPECT_EQ(2u, count_client_hints_headers_seen());
   EXPECT_EQ(3u, third_party_request_count_seen());
-  EXPECT_EQ(6u, third_party_client_hints_count_seen());
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 }
 
-// Ensure that when the cookies are blocked, client hints requested using
-// Accept-CH are not attached to the request headers.
+// Ensure that when the cookies is blocked, client hints are not attached to the
+// request headers.
 IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest,
                        ClientHintsNoLifetimeCookiesNotAllowed) {
   base::HistogramTester histogram_tester;
@@ -798,10 +798,9 @@
   ui_test_utils::NavigateToURL(browser(),
                                accept_ch_without_lifetime_img_localhost());
   EXPECT_EQ(0u, count_client_hints_headers_seen());
-  EXPECT_EQ(1u, third_party_request_count_seen());
-  // Client hints are attached to third party subresources since cookies are
-  // blocked only for the forst party origin.
-  EXPECT_EQ(2u, third_party_client_hints_count_seen());
+  // Client hints are not attached to third party subresources even though
+  // cookies are allowed only for the first party origin.
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 
   // Allow cookies.
   cookie_settings_->SetCookieSetting(accept_ch_without_lifetime_img_localhost(),
@@ -811,10 +810,10 @@
   SetClientHintExpectationsOnSubresources(true);
   ui_test_utils::NavigateToURL(browser(),
                                accept_ch_without_lifetime_img_localhost());
-  // Headers are attached to the two image subresources.
+  // Client hints are attached to only the first party image subresource.
   EXPECT_EQ(2u, count_client_hints_headers_seen());
   EXPECT_EQ(2u, third_party_request_count_seen());
-  EXPECT_EQ(4u, third_party_client_hints_count_seen());
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 
   // Block cookies again.
   SetClientHintExpectationsOnSubresources(false);
@@ -828,7 +827,7 @@
                                accept_ch_without_lifetime_img_localhost());
   EXPECT_EQ(2u, count_client_hints_headers_seen());
   EXPECT_EQ(3u, third_party_request_count_seen());
-  EXPECT_EQ(6u, third_party_client_hints_count_seen());
+  EXPECT_EQ(0u, third_party_client_hints_count_seen());
 }
 
 // Check the client hints for the given URL in an incognito window.
diff --git a/chrome/browser/download/notification/download_notification_interactive_uitest.cc b/chrome/browser/download/notification/download_notification_interactive_uitest.cc
index 3dd7582c..eddd666 100644
--- a/chrome/browser/download/notification/download_notification_interactive_uitest.cc
+++ b/chrome/browser/download/notification/download_notification_interactive_uitest.cc
@@ -357,7 +357,9 @@
   EXPECT_FALSE(GetNotification(notification_id()));
 }
 
-IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DownloadDangerousFile) {
+// Disabled due to timeouts; see https://crbug.com/810302.
+IN_PROC_BROWSER_TEST_F(DownloadNotificationTest,
+                       DISABLED_DownloadDangerousFile) {
   GURL download_url(
       embedded_test_server()->GetURL("/downloads/dangerous/dangerous.swf"));
 
@@ -398,7 +400,9 @@
   EXPECT_TRUE(base::PathExists(GetDownloadPath().Append(filename.BaseName())));
 }
 
-IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DiscardDangerousFile) {
+// Disabled due to timeouts; see https://crbug.com/810302.
+IN_PROC_BROWSER_TEST_F(DownloadNotificationTest,
+                       DISABLED_DiscardDangerousFile) {
   GURL download_url(
       embedded_test_server()->GetURL("/downloads/dangerous/dangerous.swf"));
 
@@ -440,7 +444,8 @@
   EXPECT_FALSE(base::PathExists(GetDownloadPath().Append(filename.BaseName())));
 }
 
-IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DownloadImageFile) {
+// Disabled due to timeouts; see https://crbug.com/810302.
+IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DISABLED_DownloadImageFile) {
   GURL download_url(
       embedded_test_server()->GetURL("/downloads/image-octet-stream.png"));
 
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
index ea8c4d1..10bacae 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -100,6 +100,8 @@
       settings_api::PrefType::PREF_TYPE_BOOLEAN;
   (*s_whitelist)[autofill::prefs::kAutofillEnabled] =
       settings_api::PrefType::PREF_TYPE_BOOLEAN;
+  (*s_whitelist)[autofill::prefs::kAutofillCreditCardEnabled] =
+      settings_api::PrefType::PREF_TYPE_BOOLEAN;
   (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] =
       settings_api::PrefType::PREF_TYPE_BOOLEAN;
 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 0e813de..0c9d8ba8 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -10,6 +10,7 @@
 #include "base/lazy_instance.h"
 #include "base/values.h"
 #include "chrome/browser/extensions/extension_tab_util.h"
+#include "chrome/browser/prerender/prerender_contents.h"
 #include "chrome/common/extensions/api/streams_private.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/stream_handle.h"
@@ -26,6 +27,10 @@
 namespace extensions {
 namespace {
 
+StreamsPrivateAPI* GetStreamsPrivateAPI(content::BrowserContext* context) {
+  return StreamsPrivateAPI::GetFactoryInstance()->Get(context);
+}
+
 void CreateResponseHeadersDictionary(const net::HttpResponseHeaders* headers,
                                      base::DictionaryValue* result) {
   if (!headers)
@@ -49,35 +54,18 @@
 
 namespace streams_private = api::streams_private;
 
-// static
-StreamsPrivateAPI* StreamsPrivateAPI::Get(content::BrowserContext* context) {
-  return GetFactoryInstance()->Get(context);
-}
-
-StreamsPrivateAPI::StreamsPrivateAPI(content::BrowserContext* context)
-    : browser_context_(context),
-      extension_registry_observer_(this),
-      weak_ptr_factory_(this) {
-  extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
-}
-
-StreamsPrivateAPI::~StreamsPrivateAPI() {
-}
-
-void StreamsPrivateAPI::ExecuteMimeTypeHandler(
-    const std::string& extension_id,
-    std::unique_ptr<content::StreamInfo> stream,
-    const std::string& view_id,
+void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
     int64_t expected_content_size,
+    const std::string& extension_id,
+    const std::string& view_id,
     bool embedded,
     int frame_tree_node_id,
     int render_process_id,
-    int render_frame_id) {
-  const Extension* extension = ExtensionRegistry::Get(browser_context_)
-                                   ->enabled_extensions()
-                                   .GetByID(extension_id);
-  if (!extension)
-    return;
+    int render_frame_id,
+    std::unique_ptr<content::StreamInfo> stream,
+    content::mojom::TransferrableURLLoaderPtr transferrable_loader,
+    const GURL& original_url) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   content::WebContents* web_contents = nullptr;
   if (frame_tree_node_id != -1) {
@@ -90,6 +78,27 @@
   if (!web_contents)
     return;
 
+  // If the request was for a prerender, abort the prerender and do not
+  // continue. This is because plugins cancel prerender, see
+  // http://crbug.com/343590.
+  prerender::PrerenderContents* prerender_contents =
+      prerender::PrerenderContents::FromWebContents(web_contents);
+  if (prerender_contents) {
+    prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
+    return;
+  }
+
+  auto* browser_context = web_contents->GetBrowserContext();
+  StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context);
+  if (!streams_private)
+    return;
+
+  const Extension* extension = ExtensionRegistry::Get(browser_context)
+                                   ->enabled_extensions()
+                                   .GetByID(extension_id);
+  if (!extension)
+    return;
+
   MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
   // If the mime handler uses MimeHandlerViewGuest, the MimeHandlerViewGuest
   // will take ownership of the stream. Otherwise, store the stream handle in
@@ -99,12 +108,19 @@
                      handler->handler_url());
     int tab_id = ExtensionTabUtil::GetTabId(web_contents);
     std::unique_ptr<StreamContainer> stream_container(new StreamContainer(
-        std::move(stream), tab_id, embedded, handler_url, extension_id));
-    MimeHandlerStreamManager::Get(browser_context_)
+        std::move(stream), tab_id, embedded, handler_url, extension_id,
+        std::move(transferrable_loader), original_url));
+    MimeHandlerStreamManager::Get(browser_context)
         ->AddStream(view_id, std::move(stream_container), frame_tree_node_id,
                     render_process_id, render_frame_id);
     return;
   }
+
+  if (!stream) {
+    NOTREACHED();
+    return;
+  }
+
   // Create the event's arguments value.
   streams_private::StreamInfo info;
   info.mime_type = stream->mime_type;
@@ -130,13 +146,22 @@
                 streams_private::OnExecuteMimeTypeHandler::kEventName,
                 streams_private::OnExecuteMimeTypeHandler::Create(info)));
 
-  EventRouter::Get(browser_context_)
+  EventRouter::Get(browser_context)
       ->DispatchEventToExtension(extension_id, std::move(event));
 
   GURL url = stream->handle->GetURL();
-  streams_[extension_id][url] = std::move(stream->handle);
+  streams_private->streams_[extension_id][url] = std::move(stream->handle);
 }
 
+StreamsPrivateAPI::StreamsPrivateAPI(content::BrowserContext* context)
+    : browser_context_(context),
+      extension_registry_observer_(this),
+      weak_ptr_factory_(this) {
+  extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
+}
+
+StreamsPrivateAPI::~StreamsPrivateAPI() {}
+
 void StreamsPrivateAPI::AbortStream(const std::string& extension_id,
                                     const GURL& stream_url,
                                     const base::Closure& callback) {
@@ -170,9 +195,9 @@
 ExtensionFunction::ResponseAction StreamsPrivateAbortFunction::Run() {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &stream_url_));
-  StreamsPrivateAPI::Get(browser_context())->AbortStream(
-      extension_id(), GURL(stream_url_), base::Bind(
-          &StreamsPrivateAbortFunction::OnClose, this));
+  GetStreamsPrivateAPI(browser_context())
+      ->AbortStream(extension_id(), GURL(stream_url_),
+                    base::Bind(&StreamsPrivateAbortFunction::OnClose, this));
   return RespondLater();
 }
 
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.h b/chrome/browser/extensions/api/streams_private/streams_private_api.h
index 4bca449..bf1e7b9 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.h
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h
@@ -11,6 +11,7 @@
 #include <string>
 
 #include "base/scoped_observer.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "extensions/browser/browser_context_keyed_api_factory.h"
 #include "extensions/browser/extension_function.h"
 #include "extensions/browser/extension_registry_observer.h"
@@ -27,15 +28,8 @@
 class StreamsPrivateAPI : public BrowserContextKeyedAPI,
                           public ExtensionRegistryObserver {
  public:
-  // Convenience method to get the StreamsPrivateAPI for a BrowserContext.
-  static StreamsPrivateAPI* Get(content::BrowserContext* context);
-
-  explicit StreamsPrivateAPI(content::BrowserContext* context);
-  ~StreamsPrivateAPI() override;
-
   // Send the onExecuteMimeTypeHandler event to |extension_id|.
-  // |web_contents| is used to determine the tabId where the document is being
-  // opened. The data for the document will be readable from |stream|, and
+  // The data for the document will be readable from |stream|, and
   // should be |expected_content_size| bytes long. If the viewer is being opened
   // in a BrowserPlugin, specify a non-empty |view_id| of the plugin. |embedded|
   // should be set to whether the document is embedded within another document.
@@ -44,14 +38,23 @@
   // it overrides the |render_process_id| and |render_frame_id| parameters.
   // The |render_process_id| is the id of the renderer process.
   // The |render_frame_id| is the routing id of the RenderFrameHost.
-  void ExecuteMimeTypeHandler(const std::string& extension_id,
-                              std::unique_ptr<content::StreamInfo> stream,
-                              const std::string& view_id,
-                              int64_t expected_content_size,
-                              bool embedded,
-                              int frame_tree_node_id,
-                              int render_process_id,
-                              int render_frame_id);
+  //
+  // If the network service is not enabled, |stream| is used; otherwise,
+  // |transferrable_loader| and |original_url| are used instead.
+  static void SendExecuteMimeTypeHandlerEvent(
+      int64_t expected_content_size,
+      const std::string& extension_id,
+      const std::string& view_id,
+      bool embedded,
+      int frame_tree_node_id,
+      int render_process_id,
+      int render_frame_id,
+      std::unique_ptr<content::StreamInfo> stream,
+      content::mojom::TransferrableURLLoaderPtr transferrable_loader,
+      const GURL& original_url);
+
+  explicit StreamsPrivateAPI(content::BrowserContext* context);
+  ~StreamsPrivateAPI() override;
 
   void AbortStream(const std::string& extension_id,
                    const GURL& stream_url,
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index ebd751a..7d4b04b1 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -30,6 +30,7 @@
 #include "chrome/browser/net/loading_predictor_observer.h"
 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h"
 #include "chrome/browser/plugins/plugin_prefs.h"
+#include "chrome/browser/plugins/plugin_utils.h"
 #include "chrome/browser/prerender/prerender_manager.h"
 #include "chrome/browser/prerender/prerender_manager_factory.h"
 #include "chrome/browser/prerender/prerender_resource_throttle.h"
@@ -103,10 +104,7 @@
 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
 #include "extensions/browser/extension_throttle_manager.h"
 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
-#include "extensions/browser/info_map.h"
-#include "extensions/common/constants.h"
 #include "extensions/common/extension_urls.h"
-#include "extensions/common/manifest_handlers/mime_types_handler.h"
 #include "extensions/common/user_script.h"
 #endif
 
@@ -188,50 +186,6 @@
     prerender_manager->AddProfileNetworkBytesIfEnabled(bytes);
 }
 
-#if BUILDFLAG(ENABLE_EXTENSIONS)
-void SendExecuteMimeTypeHandlerEvent(
-    std::unique_ptr<content::StreamInfo> stream,
-    int64_t expected_content_size,
-    const std::string& extension_id,
-    const std::string& view_id,
-    bool embedded,
-    int frame_tree_node_id,
-    int render_process_id,
-    int render_frame_id) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
-  content::WebContents* web_contents = nullptr;
-  if (frame_tree_node_id != -1) {
-    web_contents =
-        content::WebContents::FromFrameTreeNodeId(frame_tree_node_id);
-  } else {
-    web_contents = content::WebContents::FromRenderFrameHost(
-        content::RenderFrameHost::FromID(render_process_id, render_frame_id));
-  }
-  if (!web_contents)
-    return;
-
-  // If the request was for a prerender, abort the prerender and do not
-  // continue.
-  prerender::PrerenderContents* prerender_contents =
-      prerender::PrerenderContents::FromWebContents(web_contents);
-  if (prerender_contents) {
-    prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
-    return;
-  }
-
-  Profile* profile =
-      Profile::FromBrowserContext(web_contents->GetBrowserContext());
-
-  StreamsPrivateAPI* streams_private = StreamsPrivateAPI::Get(profile);
-  if (!streams_private)
-    return;
-  streams_private->ExecuteMimeTypeHandler(
-      extension_id, std::move(stream), view_id, expected_content_size, embedded,
-      frame_tree_node_id, render_process_id, render_frame_id);
-}
-#endif  // !BUILDFLAG(ENABLE_EXTENSIONS)
-
 void LaunchURL(
     const GURL& url,
     const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
@@ -722,43 +676,16 @@
     std::string* payload) {
 #if BUILDFLAG(ENABLE_EXTENSIONS)
   const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
-  ProfileIOData* io_data =
-      ProfileIOData::FromResourceContext(info->GetContext());
-  bool profile_is_off_the_record = io_data->IsOffTheRecord();
-  const scoped_refptr<const extensions::InfoMap> extension_info_map(
-      io_data->GetExtensionInfoMap());
-  std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
-  // Go through the white-listed extensions and try to use them to intercept
-  // the URL request.
-  for (const std::string& extension_id : whitelist) {
-    const Extension* extension =
-        extension_info_map->extensions().GetByID(extension_id);
-    // The white-listed extension may not be installed, so we have to NULL check
-    // |extension|.
-    if (!extension ||
-        (profile_is_off_the_record &&
-         !extension_info_map->IsIncognitoEnabled(extension_id))) {
-      continue;
-    }
-
-    if (extension_id == extension_misc::kPdfExtensionId &&
-        io_data->always_open_pdf_externally()->GetValue()) {
-      continue;
-    }
-
-    MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
-    if (!handler)
-      continue;
-
-    if (handler->CanHandleMIMEType(mime_type)) {
-      StreamTargetInfo target_info;
-      *origin = Extension::GetBaseURLFromExtensionId(extension_id);
-      target_info.extension_id = extension_id;
-      target_info.view_id = base::GenerateGUID();
-      *payload = target_info.view_id;
-      stream_target_info_[request] = target_info;
-      return true;
-    }
+  std::string extension_id =
+      PluginUtils::GetExtensionIdForMimeType(info->GetContext(), mime_type);
+  if (!extension_id.empty()) {
+    StreamTargetInfo target_info;
+    *origin = Extension::GetBaseURLFromExtensionId(extension_id);
+    target_info.extension_id = extension_id;
+    target_info.view_id = base::GenerateGUID();
+    *payload = target_info.view_id;
+    stream_target_info_[request] = target_info;
+    return true;
   }
 #endif
   return false;
@@ -775,10 +702,12 @@
   bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
   content::BrowserThread::PostTask(
       content::BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&SendExecuteMimeTypeHandlerEvent, std::move(stream),
-                     request->GetExpectedContentSize(), ix->second.extension_id,
-                     ix->second.view_id, embedded, info->GetFrameTreeNodeId(),
-                     info->GetChildID(), info->GetRenderFrameID()));
+      base::BindOnce(
+          &extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent,
+          request->GetExpectedContentSize(), ix->second.extension_id,
+          ix->second.view_id, embedded, info->GetFrameTreeNodeId(),
+          info->GetChildID(), info->GetRenderFrameID(), std::move(stream),
+          nullptr /* transferrable_loader */, GURL()));
   stream_target_info_.erase(request);
 #endif
 }
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
index ffb694af..f3a61cd 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -193,6 +193,11 @@
     return;
   }
 
+  if (IsTabMirroringMediaSource(MediaSource(source_id))) {
+    // Ensure the CastRemotingConnector is created before mirroring starts.
+    CastRemotingConnector::Get(web_contents);
+  }
+
   MediaRouterMetrics::RecordMediaSinkType(sink->icon_type());
   MediaRouteProviderId provider_id = sink->provider_id();
   int tab_id = SessionTabHelper::IdForTab(web_contents);
diff --git a/chrome/browser/net/net_error_diagnostics_dialog_mac.cc b/chrome/browser/net/net_error_diagnostics_dialog_mac.cc
deleted file mode 100644
index be0a297..0000000
--- a/chrome/browser/net/net_error_diagnostics_dialog_mac.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/net/net_error_diagnostics_dialog.h"
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <CoreServices/CoreServices.h>
-
-#include "base/logging.h"
-#include "base/mac/scoped_cftyperef.h"
-#include "base/strings/sys_string_conversions.h"
-
-bool CanShowNetworkDiagnosticsDialog() {
-  return true;
-}
-
-void ShowNetworkDiagnosticsDialog(content::WebContents* web_contents,
-                                  const std::string& failed_url) {
-  base::ScopedCFTypeRef<CFStringRef> url_string_ref(
-      base::SysUTF8ToCFStringRef(failed_url));
-  base::ScopedCFTypeRef<CFURLRef> url_ref(
-      CFURLCreateWithString(kCFAllocatorDefault, url_string_ref.get(),
-                            nullptr));
-  if (!url_ref.get())
-    return;
-
-  base::ScopedCFTypeRef<CFNetDiagnosticRef> diagnostic_ref(
-      CFNetDiagnosticCreateWithURL(kCFAllocatorDefault, url_ref.get()));
-  if (!diagnostic_ref.get())
-    return;
-
-  CFNetDiagnosticDiagnoseProblemInteractively(diagnostic_ref.get());
-}
diff --git a/chrome/browser/net/net_error_diagnostics_dialog_generic.cc b/chrome/browser/net/net_error_diagnostics_dialog_posix.cc
similarity index 100%
rename from chrome/browser/net/net_error_diagnostics_dialog_generic.cc
rename to chrome/browser/net/net_error_diagnostics_dialog_posix.cc
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 1425cd8d..2739c86 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -2618,8 +2618,15 @@
       ManagePasswordsUIController::FromWebContents(WebContents())
           ->GetPendingPassword()
           .all_possible_passwords,
-      ElementsAre(base::ASCIIToUTF16("pass1"), base::ASCIIToUTF16("pass2"),
-                  base::ASCIIToUTF16("pass3")));
+      ElementsAre(autofill::ValueElementPair(
+                      base::ASCIIToUTF16("pass1"),
+                      base::ASCIIToUTF16("chg_password_wo_username_field")),
+                  autofill::ValueElementPair(
+                      base::ASCIIToUTF16("pass2"),
+                      base::ASCIIToUTF16("chg_new_password_wo_username_1")),
+                  autofill::ValueElementPair(
+                      base::ASCIIToUTF16("pass3"),
+                      base::ASCIIToUTF16("chg_new_password_wo_username_2"))));
   bubble_observer.AcceptSavePrompt();
   WaitForPasswordStore();
   CheckThatCredentialsStored(base::ASCIIToUTF16(""),
diff --git a/chrome/browser/permissions/attestation_permission_request.cc b/chrome/browser/permissions/attestation_permission_request.cc
index 25bf78ac..6722033 100644
--- a/chrome/browser/permissions/attestation_permission_request.cc
+++ b/chrome/browser/permissions/attestation_permission_request.cc
@@ -5,18 +5,12 @@
 #include "chrome/browser/permissions/attestation_permission_request.h"
 
 #include "base/callback.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/permissions/permission_request.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/vector_icon_types.h"
 #include "url/origin.h"
 
-static const gfx::VectorIcon kEmptyIcon = {
-    // While the length of the path-elements array can be zero, the pointer
-    // cannot be nullptr.
-    reinterpret_cast<const gfx::PathElement*>("Empty"), 0, nullptr, 0u, "Empty",
-};
-
 // AttestationPermissionRequest is a delegate class that provides information
 // and callbacks to the PermissionRequestManager.
 //
@@ -31,7 +25,9 @@
                                base::OnceCallback<void(bool)> callback)
       : origin_(origin), callback_(std::move(callback)) {}
 
-  PermissionRequest::IconId GetIconId() const override { return kEmptyIcon; }
+  PermissionRequest::IconId GetIconId() const override {
+    return kUsbSecurityKeyIcon;
+  }
 
   base::string16 GetMessageTextFragment() const override {
     return l10n_util::GetStringUTF16(
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
new file mode 100644
index 0000000..62a5508
--- /dev/null
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
@@ -0,0 +1,86 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h"
+
+#include "base/guid.h"
+#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
+#include "chrome/browser/plugins/plugin_utils.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/stream_info.h"
+#include "content/public/common/resource_type.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
+#include "mojo/public/cpp/system/data_pipe.h"
+
+PluginResponseInterceptorURLLoaderThrottle::
+    PluginResponseInterceptorURLLoaderThrottle(
+        content::ResourceContext* resource_context,
+        int resource_type,
+        int frame_tree_node_id)
+    : resource_context_(resource_context),
+      resource_type_(resource_type),
+      frame_tree_node_id_(frame_tree_node_id) {}
+
+PluginResponseInterceptorURLLoaderThrottle::
+    ~PluginResponseInterceptorURLLoaderThrottle() = default;
+
+void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(
+    const GURL& response_url,
+    const network::ResourceResponseHead& response_head,
+    bool* defer) {
+  std::string extension_id = PluginUtils::GetExtensionIdForMimeType(
+      resource_context_, response_head.mime_type);
+  if (extension_id.empty())
+    return;
+
+  std::string view_id = base::GenerateGUID();
+
+  network::mojom::URLLoaderPtr dummy_new_loader;
+  mojo::MakeRequest(&dummy_new_loader);
+  network::mojom::URLLoaderClientPtr new_client;
+  network::mojom::URLLoaderClientRequest new_client_request =
+      mojo::MakeRequest(&new_client);
+
+  mojo::DataPipe data_pipe(64);
+  uint32_t len = static_cast<uint32_t>(view_id.size());
+  CHECK_EQ(MOJO_RESULT_OK,
+           data_pipe.producer_handle->WriteData(
+               view_id.c_str(), &len, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
+
+  new_client->OnStartLoadingResponseBody(std::move(data_pipe.consumer_handle));
+
+  network::URLLoaderCompletionStatus status(net::OK);
+  status.decoded_body_length = len;
+  new_client->OnComplete(status);
+
+  network::mojom::URLLoaderPtr original_loader;
+  network::mojom::URLLoaderClientRequest original_client;
+  delegate_->InterceptResponse(std::move(dummy_new_loader),
+                               std::move(new_client_request), &original_loader,
+                               &original_client);
+
+  // Make a deep copy of ResourceResponseHead before passing it cross-thread.
+  auto resource_response = base::MakeRefCounted<network::ResourceResponse>();
+  resource_response->head = response_head;
+  auto deep_copied_response = resource_response->DeepCopy();
+
+  auto transferrable_loader = content::mojom::TransferrableURLLoader::New();
+  transferrable_loader->url = GURL(
+      extensions::Extension::GetBaseURLFromExtensionId(extension_id).spec() +
+      base::GenerateGUID());
+  transferrable_loader->url_loader = original_loader.PassInterface();
+  transferrable_loader->url_loader_client = std::move(original_client);
+  transferrable_loader->head = std::move(deep_copied_response->head);
+
+  int64_t expected_content_size = response_head.content_length;
+  bool embedded = resource_type_ != content::RESOURCE_TYPE_MAIN_FRAME;
+  content::BrowserThread::PostTask(
+      content::BrowserThread::UI, FROM_HERE,
+      base::BindOnce(
+          &extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent,
+          expected_content_size, extension_id, view_id, embedded,
+          frame_tree_node_id_, -1 /* render_process_id */,
+          -1 /* render_frame_id */, nullptr /* stream */,
+          std::move(transferrable_loader), response_url));
+}
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h
new file mode 100644
index 0000000..a7772dc
--- /dev/null
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PLUGINS_PLUGIN_RESPONSE_INTERCEPTOR_URL_LOADER_THROTTLE_H_
+#define CHROME_BROWSER_PLUGINS_PLUGIN_RESPONSE_INTERCEPTOR_URL_LOADER_THROTTLE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "content/public/common/url_loader_throttle.h"
+
+namespace content {
+class ResourceContext;
+}
+
+// Used to watch navigation responses to look for mime types that are handled by
+// extensions. When it finds such a response, it will intercept it by extracting
+// the URLLoader interface pointer. It will create a random string and send that
+// to the extension which handles the mime type. It will also write that string
+// into the object tag for the plugin, which will cause the pepper plugin to
+// make a request for that URL. The renderer would have gotten a
+// TransferrableURLLoader that allows it to map from that URL to the original
+// URLLoader interface pointer.
+class PluginResponseInterceptorURLLoaderThrottle
+    : public content::URLLoaderThrottle {
+ public:
+  PluginResponseInterceptorURLLoaderThrottle(
+      content::ResourceContext* resource_context,
+      int resource_type,
+      int frame_tree_node_id);
+  ~PluginResponseInterceptorURLLoaderThrottle() override;
+
+ private:
+  // content::URLLoaderThrottle overrides;
+  void WillProcessResponse(const GURL& response_url,
+                           const network::ResourceResponseHead& response_head,
+                           bool* defer) override;
+
+  content::ResourceContext* const resource_context_;
+  const int resource_type_;
+  const int frame_tree_node_id_;
+
+  DISALLOW_COPY_AND_ASSIGN(PluginResponseInterceptorURLLoaderThrottle);
+};
+
+#endif  // CHROME_BROWSER_PLUGINS_PLUGIN_RESPONSE_INTERCEPTOR_URL_LOADER_THROTTLE_H_
diff --git a/chrome/browser/plugins/plugin_utils.cc b/chrome/browser/plugins/plugin_utils.cc
index b603667..4c3c124 100644
--- a/chrome/browser/plugins/plugin_utils.cc
+++ b/chrome/browser/plugins/plugin_utils.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/plugins/plugin_utils.h"
 
 #include "base/values.h"
+#include "chrome/browser/profiles/profile_io_data.h"
 #include "chrome/common/chrome_features.h"
 #include "chrome/common/plugin_utils.h"
 #include "components/content_settings/core/browser/host_content_settings_map.h"
@@ -14,6 +15,13 @@
 #include "url/gurl.h"
 #include "url/origin.h"
 
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+#include "extensions/browser/info_map.h"
+#include "extensions/common/constants.h"
+#include "extensions/common/extension.h"
+#include "extensions/common/manifest_handlers/mime_types_handler.h"
+#endif
+
 namespace {
 
 const char kFlashPluginID[] = "adobe-flash-player";
@@ -139,3 +147,38 @@
     const HostContentSettingsMap* host_content_settings_map) {
   return base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins);
 }
+
+// static
+std::string PluginUtils::GetExtensionIdForMimeType(
+    content::ResourceContext* resource_context,
+    const std::string& mime_type) {
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+  ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
+  bool profile_is_off_the_record = io_data->IsOffTheRecord();
+  const scoped_refptr<const extensions::InfoMap> extension_info_map(
+      io_data->GetExtensionInfoMap());
+  std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
+  // Go through the white-listed extensions and try to use them to intercept
+  // the URL request.
+  for (const std::string& extension_id : whitelist) {
+    const extensions::Extension* extension =
+        extension_info_map->extensions().GetByID(extension_id);
+    // The white-listed extension may not be installed, so we have to NULL check
+    // |extension|.
+    if (!extension || (profile_is_off_the_record &&
+                       !extension_info_map->IsIncognitoEnabled(extension_id))) {
+      continue;
+    }
+
+    if (extension_id == extension_misc::kPdfExtensionId &&
+        io_data->always_open_pdf_externally()->GetValue()) {
+      continue;
+    }
+
+    MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
+    if (handler && handler->CanHandleMIMEType(mime_type))
+      return extension_id;
+  }
+#endif
+  return std::string();
+}
diff --git a/chrome/browser/plugins/plugin_utils.h b/chrome/browser/plugins/plugin_utils.h
index 97f16630..10852a86 100644
--- a/chrome/browser/plugins/plugin_utils.h
+++ b/chrome/browser/plugins/plugin_utils.h
@@ -12,6 +12,7 @@
 class HostContentSettingsMap;
 
 namespace content {
+class ResourceContext;
 struct WebPluginInfo;
 }
 
@@ -53,6 +54,12 @@
   static bool ShouldPreferHtmlOverPlugins(
       const HostContentSettingsMap* host_content_settings_map);
 
+  // If there's an extension that is allowed to handle |mime_type|, returns its
+  // ID. Otherwise returns an empty string.
+  static std::string GetExtensionIdForMimeType(
+      content::ResourceContext* resource_context,
+      const std::string& mime_type);
+
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(PluginUtils);
 };
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 338bae1..343e3937 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -217,8 +217,7 @@
 
   using content::CookieStoreConfig;
   std::unique_ptr<net::CookieStore> cookie_store(CreateCookieStore(
-      CookieStoreConfig(base::FilePath(), false, false, nullptr),
-      profile_params->io_thread->net_log()));
+      CookieStoreConfig(base::FilePath(), false, false, nullptr)));
   cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
 
   builder->SetCookieAndChannelIdStores(std::move(cookie_store),
@@ -246,8 +245,7 @@
   content::CookieStoreConfig cookie_config;
   // Enable cookies for chrome-extension URLs.
   cookie_config.cookieable_schemes.push_back(extensions::kExtensionScheme);
-  extensions_cookie_store_ = content::CreateCookieStore(
-      cookie_config, profile_params->io_thread->net_log());
+  extensions_cookie_store_ = content::CreateCookieStore(cookie_config);
   extensions_context->set_cookie_store(extensions_cookie_store_.get());
 }
 
@@ -266,8 +264,8 @@
   // Use a separate in-memory cookie store for the app.
   // TODO(creis): We should have a cookie delegate for notifying the cookie
   // extensions API, but we need to update it to understand isolated apps first.
-  std::unique_ptr<net::CookieStore> cookie_store = content::CreateCookieStore(
-      content::CookieStoreConfig(), main_context->net_log());
+  std::unique_ptr<net::CookieStore> cookie_store =
+      content::CreateCookieStore(content::CookieStoreConfig());
   std::unique_ptr<net::ChannelIDService> channel_id_service(
       new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr)));
   cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index ab677572..dccc30dcb 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -473,7 +473,7 @@
     cookie_config.channel_id_service = channel_id_service.get();
     cookie_config.background_task_runner = cookie_background_task_runner;
     std::unique_ptr<net::CookieStore> cookie_store(
-        content::CreateCookieStore(cookie_config, io_thread->net_log()));
+        content::CreateCookieStore(cookie_config));
 
     cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
 
@@ -533,8 +533,7 @@
   // Enable cookies for chrome-extension URLs.
   cookie_config.cookieable_schemes.push_back(extensions::kExtensionScheme);
   cookie_config.channel_id_service = extensions_context->channel_id_service();
-  extensions_cookie_store_ = content::CreateCookieStore(
-      cookie_config, profile_params->io_thread->net_log());
+  extensions_cookie_store_ = content::CreateCookieStore(cookie_config);
   extensions_context->set_cookie_store(extensions_cookie_store_.get());
 }
 
@@ -594,8 +593,7 @@
           new net::DefaultChannelIDStore(channel_id_db.get())));
   cookie_config.channel_id_service = channel_id_service.get();
   cookie_config.background_task_runner = cookie_background_task_runner;
-  cookie_store =
-      content::CreateCookieStore(cookie_config, main_context->net_log());
+  cookie_store = content::CreateCookieStore(cookie_config);
   cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
 
   // Build a new HttpNetworkSession that uses the new ChannelIDService.
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher.cc b/chrome/browser/resource_coordinator/tab_activity_watcher.cc
index 53e9f635..73c8fe7 100644
--- a/chrome/browser/resource_coordinator/tab_activity_watcher.cc
+++ b/chrome/browser/resource_coordinator/tab_activity_watcher.cc
@@ -9,6 +9,7 @@
 #include "chrome/browser/resource_coordinator/time.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/tabs/window_activity_watcher.h"
@@ -45,6 +46,11 @@
   // another tab. Copies info from the other WebContentsData so future events
   // can be logged consistently.
   void DidReplace(const WebContentsData& replaced_tab) {
+    // Copy creation and foregrounded times to retain the replaced tab's MRU
+    // position.
+    creation_time_ = replaced_tab.creation_time_;
+    foregrounded_time_ = replaced_tab.foregrounded_time_;
+
     // Copy background status so ForegroundOrClosed can potentially be logged.
     backgrounded_time_ = replaced_tab.backgrounded_time_;
 
@@ -73,7 +79,9 @@
       return;
     }
 
-    if (!foreground) {
+    if (foreground) {
+      foregrounded_time_ = NowTicks();
+    } else {
       // This is a new tab that was opened in the background.
       backgrounded_time_ = NowTicks();
     }
@@ -87,6 +95,10 @@
     }
   }
 
+  // Sets foregrounded_time_ to NowTicks() so this becomes the
+  // most-recently-used tab.
+  void TabWindowActivated() { foregrounded_time_ = NowTicks(); }
+
  private:
   friend class content::WebContentsUserData<WebContentsData>;
 
@@ -96,6 +108,8 @@
     tab_metrics_.web_contents = web_contents;
     web_contents->GetRenderViewHost()->GetWidget()->AddInputEventObserver(this);
 
+    creation_time_ = NowTicks();
+
     // A navigation may already have completed if this is a replacement tab.
     ukm_source_id_ = ukm::GetSourceIdForWebContentsDocument(web_contents);
   }
@@ -131,10 +145,14 @@
     if (browser && browser->tab_strip_model()->closing_all())
       return;
 
+    // Log the event before updating times.
     TabActivityWatcher::GetInstance()
         ->tab_metrics_logger_->LogBackgroundTabShown(
-            ukm_source_id_, NowTicks() - backgrounded_time_);
+            ukm_source_id_, NowTicks() - backgrounded_time_, GetMRUMetrics());
+
     backgrounded_time_ = base::TimeTicks();
+    foregrounded_time_ = NowTicks();
+    creation_time_ = NowTicks();
   }
 
   // content::WebContentsObserver:
@@ -201,9 +219,14 @@
         ukm_source_id_, NowTicks() - navigation_time_);
 
     if (!backgrounded_time_.is_null()) {
+      // TODO(michaelpg): When closing multiple tabs, log the tab metrics as
+      // they were before any tabs started to close. Currently, we log each tab
+      // one by one as the tabstrip closes, so metrics like MRUIndex are
+      // different than what they were when the close event started.
+      // See https://crbug.com/817174.
       TabActivityWatcher::GetInstance()
           ->tab_metrics_logger_->LogBackgroundTabClosed(
-              ukm_source_id_, NowTicks() - backgrounded_time_);
+              ukm_source_id_, NowTicks() - backgrounded_time_, GetMRUMetrics());
     }
   }
 
@@ -217,13 +240,54 @@
       tab_metrics_.page_metrics.touch_event_count++;
   }
 
+  // Iterates through tabstrips to determine the index of |contents| in
+  // most-recently-used order out of all non-incognito tabs.
+  // Linear in the number of tabs (most users have <10 tabs open).
+  TabMetricsLogger::MRUMetrics GetMRUMetrics() {
+    TabMetricsLogger::MRUMetrics mru_metrics;
+    for (Browser* browser : *BrowserList::GetInstance()) {
+      // Ignore incognito browsers.
+      if (browser->profile()->IsOffTheRecord())
+        continue;
+
+      int count = browser->tab_strip_model()->count();
+      mru_metrics.total += count;
+
+      // Increment the MRU index for each WebContents that was foregrounded more
+      // recently than this one.
+      for (int i = 0; i < count; i++) {
+        auto* other = WebContentsData::FromWebContents(
+            browser->tab_strip_model()->GetWebContentsAt(i));
+        if (this == other)
+          continue;
+
+        // Sort by foregrounded time, then creation time. Both tabs will have a
+        // foregrounded time of 0 if they were never foregrounded.
+        if (foregrounded_time_ < other->foregrounded_time_ ||
+            (foregrounded_time_ == other->foregrounded_time_ &&
+             creation_time_ < other->creation_time_)) {
+          mru_metrics.index++;
+        }
+      }
+    }
+    return mru_metrics;
+  }
+
   // Updated when a navigation is finished.
   ukm::SourceId ukm_source_id_ = 0;
 
+  // When the tab was created.
+  base::TimeTicks creation_time_;
+
   // The most recent time the tab became backgrounded. This happens when a
   // different tab in the tabstrip is activated or the tab's window is hidden.
   base::TimeTicks backgrounded_time_;
 
+  // The most recent time the tab became foregrounded. This happens when the
+  // tab becomes the active tab in the tabstrip or when the active tab's window
+  // is activated.
+  base::TimeTicks foregrounded_time_;
+
   // The last navigation time associated with this tab.
   base::TimeTicks navigation_time_;
 
@@ -241,7 +305,7 @@
 
 TabActivityWatcher::TabActivityWatcher()
     : tab_metrics_logger_(std::make_unique<TabMetricsLogger>()),
-      browser_tab_strip_tracker_(this, this, nullptr) {
+      browser_tab_strip_tracker_(this, this, this) {
   browser_tab_strip_tracker_.Init();
 
   // TabMetrics UKMs reference WindowMetrics UKM entries, so ensure the
@@ -251,6 +315,23 @@
 
 TabActivityWatcher::~TabActivityWatcher() = default;
 
+void TabActivityWatcher::OnBrowserSetLastActive(Browser* browser) {
+  if (browser->tab_strip_model()->closing_all())
+    return;
+
+  content::WebContents* active_contents =
+      browser->tab_strip_model()->GetActiveWebContents();
+  if (!active_contents)
+    return;
+
+  // Don't assume the WebContentsData already exists in case activation happens
+  // before the tabstrip is fully updated.
+  WebContentsData* web_contents_data =
+      WebContentsData::FromWebContents(active_contents);
+  if (web_contents_data)
+    web_contents_data->TabWindowActivated();
+}
+
 void TabActivityWatcher::TabInsertedAt(TabStripModel* tab_strip_model,
                                        content::WebContents* contents,
                                        int index,
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher.h b/chrome/browser/resource_coordinator/tab_activity_watcher.h
index 55834d0..b97617ec 100644
--- a/chrome/browser/resource_coordinator/tab_activity_watcher.h
+++ b/chrome/browser/resource_coordinator/tab_activity_watcher.h
@@ -8,6 +8,7 @@
 #include <memory>
 
 #include "base/macros.h"
+#include "chrome/browser/ui/browser_list_observer.h"
 #include "chrome/browser/ui/browser_tab_strip_tracker.h"
 #include "chrome/browser/ui/browser_tab_strip_tracker_delegate.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
@@ -19,7 +20,8 @@
 // Observes background tab activity in order to log UKMs for tabs. Metrics will
 // be compared against tab reactivation/close events to determine the end state
 // of each background tab.
-class TabActivityWatcher : public TabStripModelObserver,
+class TabActivityWatcher : public BrowserListObserver,
+                           public TabStripModelObserver,
                            public BrowserTabStripTrackerDelegate {
  public:
   // Helper class to observe WebContents.
@@ -35,6 +37,9 @@
  private:
   friend class TabActivityWatcherTest;
 
+  // BrowserListObserver:
+  void OnBrowserSetLastActive(Browser* browser) override;
+
   // TabStripModelObserver:
   void TabInsertedAt(TabStripModel* tab_strip_model,
                      content::WebContents* contents,
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
index 0a0a104..ebab5fe0 100644
--- a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
+++ b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
@@ -93,6 +93,8 @@
 
  protected:
   void ExpectNewForegroundedEntry(const GURL& url) {
+    // TODO(michaelpg): Add an interactive_ui_test to test MRU metrics since
+    // they can be affected by window activation.
     UkmMetricMap expected_metrics = {
         {TabManager_Background_ForegroundedOrClosed::kIsForegroundedName, 1},
     };
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc b/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc
index c4779fc..1f86b72 100644
--- a/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc
@@ -7,11 +7,13 @@
 #include <memory>
 
 #include "base/macros.h"
+#include "base/test/simple_test_tick_clock.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/engagement/site_engagement_service.h"
 #include "chrome/browser/resource_coordinator/tab_activity_watcher.h"
 #include "chrome/browser/resource_coordinator/tab_manager.h"
 #include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h"
+#include "chrome/browser/resource_coordinator/time.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/tabs/tab_activity_simulator.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -40,9 +42,10 @@
 namespace resource_coordinator {
 namespace {
 
+// Test URLs need to be from different origins to test site engagement score.
 const GURL kTestUrls[] = {
-    GURL("https://example.com/"), GURL("https://google.fake"),
-    GURL("https://example3.com"),
+    GURL("https://test1.example.com"), GURL("https://test3.example.com"),
+    GURL("https://test2.example.com"), GURL("https://test4.example.com"),
 };
 
 // The default metric values for a tab.
@@ -567,13 +570,23 @@
 // TabActivityWatcher.
 class ForegroundedOrClosedTest : public TabActivityWatcherTest {
  public:
-  ForegroundedOrClosedTest() = default;
+  ForegroundedOrClosedTest()
+      : scoped_set_tick_clock_for_testing_(&test_clock_) {
+    // Start at a nonzero time.
+    AdvanceClock();
+  }
   ~ForegroundedOrClosedTest() override = default;
 
  protected:
   const char* kEntryName = ForegroundedOrClosed::kEntryName;
 
+  void AdvanceClock() { test_clock_.Advance(base::TimeDelta::FromSeconds(1)); }
+
  private:
+  base::SimpleTestTickClock test_clock_;
+  resource_coordinator::ScopedSetTickClockForTesting
+      scoped_set_tick_clock_for_testing_;
+
   DISALLOW_COPY_AND_ASSIGN(ForegroundedOrClosedTest);
 };
 
@@ -601,10 +614,15 @@
   TabStripModel* tab_strip_model = browser->tab_strip_model();
   tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
                                                     GURL(kTestUrls[0]));
+  tab_strip_model->ActivateTabAt(0, false);
   tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
                                                     GURL(kTestUrls[1]));
+  AdvanceClock();
   tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
                                                     GURL(kTestUrls[2]));
+  AdvanceClock();
+  // MRU ordering by tab indices:
+  // 0 (foreground), 1 (created first), 2 (created last)
 
   // Foreground a tab to log an event.
   tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 2);
@@ -614,8 +632,12 @@
         kEntryName, kTestUrls[2],
         {
             {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 1},
         });
   }
+  AdvanceClock();
+  // MRU ordering by tab indices:
+  // 2 (foreground), 0 (foregrounded earlier), 1 (never foregrounded)
 
   // Foreground the middle tab to log another event.
   tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 1);
@@ -625,8 +647,12 @@
         kEntryName, kTestUrls[1],
         {
             {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 2},
         });
   }
+  AdvanceClock();
+  // MRU ordering by tab indices:
+  // 1 (foreground), 2 (foregrounded earlier), 0 (foregrounded even earlier)
 
   // Close all tabs. Background tabs are logged as closed.
   tab_strip_model->CloseAllTabs();
@@ -637,6 +663,7 @@
         kEntryName, kTestUrls[2],
         {
             {ForegroundedOrClosed::kIsForegroundedName, 0},
+            {ForegroundedOrClosed::kMRUIndexName, 1},
         });
 
     // The leftmost tab was in the background and was closed.
@@ -644,6 +671,11 @@
         kEntryName, kTestUrls[0],
         {
             {ForegroundedOrClosed::kIsForegroundedName, 0},
+            // TODO(michaelpg): The final tab has an MRU of 0 because the
+            // remaining tabs were closed first. It would be more accurate to
+            // use the MRUIndex this tab had when CloseAllTabs() was called.
+            // See https://crbug.com/817174.
+            {ForegroundedOrClosed::kMRUIndexName, 0},
         });
 
     // No event is logged for the middle tab, which was in the foreground.
@@ -651,4 +683,169 @@
   }
 }
 
+// Tests the MRUIndex value for ForegroundedOrClosed events.
+TEST_F(ForegroundedOrClosedTest, MRUIndex) {
+  Browser::CreateParams params(profile(), true);
+  std::unique_ptr<Browser> browser =
+      CreateBrowserWithTestWindowForParams(&params);
+
+  TabStripModel* tab_strip_model = browser->tab_strip_model();
+  tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
+                                                    GURL(kTestUrls[0]));
+  tab_strip_model->ActivateTabAt(0, false);
+  AdvanceClock();
+
+  tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
+                                                    GURL(kTestUrls[1]));
+  AdvanceClock();
+  tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
+                                                    GURL(kTestUrls[2]));
+  AdvanceClock();
+  tab_activity_simulator_.AddWebContentsAndNavigate(tab_strip_model,
+                                                    GURL(kTestUrls[3]));
+  AdvanceClock();
+
+  // Tabs in MRU order: [0, 3, 2, 1]
+  // The 0th tab is foregrounded. The other tabs are ordered by most recently
+  // created since they haven't ever been foregrounded.
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 2);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[2],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 2},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [2, 0, 3, 1]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 0);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[0],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 1},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [0, 2, 3, 1]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 1);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[1],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 3},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [1, 0, 2, 3]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 0);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[0],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 1},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [0, 1, 2, 3]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 3);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[3],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 3},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [3, 0, 1, 2]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 1);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[1],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 2},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [1, 3, 0, 2]
+
+  // Close a background tab.
+  tab_strip_model->CloseWebContentsAt(3, TabStripModel::CLOSE_NONE);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[3],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 0},
+            {ForegroundedOrClosed::kMRUIndexName, 1},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [1, 0, 2]
+
+  tab_activity_simulator_.SwitchToTabAt(tab_strip_model, 2);
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[2],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 2},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [2, 1, 0]
+
+  // Close a foreground tab.
+  tab_strip_model->CloseWebContentsAt(2, TabStripModel::CLOSE_NONE);
+  // This activates the next tab in the tabstrip. Since this is a
+  // TestWebContents, we must manually call WasShown().
+  tab_strip_model->GetWebContentsAt(1)->WasShown();
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[1],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 1},
+            {ForegroundedOrClosed::kMRUIndexName, 0},
+        });
+  }
+  AdvanceClock();
+  // New MRU order: [1, 0]
+
+  tab_strip_model->CloseAllTabs();
+  {
+    SCOPED_TRACE("");
+    // The rightmost tab was in the foreground, so only the leftmost tab is
+    // logged.
+    // TODO(michaelpg): The last tab has an MRU of 0 because the remaining tabs
+    // were closed first. It would be more accurate to use the MRUIndex this tab
+    // had when CloseAllTabs() was called. See https://crbug.com/817174.
+    ukm_entry_checker_.ExpectNewEntry(
+        kEntryName, kTestUrls[0],
+        {
+            {ForegroundedOrClosed::kIsForegroundedName, 0},
+            {ForegroundedOrClosed::kMRUIndexName, 0},
+        });
+  }
+}
+
 }  // namespace resource_coordinator
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger.cc b/chrome/browser/resource_coordinator/tab_metrics_logger.cc
index c9033e0..c7ab1dc5 100644
--- a/chrome/browser/resource_coordinator/tab_metrics_logger.cc
+++ b/chrome/browser/resource_coordinator/tab_metrics_logger.cc
@@ -111,15 +111,19 @@
 }
 
 // Logs the TabManager.Background.ForegroundedOrClosed event.
-void LogBackgroundTabForegroundedOrClosed(ukm::SourceId ukm_source_id,
-                                          base::TimeDelta inactive_duration,
-                                          bool is_foregrounded) {
+void LogBackgroundTabForegroundedOrClosed(
+    ukm::SourceId ukm_source_id,
+    base::TimeDelta inactive_duration,
+    const TabMetricsLogger::MRUMetrics& mru_metrics,
+    bool is_foregrounded) {
   if (!ukm_source_id)
     return;
 
   ukm::builders::TabManager_Background_ForegroundedOrClosed(ukm_source_id)
-      .SetTimeFromBackgrounded(inactive_duration.InMilliseconds())
       .SetIsForegrounded(is_foregrounded)
+      .SetMRUIndex(mru_metrics.index)
+      .SetTimeFromBackgrounded(inactive_duration.InMilliseconds())
+      .SetTotalTabCount(mru_metrics.total)
       .Record(ukm::UkmRecorder::Get());
 }
 
@@ -252,18 +256,18 @@
       .Record(ukm::UkmRecorder::Get());
 }
 
-void TabMetricsLogger::LogBackgroundTabShown(
-    ukm::SourceId ukm_source_id,
-    base::TimeDelta inactive_duration) {
+void TabMetricsLogger::LogBackgroundTabShown(ukm::SourceId ukm_source_id,
+                                             base::TimeDelta inactive_duration,
+                                             const MRUMetrics& mru_metrics) {
   LogBackgroundTabForegroundedOrClosed(ukm_source_id, inactive_duration,
-                                       true /* is_shown */);
+                                       mru_metrics, true /* is_shown */);
 }
 
-void TabMetricsLogger::LogBackgroundTabClosed(
-    ukm::SourceId ukm_source_id,
-    base::TimeDelta inactive_duration) {
+void TabMetricsLogger::LogBackgroundTabClosed(ukm::SourceId ukm_source_id,
+                                              base::TimeDelta inactive_duration,
+                                              const MRUMetrics& mru_metrics) {
   LogBackgroundTabForegroundedOrClosed(ukm_source_id, inactive_duration,
-                                       false /* is_shown */);
+                                       mru_metrics, false /* is_shown */);
 }
 
 void TabMetricsLogger::LogTabLifetime(ukm::SourceId ukm_source_id,
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger.h b/chrome/browser/resource_coordinator/tab_metrics_logger.h
index 07105dc..c90c816 100644
--- a/chrome/browser/resource_coordinator/tab_metrics_logger.h
+++ b/chrome/browser/resource_coordinator/tab_metrics_logger.h
@@ -45,6 +45,13 @@
     PageMetrics page_metrics = {};
   };
 
+  // Index in most-recently-used order and total number of tabs.
+  struct MRUMetrics {
+    int index = 0;  // Zero-based, so this indicates how many of the |total|
+                    // tabs are more recently used than this tab.
+    int total = 0;
+  };
+
   TabMetricsLogger();
   ~TabMetricsLogger();
 
@@ -56,12 +63,14 @@
   // Logs TabManager.Background.ForegroundedOrClosed UKM for a tab that was
   // shown after being inactive.
   void LogBackgroundTabShown(ukm::SourceId ukm_source_id,
-                             base::TimeDelta inactive_duration);
+                             base::TimeDelta inactive_duration,
+                             const MRUMetrics& mru_metrics);
 
   // Logs TabManager.Background.ForegroundedOrClosed UKM for a tab that was
   // closed after being inactive.
   void LogBackgroundTabClosed(ukm::SourceId ukm_source_id,
-                              base::TimeDelta inactive_duration);
+                              base::TimeDelta inactive_duration,
+                              const MRUMetrics& mru_metrics);
 
   // Logs TabManager.TabLifetime UKM for a closed tab.
   void LogTabLifetime(ukm::SourceId ukm_source_id,
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
index 7a31f0ee..a20c0d3 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
@@ -819,7 +819,7 @@
       [
         settings.ChromeCleanerCardState.CLEANING, {
           title: this.i18n('chromeCleanupTitleRemoving'),
-          explanation: this.i18n('chromeCleanupExplanationRemove'),
+          explanation: this.i18n('chromeCleanupExplanationRemoving'),
           icon: null,
           actionButton: null,
           flags: settings.ChromeCleanupCardFlags.WAITING_FOR_RESULT |
@@ -896,7 +896,8 @@
         }
       ],
       [
-        settings.ChromeCleanerCardState.CLEANER_DOWNLOAD_FAILED, {
+        settings.ChromeCleanerCardState.CLEANER_DOWNLOAD_FAILED,
+        {
           // TODO(crbug.com/776538): distinguish between missing network
           // connectivity and cleanups being disabled by the server.
           title: this.i18n('chromeCleanupTitleCleanupUnavailable'),
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 84b8d428..114193f 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -2847,8 +2847,6 @@
       "views/passwords/auto_signin_first_run_dialog_view.h",
       "views/passwords/credentials_item_view.cc",
       "views/passwords/credentials_item_view.h",
-      "views/passwords/credentials_selection_view.cc",
-      "views/passwords/credentials_selection_view.h",
       "views/passwords/password_auto_sign_in_view.cc",
       "views/passwords/password_auto_sign_in_view.h",
       "views/passwords/password_bubble_view_base.cc",
@@ -2861,8 +2859,6 @@
       "views/passwords/password_save_confirmation_view.h",
       "views/passwords/password_sign_in_promo_view.cc",
       "views/passwords/password_sign_in_promo_view.h",
-      "views/passwords/password_update_pending_view.cc",
-      "views/passwords/password_update_pending_view.h",
       "views/payments/contact_info_editor_view_controller.cc",
       "views/payments/contact_info_editor_view_controller.h",
       "views/payments/credit_card_editor_view_controller.cc",
@@ -3889,13 +3885,17 @@
       "passwords/password_dialog_controller_mock.h",
       "passwords/passwords_model_delegate_mock.cc",
       "passwords/passwords_model_delegate_mock.h",
+      "tabs/tab_ukm_test_helper.cc",
+      "tabs/tab_ukm_test_helper.h",
       "test/test_confirm_bubble_model.cc",
       "test/test_confirm_bubble_model.h",
     ]
     deps += [
       "//chrome/test:test_support_ui",
       "//components/signin/core/browser",
+      "//components/ukm:test_support",
       "//components/zoom",
+      "//services/metrics/public/mojom",
     ]
   }
 
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
index da7369d92..e47ff94 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
@@ -269,6 +269,29 @@
   return app_id;
 }
 
+std::string ArcAppListPrefs::GetAppIdByPackageName(
+    const std::string& package_name) const {
+  const base::DictionaryValue* apps =
+      prefs_->GetDictionary(arc::prefs::kArcApps);
+  if (!apps)
+    return std::string();
+
+  for (const auto& it : apps->DictItems()) {
+    const base::Value& value = it.second;
+    const base::Value* installed_package_name =
+        value.FindKeyOfType(kPackageName, base::Value::Type::STRING);
+    if (!installed_package_name ||
+        installed_package_name->GetString() != package_name)
+      continue;
+
+    const base::Value* activity_name =
+        value.FindKeyOfType(kActivity, base::Value::Type::STRING);
+    return activity_name ? GetAppId(package_name, activity_name->GetString())
+                         : std::string();
+  }
+  return std::string();
+}
+
 ArcAppListPrefs::ArcAppListPrefs(
     Profile* profile,
     arc::ConnectionHolder<arc::mojom::AppInstance, arc::mojom::AppHost>*
@@ -478,6 +501,17 @@
   return observer_list_.HasObserver(observer);
 }
 
+base::RepeatingCallback<std::string(const std::string&)>
+ArcAppListPrefs::GetAppIdByPackageNameCallback() {
+  return base::BindRepeating(
+      [](base::WeakPtr<ArcAppListPrefs> self, const std::string& package_name) {
+        if (!self)
+          return std::string();
+        return self->GetAppIdByPackageName(package_name);
+      },
+      weak_ptr_factory_.GetWeakPtr());
+}
+
 std::unique_ptr<ArcAppListPrefs::PackageInfo> ArcAppListPrefs::GetPackage(
     const std::string& package_name) const {
   if (!IsArcAlive() || !IsArcAndroidEnabledForProfile(profile_))
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
index 30b8a8bff..cdd1951 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
@@ -178,6 +178,12 @@
   static std::string GetAppId(const std::string& package_name,
                               const std::string& activity);
 
+  // Constructs a unique id based on package name and activity name. Activity
+  // name is found by iterating through the |prefs_| arc app dictionary to find
+  // the app which has a matching |package_name|. This id is safe to use in file
+  // paths and as preference keys.
+  std::string GetAppIdByPackageName(const std::string& package_name) const;
+
   // It is called from chrome/browser/prefs/browser_prefs.cc.
   static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
 
@@ -236,6 +242,9 @@
   void RemoveObserver(Observer* observer);
   bool HasObserver(Observer* observer);
 
+  base::RepeatingCallback<std::string(const std::string&)>
+  GetAppIdByPackageNameCallback();
+
   // arc::ArcSessionManager::Observer:
   void OnArcPlayStoreEnabledChanged(bool enabled) override;
 
diff --git a/chrome/browser/ui/ash/chrome_new_window_client.cc b/chrome/browser/ui/ash/chrome_new_window_client.cc
index 18c372b..b8ba9c88 100644
--- a/chrome/browser/ui/ash/chrome_new_window_client.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_client.cc
@@ -5,7 +5,7 @@
 #include "chrome/browser/ui/ash/chrome_new_window_client.h"
 
 #include "ash/content/keyboard_overlay/keyboard_overlay_view.h"
-#include "ash/public/cpp/ash_switches.h"
+#include "ash/public/cpp/ash_features.h"
 #include "ash/public/interfaces/constants.mojom.h"
 #include "base/macros.h"
 #include "chrome/browser/chromeos/file_manager/app_id.h"
@@ -216,10 +216,8 @@
 
 // TODO(crbug.com/755448): Remove this when the new shortcut viewer is enabled.
 void ChromeNewWindowClient::ShowKeyboardOverlay() {
-  // TODO(wutao): It is only for cl reviewers to test the new shortcut viewer
-  // and will be removed when the new shortcut viewer is enabled.
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          ash::switches::kAshEnableKeyboardShortcutViewer)) {
+  // Show the new keyboard shortcut viewer if the feature is enabled.
+  if (ash::features::IsKeyboardShortcutViewerEnabled()) {
     keyboard_shortcut_viewer_util::ShowKeyboardShortcutViewer();
     return;
   }
diff --git a/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm b/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
index 6d1dcbcf5..0b2129b 100644
--- a/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
+++ b/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
@@ -64,9 +64,13 @@
   autofill::PasswordForm form;
   form.username_value = base::ASCIIToUTF16(username);
   form.password_value = base::ASCIIToUTF16(password);
-  form.all_possible_passwords.push_back(form.password_value);
-  for (auto other_password : other_passwords)
-    form.all_possible_passwords.push_back(base::ASCIIToUTF16(other_password));
+  form.all_possible_passwords.push_back(
+      {form.password_value, base::ASCIIToUTF16("pass_el")});
+  for (size_t i = 0; i < other_passwords.size(); i++) {
+    form.all_possible_passwords.push_back(
+        {base::ASCIIToUTF16(other_passwords[i]),
+         base::ASCIIToUTF16("pass_el" + std::to_string(i))});
+  }
   EXPECT_CALL(*ui_controller_, GetPendingPassword()).WillOnce(ReturnRef(form));
   GURL origin(kSiteOrigin);
   EXPECT_CALL(*ui_controller_, GetOrigin()).WillOnce(ReturnRef(origin));
diff --git a/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
index 90073262..0d52040a 100644
--- a/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
@@ -50,21 +50,25 @@
                        bool are_passwords_revealed,
                        NSPopUpButton* button) {
   [button removeAllItems];
-  for (const base::string16& possible_password : form.all_possible_passwords) {
+  for (const autofill::ValueElementPair& possible_password :
+       form.all_possible_passwords) {
     base::string16 text =
         are_passwords_revealed
-            ? possible_password
-            : base::string16(possible_password.length(), kBulletChar);
+            ? possible_password.first
+            : base::string16(possible_password.first.length(), kBulletChar);
     base::scoped_nsobject<NSMenuItem> newItem([[NSMenuItem alloc]
         initWithTitle:base::SysUTF16ToNSString(text)
                action:NULL
         keyEquivalent:[NSString string]]);
     [[button menu] addItem:newItem];
   }
-  size_t index = std::distance(
-      form.all_possible_passwords.begin(),
-      find(form.all_possible_passwords.begin(),
-           form.all_possible_passwords.end(), form.password_value));
+  size_t index =
+      std::distance(form.all_possible_passwords.begin(),
+                    find_if(form.all_possible_passwords.begin(),
+                            form.all_possible_passwords.end(),
+                            [&form](const autofill::ValueElementPair& pair) {
+                              return pair.first == form.password_value;
+                            }));
   // Unlikely, but if we don't find the password in possible passwords,
   // we will set the default to first element.
   if (index == form.all_possible_passwords.size()) {
@@ -139,7 +143,7 @@
   if (passwordSelectionField_) {
     NSInteger index = [passwordSelectionField_ indexOfSelectedItem];
     self.model->OnCredentialEdited(form.username_value,
-                                   form.all_possible_passwords[index]);
+                                   form.all_possible_passwords[index].first);
     FillPasswordPopup(form, are_passwords_revealed,
                       passwordSelectionField_.get());
   } else {
@@ -161,7 +165,7 @@
     if (passwordSelectionField_) {
       NSInteger index = [passwordSelectionField_ indexOfSelectedItem];
       new_password =
-          self.model->pending_password().all_possible_passwords[index];
+          self.model->pending_password().all_possible_passwords[index].first;
     }
     model->OnCredentialEdited(std::move(new_username), std::move(new_password));
     model->OnSaveClicked();
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index 72c2bee0..54c94b68 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -536,6 +536,23 @@
          local_credentials_.size() > 1 && !password_overridden_;
 }
 
+base::string16 ManagePasswordsBubbleModel::GetInitialUsername() const {
+  const base::string16& captured_username = pending_password_.username_value;
+  if (!ShouldShowMultipleAccountUpdateUI())
+    return captured_username;
+  DCHECK_EQ(password_manager::ui::PENDING_PASSWORD_UPDATE_STATE, state_);
+  DCHECK_GT(local_credentials_.size(), 1u);
+  size_t preferred_form_index = 0;
+  for (size_t index = 0; index < local_credentials_.size(); ++index) {
+    if (local_credentials_.at(index).username_value == captured_username)
+      return captured_username;
+    if (local_credentials_.at(index).preferred)
+      preferred_form_index = index;
+  }
+
+  return local_credentials_.at(preferred_form_index).username_value;
+}
+
 bool ManagePasswordsBubbleModel::ReplaceToShowPromotionIfNeeded() {
   DCHECK_EQ(password_manager::ui::PENDING_PASSWORD_STATE, state_);
   PrefService* prefs = GetProfile()->GetPrefs();
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
index 3486f5a..e7a6e323 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
@@ -144,6 +144,9 @@
   // should be presented.
   bool ShouldShowMultipleAccountUpdateUI() const;
 
+  // Returns the value for the username field when the bubble is opened.
+  base::string16 GetInitialUsername() const;
+
   // Returns true and updates the internal state iff the Save bubble should
   // switch to show a promotion after the password was saved. Otherwise,
   // returns false and leaves the current state.
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
index fc4aff37..2267bc8 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
@@ -156,7 +156,8 @@
   void SetUpWithState(password_manager::ui::State state,
                       ManagePasswordsBubbleModel::DisplayReason reason);
   void PretendPasswordWaiting();
-  void PretendUpdatePasswordWaiting();
+  void PretendUpdatePasswordWaiting(
+      const autofill::PasswordForm& pending_password);
   void PretendAutoSigningIn();
   void PretendManagingPasswords();
 
@@ -166,6 +167,7 @@
 
   static password_manager::InteractionsStats GetTestStats();
   static autofill::PasswordForm GetPendingPassword();
+  static std::vector<std::unique_ptr<autofill::PasswordForm>> GetCurrentForms();
 
  private:
   content::TestBrowserThreadBundle thread_bundle_;
@@ -201,10 +203,12 @@
                  ManagePasswordsBubbleModel::AUTOMATIC);
 }
 
-void ManagePasswordsBubbleModelTest::PretendUpdatePasswordWaiting() {
-  autofill::PasswordForm form = GetPendingPassword();
-  EXPECT_CALL(*controller(), GetPendingPassword()).WillOnce(ReturnRef(form));
-  std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
+void ManagePasswordsBubbleModelTest::PretendUpdatePasswordWaiting(
+    const autofill::PasswordForm& pending_password) {
+  EXPECT_CALL(*controller(), GetPendingPassword())
+      .WillOnce(ReturnRef(pending_password));
+  std::vector<std::unique_ptr<autofill::PasswordForm>> forms =
+      GetCurrentForms();
   EXPECT_CALL(*controller(), GetCurrentForms()).WillOnce(ReturnRef(forms));
   EXPECT_CALL(*controller(), IsPasswordOverridden()).WillOnce(Return(false));
   SetUpWithState(password_manager::ui::PENDING_PASSWORD_UPDATE_STATE,
@@ -219,8 +223,8 @@
 }
 
 void ManagePasswordsBubbleModelTest::PretendManagingPasswords() {
-  std::vector<std::unique_ptr<autofill::PasswordForm>> forms(1);
-  forms[0].reset(new autofill::PasswordForm(GetPendingPassword()));
+  std::vector<std::unique_ptr<autofill::PasswordForm>> forms =
+      GetCurrentForms();
   EXPECT_CALL(*controller(), GetCurrentForms()).WillOnce(ReturnRef(forms));
   SetUpWithState(password_manager::ui::MANAGE_STATE,
                  ManagePasswordsBubbleModel::USER_ACTION);
@@ -263,6 +267,21 @@
   return form;
 }
 
+// static
+std::vector<std::unique_ptr<autofill::PasswordForm>>
+ManagePasswordsBubbleModelTest::GetCurrentForms() {
+  std::vector<std::unique_ptr<autofill::PasswordForm>> forms(3);
+  autofill::PasswordForm another_form(GetPendingPassword());
+  another_form.username_value = base::ASCIIToUTF16("another_username");
+  forms[0].reset(new autofill::PasswordForm(another_form));
+  forms[1].reset(new autofill::PasswordForm(GetPendingPassword()));
+  autofill::PasswordForm preferred_form(GetPendingPassword());
+  preferred_form.username_value = base::ASCIIToUTF16("preferred_username");
+  preferred_form.preferred = true;
+  forms[2].reset(new autofill::PasswordForm(preferred_form));
+  return forms;
+}
+
 TEST_F(ManagePasswordsBubbleModelTest, CloseWithoutInteraction) {
   PretendPasswordWaiting();
 
@@ -333,7 +352,7 @@
 }
 
 TEST_F(ManagePasswordsBubbleModelTest, ClickUpdate) {
-  PretendUpdatePasswordWaiting();
+  PretendUpdatePasswordWaiting(GetPendingPassword());
 
   autofill::PasswordForm form;
   EXPECT_CALL(*controller(), UpdatePassword(form));
@@ -341,6 +360,20 @@
   DestroyModelAndVerifyControllerExpectations();
 }
 
+TEST_F(ManagePasswordsBubbleModelTest, GetInitialUsername_MatchedUsername) {
+  PretendUpdatePasswordWaiting(GetPendingPassword());
+  EXPECT_EQ(base::UTF8ToUTF16(kUsername), model()->GetInitialUsername());
+}
+
+TEST_F(ManagePasswordsBubbleModelTest, GetInitialUsername_PreferredCredential) {
+  autofill::PasswordForm form = GetPendingPassword();
+  // There is no matched username, the preferred credential should be selected.
+  form.username_value = base::UTF8ToUTF16("captcha_code");
+  PretendUpdatePasswordWaiting(form);
+  EXPECT_EQ(base::UTF8ToUTF16("preferred_username"),
+            model()->GetInitialUsername());
+}
+
 TEST_F(ManagePasswordsBubbleModelTest, EditCredential) {
   PretendPasswordWaiting();
   EXPECT_CALL(*GetStore(), RemoveSiteStatsImpl(GURL(kSiteOrigin).GetOrigin()));
@@ -562,7 +595,7 @@
                              : CredentialSourceType::kPasswordManager));
 
           if (update)
-            PretendUpdatePasswordWaiting();
+            PretendUpdatePasswordWaiting(GetPendingPassword());
           else
             PretendPasswordWaiting();
 
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index 6e5fe74a..019f621d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -85,10 +85,13 @@
 #if defined(OS_WIN)
 #include "base/win/windows_version.h"
 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
+#if defined(GOOGLE_CHROME_BUILD)
+#include "chrome/browser/conflicts/problematic_programs_updater_win.h"
+#endif  // defined(GOOGLE_CHROME_BUILD)
 #include "chrome/browser/notifications/notification_platform_bridge_win.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/shell_integration_win.h"
-#endif
+#endif  // defined(OS_WIN)
 
 #if BUILDFLAG(ENABLE_RLZ)
 #include "components/google/core/browser/google_util.h"
@@ -613,6 +616,17 @@
   bool is_incognito_or_guest =
       profile_->GetProfileType() != Profile::ProfileType::REGULAR_PROFILE;
   bool is_post_crash_launch = HasPendingUncleanExit(profile_);
+  bool has_incompatible_applications = false;
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+  if (is_post_crash_launch) {
+    // Check if there are any incompatible applications cached from the last
+    // Chrome run. The TrimCache() function removes any invalid cached entries
+    // first.
+    ProblematicProgramsUpdater::TrimCache();
+    has_incompatible_applications =
+        ProblematicProgramsUpdater::HasCachedPrograms();
+  }
+#endif
   const auto session_startup_pref =
       StartupBrowserCreator::GetSessionStartupPref(command_line_, profile_);
   // Both mandatory and recommended startup policies should skip promo pages.
@@ -621,7 +635,8 @@
       session_startup_pref.TypeIsRecommended(profile_->GetPrefs());
   StartupTabs tabs = DetermineStartupTabs(
       StartupTabProviderImpl(), cmd_line_tabs, process_startup,
-      is_incognito_or_guest, is_post_crash_launch, are_startup_urls_managed);
+      is_incognito_or_guest, is_post_crash_launch,
+      has_incompatible_applications, are_startup_urls_managed);
 
   // Return immediately if we start an async restore, since the remainder of
   // that process is self-contained.
@@ -670,14 +685,27 @@
     bool process_startup,
     bool is_incognito_or_guest,
     bool is_post_crash_launch,
+    bool has_incompatible_applications,
     bool are_startup_urls_managed) {
   // Only the New Tab Page or command line URLs may be shown in incognito mode.
+  if (is_incognito_or_guest) {
+    if (!cmd_line_tabs.empty())
+      return cmd_line_tabs;
+
+    return StartupTabs({StartupTab(GURL(chrome::kChromeUINewTabURL), false)});
+  }
+
   // A similar policy exists for crash recovery launches, to prevent getting the
   // user stuck in a crash loop.
-  if (is_incognito_or_guest || is_post_crash_launch) {
-    if (cmd_line_tabs.empty())
-      return StartupTabs({StartupTab(GURL(chrome::kChromeUINewTabURL), false)});
-    return cmd_line_tabs;
+  if (is_post_crash_launch) {
+    if (!cmd_line_tabs.empty())
+      return cmd_line_tabs;
+
+    StartupTabs tabs = provider.GetPostCrashTabs(has_incompatible_applications);
+    if (!tabs.empty())
+      return tabs;
+
+    return StartupTabs({StartupTab(GURL(chrome::kChromeUINewTabURL), false)});
   }
 
   // A trigger on a profile may indicate that we should show a tab which
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h
index 95849c67..e10a8e2 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.h
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
@@ -68,7 +68,9 @@
   FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch);
   FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs);
   FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
-                           DetermineStartupTabs_IncognitoOrCrash);
+                           DetermineStartupTabs_Incognito);
+  FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
+                           DetermineStartupTabs_Crash);
   FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
                            DetermineStartupTabs_MasterPrefs);
   FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
@@ -146,6 +148,7 @@
                                    bool process_startup,
                                    bool is_ephemeral_profile,
                                    bool is_post_crash_launch,
+                                   bool has_problem_applications,
                                    bool are_startup_urls_managed);
 
   // Begins an asynchronous session restore if current state allows it (e.g.,
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl_unittest.cc b/chrome/browser/ui/startup/startup_browser_creator_impl_unittest.cc
index 5ef3c16..960fb743 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl_unittest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl_unittest.cc
@@ -21,6 +21,7 @@
 constexpr uint32_t kPreferencesTabs = 1 << 4;
 constexpr uint32_t kNewTabPageTabs = 1 << 5;
 constexpr uint32_t kWelcomeBackTab = 1 << 6;
+constexpr uint32_t kPostCrashTab = 1 << 7;
 
 class FakeStartupTabProvider : public StartupTabProvider {
  public:
@@ -83,6 +84,14 @@
     return tabs;
   }
 
+  StartupTabs GetPostCrashTabs(
+      bool has_incompatible_applications) const override {
+    StartupTabs tabs;
+    if (has_incompatible_applications && (options_ & kPostCrashTab))
+      tabs.emplace_back(GURL("https://incompatible-applications"), false);
+    return tabs;
+  }
+
  private:
   const uint32_t options_;
 };
@@ -101,7 +110,7 @@
                chrome::startup::IS_FIRST_RUN);
 
   StartupTabs output = impl.DetermineStartupTabs(provider, StartupTabs(), true,
-                                                 false, false, false);
+                                                 false, false, false, false);
   ASSERT_EQ(4U, output.size());
   EXPECT_EQ("reset-trigger", output[0].url.host());
   EXPECT_EQ("onboarding", output[1].url.host());
@@ -110,16 +119,16 @@
 
   // No extra onboarding content for managed starts.
   output = impl.DetermineStartupTabs(provider, StartupTabs(), true, false,
-                                     false, true);
+                                     false, false, true);
   ASSERT_EQ(3U, output.size());
   EXPECT_EQ("reset-trigger", output[0].url.host());
   EXPECT_EQ("prefs", output[1].url.host());
   EXPECT_EQ("pinned", output[2].url.host());
 }
 
-// All content is blocked in Incognito mode, or when recovering from a crash.
-// Only the New Tab Page should appear in either case.
-TEST(StartupBrowserCreatorImplTest, DetermineStartupTabs_IncognitoOrCrash) {
+// Only the New Tab Page should appear in Incognito mode, skipping all the usual
+// tabs.
+TEST(StartupBrowserCreatorImplTest, DetermineStartupTabs_Incognito) {
   FakeStartupTabProvider provider(kOnboardingTabs | kDistributionFirstRunTabs |
                                   kResetTriggerTabs | kPinnedTabs |
                                   kPreferencesTabs | kNewTabPageTabs);
@@ -129,18 +138,38 @@
 
   // Incognito case:
   StartupTabs output = impl.DetermineStartupTabs(provider, StartupTabs(), true,
-                                                 true, false, false);
+                                                 true, false, false, false);
   ASSERT_EQ(1U, output.size());
   // Check for the actual NTP URL, rather than the sentinel returned by the
   // fake, because the Provider is ignored entirely when short-circuited by
-  // incognito/crash.
+  // incognito logic.
+  EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), output[0].url);
+}
+
+// Also only show the New Tab Page after a crash, except if there is a
+// problem application.
+TEST(StartupBrowserCreatorImplTest, DetermineStartupTabs_Crash) {
+  FakeStartupTabProvider provider(
+      kOnboardingTabs | kDistributionFirstRunTabs | kResetTriggerTabs |
+      kPinnedTabs | kPreferencesTabs | kNewTabPageTabs | kPostCrashTab);
+  Creator impl(base::FilePath(),
+               base::CommandLine(base::CommandLine::NO_PROGRAM),
+               chrome::startup::IS_FIRST_RUN);
+
+  // Regular Crash Recovery case:
+  StartupTabs output = impl.DetermineStartupTabs(provider, StartupTabs(), true,
+                                                 false, true, false, false);
+  ASSERT_EQ(1U, output.size());
+  // Check for the actual NTP URL, rather than the sentinel returned by the
+  // fake, because the Provider is ignored entirely when short-circuited by
+  // the post-crash logic.
   EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), output[0].url);
 
-  // Crash Recovery case:
+  // Crash Recovery case with problem applications:
   output = impl.DetermineStartupTabs(provider, StartupTabs(), true, false, true,
-                                     false);
+                                     true, false);
   ASSERT_EQ(1U, output.size());
-  EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), output[0].url);
+  EXPECT_EQ(GURL("https://incompatible-applications"), output[0].url);
 }
 
 // If Master Preferences specifies content, this should block all other
@@ -154,7 +183,7 @@
                chrome::startup::IS_FIRST_RUN);
 
   StartupTabs output = impl.DetermineStartupTabs(provider, StartupTabs(), true,
-                                                 false, false, false);
+                                                 false, false, false, false);
   ASSERT_EQ(1U, output.size());
   EXPECT_EQ("distribution", output[0].url.host());
 }
@@ -172,7 +201,7 @@
   StartupTabs cmd_line_tabs = {StartupTab(GURL("https://cmd-line"), false)};
 
   StartupTabs output = impl.DetermineStartupTabs(provider, cmd_line_tabs, true,
-                                                 false, false, false);
+                                                 false, false, false, false);
   ASSERT_EQ(2U, output.size());
   EXPECT_EQ("reset-trigger", output[0].url.host());
   EXPECT_EQ("cmd-line", output[1].url.host());
@@ -182,13 +211,19 @@
 
   // Incognito
   output = impl.DetermineStartupTabs(provider, cmd_line_tabs, true, true, false,
-                                     false);
+                                     false, false);
   ASSERT_EQ(1U, output.size());
   EXPECT_EQ("cmd-line", output[0].url.host());
 
   // Crash Recovery
   output = impl.DetermineStartupTabs(provider, cmd_line_tabs, true, false, true,
-                                     false);
+                                     false, false);
+  ASSERT_EQ(1U, output.size());
+  EXPECT_EQ("cmd-line", output[0].url.host());
+
+  // Crash Recovery with incompatible applications.
+  output = impl.DetermineStartupTabs(provider, cmd_line_tabs, true, false, true,
+                                     true, false);
   ASSERT_EQ(1U, output.size());
   EXPECT_EQ("cmd-line", output[0].url.host());
 }
@@ -203,7 +238,7 @@
                chrome::startup::IS_FIRST_RUN);
 
   StartupTabs output = impl.DetermineStartupTabs(
-      provider_allows_ntp, StartupTabs(), true, false, false, false);
+      provider_allows_ntp, StartupTabs(), true, false, false, false, false);
   ASSERT_EQ(3U, output.size());
   EXPECT_EQ("reset-trigger", output[0].url.host());
   EXPECT_EQ("new-tab", output[1].url.host());
@@ -219,7 +254,7 @@
                chrome::startup::IS_FIRST_RUN);
 
   StartupTabs output = impl.DetermineStartupTabs(
-      provider_allows_ntp, StartupTabs(), true, false, false, false);
+      provider_allows_ntp, StartupTabs(), true, false, false, false, false);
   ASSERT_EQ(3U, output.size());
   EXPECT_EQ("welcome-back", output[0].url.host());
   EXPECT_EQ("prefs", output[1].url.host());
@@ -227,14 +262,14 @@
 
   // No welcome back for non-startup opens.
   output = impl.DetermineStartupTabs(provider_allows_ntp, StartupTabs(), false,
-                                     false, false, false);
+                                     false, false, false, false);
   ASSERT_EQ(2U, output.size());
   EXPECT_EQ("prefs", output[0].url.host());
   EXPECT_EQ("pinned", output[1].url.host());
 
   // No welcome back for managed starts even if first run.
   output = impl.DetermineStartupTabs(provider_allows_ntp, StartupTabs(), true,
-                                     false, false, true);
+                                     false, false, false, true);
   ASSERT_EQ(2U, output.size());
   EXPECT_EQ("prefs", output[0].url.host());
   EXPECT_EQ("pinned", output[1].url.host());
diff --git a/chrome/browser/ui/startup/startup_tab_provider.cc b/chrome/browser/ui/startup/startup_tab_provider.cc
index f45b848b..905c06a 100644
--- a/chrome/browser/ui/startup/startup_tab_provider.cc
+++ b/chrome/browser/ui/startup/startup_tab_provider.cc
@@ -175,6 +175,11 @@
       StartupBrowserCreator::GetSessionStartupPref(command_line, profile));
 }
 
+StartupTabs StartupTabProviderImpl::GetPostCrashTabs(
+    bool has_incompatible_applications) const {
+  return GetPostCrashTabsForState(has_incompatible_applications);
+}
+
 // static
 bool StartupTabProviderImpl::CanShowWelcome(bool is_signin_allowed,
                                             bool is_supervised_user,
@@ -301,6 +306,17 @@
 }
 
 // static
+StartupTabs StartupTabProviderImpl::GetPostCrashTabsForState(
+    bool has_incompatible_applications) {
+  StartupTabs tabs;
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+  if (has_incompatible_applications)
+    tabs.emplace_back(GetIncompatibleApplicationsUrl(), false);
+#endif
+  return tabs;
+}
+
+// static
 GURL StartupTabProviderImpl::GetWelcomePageUrl(bool use_later_run_variant) {
   GURL url(chrome::kChromeUIWelcomeURL);
   return use_later_run_variant
@@ -319,7 +335,15 @@
              ? net::AppendQueryParameter(url, "text", "faster")
              : url;
 }
-#endif
+
+#if defined(GOOGLE_CHROME_BUILD)
+// static
+GURL StartupTabProviderImpl::GetIncompatibleApplicationsUrl() {
+  GURL url(chrome::kChromeUISettingsURL);
+  return url.Resolve("incompatibleApplications");
+}
+#endif  // defined(GOOGLE_CHROME_BUILD)
+#endif  // defined(OS_WIN)
 
 // static
 GURL StartupTabProviderImpl::GetTriggeredResetSettingsUrl() {
diff --git a/chrome/browser/ui/startup/startup_tab_provider.h b/chrome/browser/ui/startup/startup_tab_provider.h
index 237848c..d4acb363 100644
--- a/chrome/browser/ui/startup/startup_tab_provider.h
+++ b/chrome/browser/ui/startup/startup_tab_provider.h
@@ -54,6 +54,11 @@
   // configuration where it must be passed explicitly.
   virtual StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line,
                                         Profile* profile) const = 0;
+
+  // Returns the Incompatible Applications settings subpage if any incompatible
+  // applications exists.
+  virtual StartupTabs GetPostCrashTabs(
+      bool has_incompatible_applications) const = 0;
 };
 
 class StartupTabProviderImpl : public StartupTabProvider {
@@ -143,6 +148,11 @@
   // explicitly specified. Session Restore does not expect the NTP to be passed.
   static StartupTabs GetNewTabPageTabsForState(const SessionStartupPref& pref);
 
+  // Determines if the Incompatible Applications settings subpage should be
+  // shown.
+  static StartupTabs GetPostCrashTabsForState(
+      bool has_incompatible_applications);
+
   // Gets the URL for the Welcome page. If |use_later_run_variant| is true, a
   // URL parameter will be appended so as to access the variant page used when
   // onboarding occurs after the first Chrome execution (e.g., when creating an
@@ -154,7 +164,13 @@
   // true, a URL parameter will be appended so as to access the variant page
   // used when onboarding occurs after the first Chrome execution.
   static GURL GetWin10WelcomePageUrl(bool use_later_run_variant);
-#endif
+
+#if defined(GOOGLE_CHROME_BUILD)
+  // Gets the URL for the Incompatible Applications subpage of the Chrome
+  // settings.
+  static GURL GetIncompatibleApplicationsUrl();
+#endif  // defined(GOOGLE_CHROME_BUILD)
+#endif  // defined(OS_WIN)
 
   // Gets the URL for the page which offers to reset the user's profile
   // settings.
@@ -174,6 +190,8 @@
                                  Profile* profile) const override;
   StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line,
                                 Profile* profile) const override;
+  StartupTabs GetPostCrashTabs(
+      bool has_incompatible_applications) const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl);
diff --git a/chrome/browser/ui/tabs/window_activity_watcher.cc b/chrome/browser/ui/tabs/window_activity_watcher.cc
index 44059f9..2571fb0 100644
--- a/chrome/browser/ui/tabs/window_activity_watcher.cc
+++ b/chrome/browser/ui/tabs/window_activity_watcher.cc
@@ -16,6 +16,10 @@
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
 
+#if defined(USE_AURA)
+#include "ui/aura/window.h"
+#endif
+
 using metrics::WindowMetricsEvent;
 
 namespace {
@@ -43,7 +47,9 @@
 };
 
 // Sets metric values that are dependent on the current window state.
-void UpdateMetrics(const Browser* browser, WindowMetrics* window_metrics) {
+void UpdateMetrics(const Browser* browser,
+                   WindowMetrics* window_metrics,
+                   bool is_active) {
   DCHECK(browser->window());
 
   if (browser->window()->IsFullscreen())
@@ -55,12 +61,12 @@
   else
     window_metrics->show_state = WindowMetricsEvent::SHOW_STATE_NORMAL;
 
-  window_metrics->is_active = browser->window()->IsActive();
+  window_metrics->is_active = is_active;
   window_metrics->tab_count = browser->tab_strip_model()->count();
 }
 
 // Returns a populated WindowMetrics for the browser.
-WindowMetrics CreateMetrics(const Browser* browser) {
+WindowMetrics CreateMetrics(const Browser* browser, bool is_active) {
   WindowMetrics window_metrics;
   window_metrics.window_id = browser->session_id().id();
 
@@ -73,7 +79,7 @@
       break;
   }
 
-  UpdateMetrics(browser, &window_metrics);
+  UpdateMetrics(browser, &window_metrics, is_active);
   return window_metrics;
 }
 
@@ -115,9 +121,15 @@
 
   ~BrowserWatcher() override = default;
 
+  void MaybeLogWindowMetricsUkmEntry() {
+    MaybeLogWindowMetricsUkmEntry(browser_->window()->IsActive());
+  }
+
   // Logs a new WindowMetrics entry to the UKM recorder if the entry would be
   // different than the last one we logged.
-  void MaybeLogWindowMetricsUkmEntry() {
+  // |is_active| is provided because IsActive() may be incorrect while browser
+  // activation is changing (namely, when deactivating a window on Windows).
+  void MaybeLogWindowMetricsUkmEntry(bool is_active) {
     // Do nothing if the window has no tabs (which can happen when a window is
     // opened, before a tab is added) or is being closed.
     if (browser_->tab_strip_model()->empty() ||
@@ -126,14 +138,14 @@
     }
 
     if (!last_window_metrics_) {
-      last_window_metrics_ = CreateMetrics(browser_);
+      last_window_metrics_ = CreateMetrics(browser_, is_active);
       LogWindowMetricsUkmEntry(last_window_metrics_.value());
       return;
     }
 
     // Copy old state to compare with.
     WindowMetrics old_metrics = last_window_metrics_.value();
-    UpdateMetrics(browser_, &last_window_metrics_.value());
+    UpdateMetrics(browser_, &last_window_metrics_.value(), is_active);
 
     // We only need to create a new UKM entry if the metrics have changed.
     if (old_metrics != last_window_metrics_.value())
@@ -210,6 +222,24 @@
   // initialization.
   // TODO(michaelpg): The browser window check should be unnecessary
   // (https://crbug.com/811191, https://crbug.com/811243).
-  if (ShouldTrackBrowser(browser) && browser->window())
-    browser_watchers_[browser]->MaybeLogWindowMetricsUkmEntry();
+  if (!ShouldTrackBrowser(browser) || !browser->window())
+    return;
+
+#if defined(USE_AURA)
+  // On some platforms, the window is hidden (and deactivated) before it starts
+  // closing. Unless the window is minimized, assume that being deactivated
+  // while hidden means it's about to close, and don't log in that case.
+  if (browser->window()->GetNativeWindow() &&
+      !browser->window()->GetNativeWindow()->IsVisible() &&
+      !browser->window()->IsMinimized()) {
+    return;
+  }
+#endif
+
+  // On Windows, the browser window's IsActive() may still return true until the
+  // WM updates the focused window, and BrowserList::GetLastActive() still
+  // returns this browser until another one is activated. So we explicitly pass
+  // along that the window should be considered inactive.
+  browser_watchers_[browser]->MaybeLogWindowMetricsUkmEntry(
+      /*is_active=*/false);
 }
diff --git a/chrome/browser/ui/tabs/window_activity_watcher_interactive_uitest.cc b/chrome/browser/ui/tabs/window_activity_watcher_interactive_uitest.cc
new file mode 100644
index 0000000..ed1fd90
--- /dev/null
+++ b/chrome/browser/ui/tabs/window_activity_watcher_interactive_uitest.cc
@@ -0,0 +1,298 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <memory>
+
+#include "base/macros.h"
+#include "build/build_config.h"
+#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/tabs/tab_ukm_test_helper.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "chrome/test/base/interactive_test_utils.h"
+#include "chrome/test/base/ui_test_utils.h"
+#include "components/ukm/test_ukm_recorder.h"
+#include "services/metrics/public/cpp/ukm_builders.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using metrics::WindowMetricsEvent;
+using ukm::builders::TabManager_TabMetrics;
+using ukm::builders::TabManager_WindowMetrics;
+
+namespace {
+
+const char* kEntryName = TabManager_WindowMetrics::kEntryName;
+const char* kTestUrl = "https://example.com/";
+
+}  // namespace
+
+// Tests UKM entries generated by WindowActivityWatcher due to interactive
+// changes to window state.
+class WindowActivityWatcherTest : public InProcessBrowserTest {
+ protected:
+  WindowActivityWatcherTest() = default;
+
+  // InProcessBrowserTest:
+  void PreRunTestOnMainThread() override {
+    InProcessBrowserTest::PreRunTestOnMainThread();
+    ukm_entry_checker_ = std::make_unique<UkmEntryChecker>();
+  }
+
+  void SetUpOnMainThread() override {
+#if defined(OS_MACOSX)
+    // On Mac, the browser window needs to be forced to the front.
+    ui_test_utils::BrowserActivationWaiter waiter(browser());
+    ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
+    waiter.WaitForActivation();
+    ASSERT_TRUE(browser()->window()->IsActive());
+#endif
+
+    // Browser is created in BrowserMain() before the test UKM recorder.
+    ASSERT_EQ(0u, ukm_entry_checker_->NumEntries(kEntryName));
+  }
+
+ protected:
+  std::unique_ptr<UkmEntryChecker> ukm_entry_checker_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(WindowActivityWatcherTest);
+};
+
+// Tests WindowMetrics UKMs logged by the current browser window.
+IN_PROC_BROWSER_TEST_F(WindowActivityWatcherTest, Basic) {
+  UkmMetricMap expected_metrics({
+      {TabManager_WindowMetrics::kWindowIdName, browser()->session_id().id()},
+      {TabManager_WindowMetrics::kShowStateName,
+       WindowMetricsEvent::SHOW_STATE_NORMAL},
+      {TabManager_WindowMetrics::kTypeName, WindowMetricsEvent::TYPE_TABBED},
+      {TabManager_WindowMetrics::kIsActiveName, 1},
+      {TabManager_WindowMetrics::kTabCountName, 1},
+  });
+
+  // Updated metrics are logged after adding tabs.
+  {
+    SCOPED_TRACE("");
+    AddTabAtIndex(1, GURL(kTestUrl), ui::PAGE_TRANSITION_LINK);
+    expected_metrics[TabManager_WindowMetrics::kTabCountName] = 2;
+    ukm_entry_checker_->ExpectNewEntry(kEntryName, GURL(), expected_metrics);
+  }
+  {
+    SCOPED_TRACE("");
+    AddTabAtIndex(0, GURL(kTestUrl), ui::PAGE_TRANSITION_LINK);
+    expected_metrics[TabManager_WindowMetrics::kTabCountName] = 3;
+    ukm_entry_checker_->ExpectNewEntry(kEntryName, GURL(), expected_metrics);
+  }
+
+  // Closing the window doesn't log more WindowMetrics UKMs.
+  CloseBrowserSynchronously(browser());
+}
+
+// TODO(https://crbug.com/51364): Implement BrowserWindow::Deactivate() on Mac.
+#if !defined(OS_MACOSX)
+// Tests WindowMetrics UKMs logged by activating/deactivating the window.
+IN_PROC_BROWSER_TEST_F(WindowActivityWatcherTest, WindowActivation) {
+  UkmMetricMap expected_metrics({
+      {TabManager_WindowMetrics::kWindowIdName, browser()->session_id().id()},
+      {TabManager_WindowMetrics::kShowStateName,
+       WindowMetricsEvent::SHOW_STATE_NORMAL},
+      {TabManager_WindowMetrics::kTypeName, WindowMetricsEvent::TYPE_TABBED},
+      {TabManager_WindowMetrics::kIsActiveName, 0},
+      {TabManager_WindowMetrics::kTabCountName, 1},
+  });
+
+  {
+    SCOPED_TRACE("");
+    ui_test_utils::BrowserDeactivationWaiter waiter(browser());
+    browser()->window()->Deactivate();
+    waiter.WaitForDeactivation();
+    ukm_entry_checker_->ExpectNewEntry(kEntryName, GURL(), expected_metrics);
+  }
+
+  {
+    SCOPED_TRACE("");
+    ui_test_utils::BrowserActivationWaiter waiter(browser());
+    browser()->window()->Activate();
+    waiter.WaitForActivation();
+    ASSERT_TRUE(browser()->window()->IsActive());
+    expected_metrics[TabManager_WindowMetrics::kIsActiveName] = 1;
+    ukm_entry_checker_->ExpectNewEntry(kEntryName, GURL(), expected_metrics);
+  }
+
+  // Closing the window doesn't log more WindowMetrics UKMs.
+  CloseBrowserSynchronously(browser());
+}
+
+// Tests WindowMetrics UKMs logged when switching between windows.
+IN_PROC_BROWSER_TEST_F(WindowActivityWatcherTest, MultipleWindows) {
+  // Create a new browser window.
+  Browser* browser_2 = CreateBrowser(browser()->profile());
+  {
+    SCOPED_TRACE("");
+    ukm_entry_checker_->ExpectNewEntry(
+        kEntryName, GURL(),
+        {
+            {TabManager_WindowMetrics::kWindowIdName,
+             browser_2->session_id().id()},
+            {TabManager_WindowMetrics::kIsActiveName, 0},
+        });
+  }
+
+  // Wait for the old window to be deactivated and the new window to be
+  // activated if they aren't yet.
+  {
+    ui_test_utils::BrowserActivationWaiter waiter(browser_2);
+    waiter.WaitForActivation();
+  }
+  {
+    ui_test_utils::BrowserDeactivationWaiter waiter(browser());
+    waiter.WaitForDeactivation();
+  }
+  {
+    SCOPED_TRACE("");
+    // Check for activation and deactivation events. The exact order is
+    // platform-dependent.
+    ukm_entry_checker_->ExpectNewEntries(
+        kEntryName, {{
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser_2->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 1},
+                     },
+                     {
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser()->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 0},
+                     }});
+  }
+
+  {
+    SCOPED_TRACE("");
+    ui_test_utils::BrowserActivationWaiter activation_waiter(browser());
+    ui_test_utils::BrowserDeactivationWaiter deactivation_waiter(browser_2);
+
+    // Switch back to the first window.
+    // Note: use Activate() rather than Show() because on some platforms, Show()
+    // calls SetLastActive() before doing anything else.
+    browser()->window()->Activate();
+
+    activation_waiter.WaitForActivation();
+    deactivation_waiter.WaitForDeactivation();
+
+    // Check for activation and deactivation events. The exact order is
+    // platform-dependent.
+    ukm_entry_checker_->ExpectNewEntries(
+        kEntryName, {{
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser()->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 1},
+                     },
+                     {
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser_2->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 0},
+                     }});
+  }
+
+  // Closing the active window activates the second window.
+  ASSERT_EQ(0, ukm_entry_checker_->NumNewEntriesRecorded(kEntryName));
+
+  CloseBrowserSynchronously(browser());
+
+  // GetLastActive could return browser2 if browser1 was active and then was
+  // removed, so browser2 might not actually be active.
+  {
+    ui_test_utils::BrowserActivationWaiter activation_waiter(browser_2);
+    browser_2->window()->Activate();
+    activation_waiter.WaitForActivation();
+  }
+  EXPECT_TRUE(BrowserList::GetInstance()->GetLastActive() == browser_2);
+  EXPECT_TRUE(browser_2->window()->IsActive());
+  {
+    SCOPED_TRACE("");
+    // Check for activation and deactivation events. The exact order is
+    // platform-dependent.
+    ukm_entry_checker_->ExpectNewEntries(
+        kEntryName, {{
+                        {TabManager_WindowMetrics::kWindowIdName,
+                         browser_2->session_id().id()},
+                        {TabManager_WindowMetrics::kIsActiveName, 1},
+                    }});
+  }
+
+  // Occasionally, X sends an extraneous deactivate/reactivate cycle.
+  if (ukm_entry_checker_->NumNewEntriesRecorded(kEntryName) == 2) {
+    SCOPED_TRACE("");
+    LOG(WARNING) << "Extra deactivate/reactivate detected.";
+    ukm_entry_checker_->ExpectNewEntries(
+        kEntryName, {{
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser_2->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 0},
+                     },
+                     {
+                         {TabManager_WindowMetrics::kWindowIdName,
+                          browser_2->session_id().id()},
+                         {TabManager_WindowMetrics::kIsActiveName, 1},
+                     }});
+  }
+
+  // Ignore UKMs that might be logged from spurious activation events.
+  ukm_entry_checker_.reset();
+}
+
+// Tests we don't emit a ridiculous number of UKMs, which may indicate
+// unintended log entries or unexpected interactions between events.
+IN_PROC_BROWSER_TEST_F(WindowActivityWatcherTest, DontFloodUkm) {
+  // TODO(michaelpg): Update once window metrics are folded into tab metrics.
+  constexpr int kTooManyWindowMetricsEntries = 40;
+  constexpr int kTooManyTabMetricsEntries = 20;
+
+  // Add and activate some tabs.
+  for (int i = 0; i < 3; i++)
+    AddTabAtIndex(1, GURL(kTestUrl), ui::PAGE_TRANSITION_LINK);
+
+  // Make more windows with tabs.
+  constexpr bool kCheckNavigationSuccess = false;
+  Browser* browser_2 = CreateBrowser(browser()->profile());
+  for (int i = 0; i < 3; i++) {
+    AddTabAtIndexToBrowser(browser_2, 1, GURL(kTestUrl),
+                           ui::PAGE_TRANSITION_LINK, kCheckNavigationSuccess);
+  }
+  Browser* browser_3 = CreateBrowser(browser()->profile());
+  for (int i = 0; i < 3; i++) {
+    AddTabAtIndexToBrowser(browser_3, 1, GURL(kTestUrl),
+                           ui::PAGE_TRANSITION_LINK, kCheckNavigationSuccess);
+  }
+
+  // Cycle between windows.
+  for (Browser* next_browser :
+       {browser_2, browser_3, browser(), browser_2, browser_3}) {
+    next_browser->window()->Activate();
+    ui_test_utils::BrowserActivationWaiter(next_browser).WaitForActivation();
+  }
+
+  // Manage windows.
+  browser_2->window()->Minimize();
+  browser_2->window()->Maximize();
+  browser_3->window()->Maximize();
+  browser_2->window()->Restore();
+  browser_3->window()->Minimize();
+
+  CloseBrowserSynchronously(browser());
+  CloseBrowserSynchronously(browser_2);
+  CloseBrowserSynchronously(browser_3);
+
+  ASSERT_GT(ukm_entry_checker_->NumNewEntriesRecorded(kEntryName), 0);
+  ASSERT_LT(ukm_entry_checker_->NumNewEntriesRecorded(kEntryName),
+            kTooManyWindowMetricsEntries);
+
+  ASSERT_GT(ukm_entry_checker_->NumNewEntriesRecorded(
+                TabManager_TabMetrics::kEntryName),
+            0);
+  ASSERT_LT(ukm_entry_checker_->NumNewEntriesRecorded(
+                TabManager_TabMetrics::kEntryName),
+            kTooManyTabMetricsEntries);
+}
+#endif  // !defined(OS_MACOSX)
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
index 476d295..efb61635 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
@@ -713,8 +713,9 @@
   EXPECT_EQ(0, window->GetProperty(aura::client::kTopViewInset));
 }
 
+// Disabled due to high flake rate; https://crbug.com/818170.
 IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest,
-                       HeaderVisibilityInOverviewAndSplitview) {
+                       DISABLED_HeaderVisibilityInOverviewAndSplitview) {
   BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
   Widget* widget = browser_view->GetWidget();
   BrowserNonClientFrameViewAsh* frame_view =
diff --git a/chrome/browser/ui/views/passwords/credentials_selection_view.cc b/chrome/browser/ui/views/passwords/credentials_selection_view.cc
deleted file mode 100644
index e369a66b..0000000
--- a/chrome/browser/ui/views/passwords/credentials_selection_view.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
-
-#include <stddef.h>
-
-#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
-#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
-#include "chrome/browser/ui/views/harmony/chrome_typography.h"
-#include "components/password_manager/core/browser/password_manager_metrics_util.h"
-#include "ui/base/models/simple_combobox_model.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/controls/combobox/combobox.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/grid_layout.h"
-
-namespace {
-
-views::Label* GeneratePasswordLabel(const autofill::PasswordForm& form) {
-  views::Label* label =
-      new views::Label(form.password_value, CONTEXT_DEPRECATED_SMALL);
-  label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
-  label->SetObscured(true);
-  return label;
-}
-
-}  // namespace
-
-CredentialsSelectionView::CredentialsSelectionView(
-    ManagePasswordsBubbleModel* manage_passwords_bubble_model)
-    : password_forms_(&manage_passwords_bubble_model->local_credentials()),
-      default_index_(0),
-      is_default_best_match_(false),
-      is_default_preferred_(false),
-      action_reported_(false) {
-  DCHECK(!password_forms_->empty());
-
-  // Layout.
-  views::GridLayout* layout =
-      SetLayoutManager(std::make_unique<views::GridLayout>(this));
-
-  // ColumnSet.
-  int column_set_id = 0;
-  views::ColumnSet* column_set = layout->AddColumnSet(column_set_id);
-  column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
-                        views::GridLayout::FIXED, 0, 0);
-  ChromeLayoutProvider* layout_provider = ChromeLayoutProvider::Get();
-  const int inner_padding = layout_provider->GetDistanceMetric(
-      views::DISTANCE_RELATED_LABEL_HORIZONTAL);
-  column_set->AddPaddingColumn(0, inner_padding);
-  column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
-                        views::GridLayout::FIXED, 0, 0);
-  column_set->AddPaddingColumn(0, inner_padding);
-
-  // The username combobox and password label.
-  layout->StartRow(0, column_set_id);
-  GenerateUsernameCombobox(
-      manage_passwords_bubble_model->pending_password().username_value);
-  layout->AddView(combobox_.get());
-  views::Label* label =
-      GeneratePasswordLabel(manage_passwords_bubble_model->pending_password());
-  layout->AddView(label);
-
-  GetLayoutManager()->Layout(this);
-}
-
-CredentialsSelectionView::~CredentialsSelectionView() {
-  ReportUserActionOnce(true, -1);
-  // |combobox_| has a pointer to |combobox_model_|, so |combobox_| should be
-  // deleted before deleting of |combobox_model_|. To ensure this, let's delete
-  // it now.
-  combobox_.reset();
-}
-
-const autofill::PasswordForm*
-CredentialsSelectionView::GetSelectedCredentials() {
-  DCHECK_EQ(password_forms_->size(),
-            static_cast<size_t>(combobox_->model()->GetItemCount()));
-  ReportUserActionOnce(false, combobox_->selected_index());
-  return &password_forms_->at(combobox_->selected_index());
-}
-
-void CredentialsSelectionView::GenerateUsernameCombobox(
-    const base::string16& best_matched_username) {
-  std::vector<base::string16> usernames;
-  size_t best_matched_username_index = password_forms_->size();
-  size_t preferred_form_index = password_forms_->size();
-  for (size_t index = 0; index < password_forms_->size(); ++index) {
-    usernames.push_back(password_forms_->at(index).username_value);
-    if (password_forms_->at(index).username_value == best_matched_username) {
-      best_matched_username_index = index;
-    }
-    if (password_forms_->at(index).preferred) {
-      preferred_form_index = index;
-    }
-  }
-
-  combobox_model_.reset(new ui::SimpleComboboxModel(usernames));
-  combobox_.reset(new views::Combobox(combobox_model_.get()));
-
-  if (best_matched_username_index < password_forms_->size()) {
-    is_default_best_match_ = true;
-    default_index_ = best_matched_username_index;
-    combobox_->SetSelectedIndex(best_matched_username_index);
-  } else if (preferred_form_index < password_forms_->size()) {
-    is_default_preferred_ = true;
-    default_index_ = preferred_form_index;
-    combobox_->SetSelectedIndex(preferred_form_index);
-  }
-}
-
-void CredentialsSelectionView::ReportUserActionOnce(bool was_update_rejected,
-                                                    int selected_index) {
-  if (action_reported_)
-    return;
-  password_manager::metrics_util::MultiAccountUpdateBubbleUserAction action;
-  if (was_update_rejected) {
-    if (is_default_best_match_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_MATCHED_BY_PASSWORD_USER_REJECTED_UPDATE;
-    } else if (is_default_preferred_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_PREFERRED_USER_REJECTED_UPDATE;
-    } else {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_FIRST_USER_REJECTED_UPDATE;
-    }
-  } else if (selected_index == default_index_) {
-    if (is_default_best_match_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_MATCHED_BY_PASSWORD_USER_NOT_CHANGED;
-    } else if (is_default_preferred_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_PREFERRED_USER_NOT_CHANGED;
-    } else {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_FIRST_USER_NOT_CHANGED;
-    }
-  } else {
-    if (is_default_best_match_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_MATCHED_BY_PASSWORD_USER_CHANGED;
-    } else if (is_default_preferred_) {
-      action = password_manager::metrics_util::
-          DEFAULT_ACCOUNT_PREFERRED_USER_CHANGED;
-    } else {
-      action =
-          password_manager::metrics_util::DEFAULT_ACCOUNT_FIRST_USER_CHANGED;
-    }
-  }
-
-  password_manager::metrics_util::LogMultiAccountUpdateBubbleUserAction(action);
-  action_reported_ = true;
-}
diff --git a/chrome/browser/ui/views/passwords/credentials_selection_view.h b/chrome/browser/ui/views/passwords/credentials_selection_view.h
deleted file mode 100644
index b71e2985..0000000
--- a/chrome/browser/ui/views/passwords/credentials_selection_view.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
-#define CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
-
-#include <memory>
-#include <vector>
-
-#include "base/macros.h"
-#include "components/autofill/core/common/password_form.h"
-#include "ui/views/view.h"
-
-namespace views {
-class Combobox;
-}
-
-namespace ui {
-class SimpleComboboxModel;
-}
-
-class ManagePasswordsBubbleModel;
-
-// A view where the user can select a credential.
-class CredentialsSelectionView : public views::View {
- public:
-  explicit CredentialsSelectionView(
-      ManagePasswordsBubbleModel* manage_passwords_bubble_model);
-  ~CredentialsSelectionView() override;
-
-  // This methods also reports a user action.
-  const autofill::PasswordForm* GetSelectedCredentials();
-
- private:
-  void GenerateUsernameCombobox(const base::string16& best_matched_username);
-  void ReportUserActionOnce(bool was_update_rejected, int selected_index);
-
-  const std::vector<autofill::PasswordForm>* password_forms_;
-  std::unique_ptr<views::Combobox> combobox_;
-  std::unique_ptr<ui::SimpleComboboxModel> combobox_model_;
-  int default_index_;
-  bool is_default_best_match_;
-  bool is_default_preferred_;
-  bool action_reported_;
-
-  DISALLOW_COPY_AND_ASSIGN(CredentialsSelectionView);
-};
-
-#endif  // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
diff --git a/chrome/browser/ui/views/passwords/password_bubble_view_base.cc b/chrome/browser/ui/views/passwords/password_bubble_view_base.cc
index b22d0bf..59c97b8d 100644
--- a/chrome/browser/ui/views/passwords/password_bubble_view_base.cc
+++ b/chrome/browser/ui/views/passwords/password_bubble_view_base.cc
@@ -13,7 +13,6 @@
 #include "chrome/browser/ui/views/passwords/password_items_view.h"
 #include "chrome/browser/ui/views/passwords/password_pending_view.h"
 #include "chrome/browser/ui/views/passwords/password_save_confirmation_view.h"
-#include "chrome/browser/ui/views/passwords/password_update_pending_view.h"
 #include "ui/base/material_design/material_design_controller.h"
 
 #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
@@ -95,10 +94,8 @@
     view = new PasswordSaveConfirmationView(web_contents, anchor_view,
                                             anchor_point, reason);
   } else if (model_state ==
-             password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) {
-    view = new PasswordUpdatePendingView(web_contents, anchor_view,
-                                         anchor_point, reason);
-  } else if (model_state == password_manager::ui::PENDING_PASSWORD_STATE) {
+                 password_manager::ui::PENDING_PASSWORD_UPDATE_STATE ||
+             model_state == password_manager::ui::PENDING_PASSWORD_STATE) {
     view = new PasswordPendingView(web_contents, anchor_view, anchor_point,
                                    reason);
   } else {
diff --git a/chrome/browser/ui/views/passwords/password_items_view.cc b/chrome/browser/ui/views/passwords/password_items_view.cc
index 8c428a8..205908d 100644
--- a/chrome/browser/ui/views/passwords/password_items_view.cc
+++ b/chrome/browser/ui/views/passwords/password_items_view.cc
@@ -107,9 +107,9 @@
 }
 
 std::unique_ptr<views::Textfield> CreateUsernameEditable(
-    const autofill::PasswordForm& form) {
+    const base::string16& initial_username) {
   auto editable = std::make_unique<views::Textfield>();
-  editable->SetText(form.username_value);
+  editable->SetText(initial_username);
   editable->SetAccessibleName(
       l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_USERNAME_LABEL));
   // In case of long username, ensure that the beginning of value is visible.
diff --git a/chrome/browser/ui/views/passwords/password_items_view.h b/chrome/browser/ui/views/passwords/password_items_view.h
index a1f9044..e0c43909 100644
--- a/chrome/browser/ui/views/passwords/password_items_view.h
+++ b/chrome/browser/ui/views/passwords/password_items_view.h
@@ -28,7 +28,7 @@
     int federation_message_id,
     bool is_password_visible);
 std::unique_ptr<views::Textfield> CreateUsernameEditable(
-    const autofill::PasswordForm& form);
+    const base::string16& initial_username);
 
 // A dialog for managing stored password and federated login information for a
 // specific site. A user can remove managed credentials for the site via this
diff --git a/chrome/browser/ui/views/passwords/password_pending_view.cc b/chrome/browser/ui/views/passwords/password_pending_view.cc
index 16fccd7..ff224dde 100644
--- a/chrome/browser/ui/views/passwords/password_pending_view.cc
+++ b/chrome/browser/ui/views/passwords/password_pending_view.cc
@@ -4,6 +4,11 @@
 
 #include "chrome/browser/ui/views/passwords/password_pending_view.h"
 
+#include <algorithm>
+#include <memory>
+#include <utility>
+#include <vector>
+
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
@@ -76,12 +81,23 @@
   }
 }
 
+// Create a vector which contains only the values in |items| and no elements.
+std::vector<base::string16> ToValues(
+    const autofill::ValueElementVector& items) {
+  std::vector<base::string16> passwords;
+  passwords.reserve(items.size());
+  for (auto& pair : items)
+    passwords.push_back(pair.first);
+  return passwords;
+}
+
 // A combobox model for password dropdown that allows to reveal/mask values in
 // the combobox.
 class PasswordDropdownModel : public ui::ComboboxModel {
  public:
-  PasswordDropdownModel(bool revealed, const std::vector<base::string16>& items)
-      : revealed_(revealed), passwords_(items) {}
+  PasswordDropdownModel(bool revealed,
+                        const autofill::ValueElementVector& items)
+      : revealed_(revealed), passwords_(ToValues(items)) {}
   ~PasswordDropdownModel() override {}
 
   void SetRevealed(bool revealed) {
@@ -146,10 +162,13 @@
   std::unique_ptr<views::Combobox> combobox =
       std::make_unique<views::Combobox>(std::make_unique<PasswordDropdownModel>(
           are_passwords_revealed, form.all_possible_passwords));
-  size_t index = std::distance(
-      form.all_possible_passwords.begin(),
-      find(form.all_possible_passwords.begin(),
-           form.all_possible_passwords.end(), form.password_value));
+  size_t index =
+      std::distance(form.all_possible_passwords.begin(),
+                    find_if(form.all_possible_passwords.begin(),
+                            form.all_possible_passwords.end(),
+                            [&form](const autofill::ValueElementPair& pair) {
+                              return pair.first == form.password_value;
+                            }));
   // Unlikely, but if we don't find the password in possible passwords,
   // we will set the default to first element.
   if (index == form.all_possible_passwords.size()) {
@@ -169,6 +188,8 @@
                                          const gfx::Point& anchor_point,
                                          DisplayReason reason)
     : PasswordBubbleViewBase(web_contents, anchor_view, anchor_point, reason),
+      is_update_bubble_(model()->state() ==
+                        password_manager::ui::PENDING_PASSWORD_UPDATE_STATE),
       sign_in_promo_(nullptr),
       desktop_ios_promo_(nullptr),
       username_field_(nullptr),
@@ -178,15 +199,19 @@
       password_label_(nullptr),
       are_passwords_revealed_(
           model()->are_passwords_revealed_when_bubble_is_opened()) {
-  // Create credentials row.
+  DCHECK(model()->state() == password_manager::ui::PENDING_PASSWORD_STATE ||
+         model()->state() ==
+             password_manager::ui::PENDING_PASSWORD_UPDATE_STATE);
   const autofill::PasswordForm& password_form = model()->pending_password();
-  const bool is_password_credential = password_form.federation_origin.unique();
   if (model()->enable_editing()) {
-    username_field_ = CreateUsernameEditable(password_form).release();
+    username_field_ =
+        CreateUsernameEditable(model()->GetInitialUsername()).release();
   } else {
     username_field_ = CreateUsernameLabel(password_form).release();
   }
 
+  const bool is_password_credential = password_form.federation_origin.unique();
+
   CreatePasswordField();
 
   if (is_password_credential) {
@@ -251,6 +276,11 @@
 PasswordPendingView::~PasswordPendingView() = default;
 
 bool PasswordPendingView::Accept() {
+  if (is_update_bubble_) {
+    UpdateUsernameAndPasswordInModel();
+    model()->OnUpdateClicked(model()->pending_password());
+    return true;
+  }
   if (sign_in_promo_)
     return sign_in_promo_->Accept();
 #if defined(OS_WIN)
@@ -267,14 +297,19 @@
 }
 
 bool PasswordPendingView::Cancel() {
-  if (sign_in_promo_)
-    return sign_in_promo_->Cancel();
+  if (is_update_bubble_) {
+    model()->OnNopeUpdateClicked();
+    return true;
+  } else {
+    if (sign_in_promo_)
+      return sign_in_promo_->Cancel();
 #if defined(OS_WIN)
-  if (desktop_ios_promo_)
-    return desktop_ios_promo_->Cancel();
+    if (desktop_ios_promo_)
+      return desktop_ios_promo_->Cancel();
 #endif
-  model()->OnNeverForThisSiteClicked();
-  return true;
+    model()->OnNeverForThisSiteClicked();
+    return true;
+  }
 }
 
 bool PasswordPendingView::Close() {
@@ -316,8 +351,13 @@
 
 base::string16 PasswordPendingView::GetDialogButtonLabel(
     ui::DialogButton button) const {
-  // TODO(pbos): Generalize the different promotion classes to not store and ask
-  // each different possible promo.
+  if (is_update_bubble_) {
+    return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
+                                         ? IDS_PASSWORD_MANAGER_UPDATE_BUTTON
+                                         : IDS_PASSWORD_MANAGER_CANCEL_BUTTON);
+  }
+  // TODO(pbos): Generalize the different promotion classes to not store and
+  // ask each different possible promo.
   if (sign_in_promo_)
     return sign_in_promo_->GetDialogButtonLabel(button);
 #if defined(OS_WIN)
@@ -412,8 +452,11 @@
     base::TrimString(new_username, base::ASCIIToUTF16(" "), &new_username);
   }
   if (password_editable) {
-    new_password = model()->pending_password().all_possible_passwords.at(
-        password_dropdown_->selected_index());
+    new_password =
+        model()
+            ->pending_password()
+            .all_possible_passwords.at(password_dropdown_->selected_index())
+            .first;
   }
   model()->OnCredentialEdited(new_username, new_password);
 }
diff --git a/chrome/browser/ui/views/passwords/password_pending_view.h b/chrome/browser/ui/views/passwords/password_pending_view.h
index 8955795..0afbd083 100644
--- a/chrome/browser/ui/views/passwords/password_pending_view.h
+++ b/chrome/browser/ui/views/passwords/password_pending_view.h
@@ -21,9 +21,9 @@
 class DesktopIOSPromotionBubbleView;
 class PasswordSignInPromoView;
 
-// A view offering the user the ability to save credentials. Contains a
-// username and password field, along with a "Save Passwords" button and a
-// "Never" button.
+// A view offering the user the ability to save or update credentials (depending
+// on |is_update_bubble|). Contains a username and password field, along with a
+// "Save"/"Update" button and a "Never"/"Nope" button.
 class PasswordPendingView : public PasswordBubbleViewBase,
                             public views::ButtonListener,
                             public views::StyledLabelListener {
@@ -75,6 +75,9 @@
   void ReplaceWithPromo();
   void UpdateTitleText(views::StyledLabel* title_view);
 
+  // True iff it is an update password bubble. False iff it is a save bubble.
+  const bool is_update_bubble_;
+
   // Different promo dialogs that helps the user get access to credentials
   // across devices. One of these are non-null when the promotion dialog is
   // active.
diff --git a/chrome/browser/ui/views/passwords/password_update_pending_view.cc b/chrome/browser/ui/views/passwords/password_update_pending_view.cc
deleted file mode 100644
index d84a677..0000000
--- a/chrome/browser/ui/views/passwords/password_update_pending_view.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/passwords/password_update_pending_view.h"
-
-#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
-#include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
-#include "chrome/browser/ui/views/passwords/password_items_view.h"
-#include "chrome/browser/ui/views/passwords/password_pending_view.h"
-#include "chrome/grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/bubble/bubble_frame_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/styled_label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/layout/grid_layout.h"
-
-PasswordUpdatePendingView::PasswordUpdatePendingView(
-    content::WebContents* web_contents,
-    views::View* anchor_view,
-    const gfx::Point& anchor_point,
-    DisplayReason reason)
-    : PasswordBubbleViewBase(web_contents, anchor_view, anchor_point, reason),
-      selection_view_(nullptr) {
-  // Credential row.
-  if (model()->ShouldShowMultipleAccountUpdateUI()) {
-    SetLayoutManager(std::make_unique<views::FillLayout>());
-    selection_view_ = new CredentialsSelectionView(model());
-    AddChildView(selection_view_);
-  } else {
-    const autofill::PasswordForm& password_form = model()->pending_password();
-    views::GridLayout* layout =
-        SetLayoutManager(std::make_unique<views::GridLayout>(this));
-    PasswordPendingView::BuildCredentialRows(
-        layout, CreateUsernameLabel(password_form).release(),
-        CreatePasswordLabel(password_form,
-                            IDS_PASSWORD_MANAGER_SIGNIN_VIA_FEDERATION, false)
-            .release(),
-        nullptr, /* password_view_button */
-        true /* show_password_label */);
-  }
-}
-
-PasswordUpdatePendingView::~PasswordUpdatePendingView() = default;
-
-gfx::Size PasswordUpdatePendingView::CalculatePreferredSize() const {
-  const int width = ChromeLayoutProvider::Get()->GetDistanceMetric(
-                        DISTANCE_BUBBLE_PREFERRED_WIDTH) -
-                    margins().width();
-  return gfx::Size(width, GetHeightForWidth(width));
-}
-
-base::string16 PasswordUpdatePendingView::GetDialogButtonLabel(
-    ui::DialogButton button) const {
-  return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
-                                       ? IDS_PASSWORD_MANAGER_UPDATE_BUTTON
-                                       : IDS_PASSWORD_MANAGER_CANCEL_BUTTON);
-}
-
-bool PasswordUpdatePendingView::Accept() {
-  if (selection_view_) {
-    // Multi account case.
-    model()->OnUpdateClicked(*selection_view_->GetSelectedCredentials());
-  } else {
-    model()->OnUpdateClicked(model()->pending_password());
-  }
-  return true;
-}
-
-bool PasswordUpdatePendingView::Cancel() {
-  model()->OnNopeUpdateClicked();
-  return true;
-}
-
-bool PasswordUpdatePendingView::Close() {
-  return true;
-}
-
-void PasswordUpdatePendingView::AddedToWidget() {
-  auto title_view =
-      std::make_unique<views::StyledLabel>(base::string16(), this);
-  title_view->SetTextContext(views::style::CONTEXT_DIALOG_TITLE);
-  UpdateTitleText(title_view.get());
-  GetBubbleFrameView()->SetTitleView(std::move(title_view));
-}
-
-void PasswordUpdatePendingView::StyledLabelLinkClicked(
-    views::StyledLabel* label,
-    const gfx::Range& range,
-    int event_flags) {
-  DCHECK_EQ(model()->title_brand_link_range(), range);
-  model()->OnBrandLinkClicked();
-}
-
-void PasswordUpdatePendingView::UpdateTitleText(
-    views::StyledLabel* title_view) {
-  title_view->SetText(GetWindowTitle());
-  if (!model()->title_brand_link_range().is_empty()) {
-    auto link_style = views::StyledLabel::RangeStyleInfo::CreateForLink();
-    link_style.disable_line_wrapping = false;
-    title_view->AddStyleRange(model()->title_brand_link_range(), link_style);
-  }
-}
diff --git a/chrome/browser/ui/views/passwords/password_update_pending_view.h b/chrome/browser/ui/views/passwords/password_update_pending_view.h
deleted file mode 100644
index 137f22b..0000000
--- a/chrome/browser/ui/views/passwords/password_update_pending_view.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_UPDATE_PENDING_VIEW_H_
-#define CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_UPDATE_PENDING_VIEW_H_
-
-#include "chrome/browser/ui/views/passwords/password_bubble_view_base.h"
-#include "ui/views/controls/styled_label_listener.h"
-
-namespace views {
-class StyledLabel;
-}
-
-class CredentialsSelectionView;
-
-// A view offering the user the ability to update credentials. Contains a
-// single credential row (in case of one credentials) or
-// CredentialsSelectionView otherwise, along with a "Update Passwords" button
-// and a rejection button.
-class PasswordUpdatePendingView : public PasswordBubbleViewBase,
-                                  public views::StyledLabelListener {
- public:
-  PasswordUpdatePendingView(content::WebContents* web_contents,
-                            views::View* anchor_view,
-                            const gfx::Point& anchor_point,
-                            DisplayReason reason);
-  ~PasswordUpdatePendingView() override;
-
- private:
-  // PasswordBubbleViewBase:
-  gfx::Size CalculatePreferredSize() const override;
-  base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
-  bool Accept() override;
-  bool Cancel() override;
-  bool Close() override;
-  void AddedToWidget() override;
-
-  // views::StyledLabelListener:
-  void StyledLabelLinkClicked(views::StyledLabel* label,
-                              const gfx::Range& range,
-                              int event_flags) override;
-
-  void UpdateTitleText(views::StyledLabel* title_view);
-
-  CredentialsSelectionView* selection_view_;
-
-  DISALLOW_COPY_AND_ASSIGN(PasswordUpdatePendingView);
-};
-
-#endif  // CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_UPDATE_PENDING_VIEW_H_
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc
index 4cd2232a..8f2ecc6 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc
@@ -321,10 +321,9 @@
     // For reasons unbeknownst to me, SendMouseEventsSync() with only a down
     // event will cause Windows to hang. Using SendMouseEvents() and running all
     // pending UI tasks seems to do the trick.
-    EXPECT_TRUE(ui_controls::SendMouseEvents(ui_controls::LEFT,
-                                             ui_controls::DOWN));
     base::RunLoop loop;
-    ui_controls::RunClosureAfterAllPendingUIEvents(loop.QuitClosure());
+    EXPECT_TRUE(ui_controls::SendMouseEventsNotifyWhenDone(
+        ui_controls::LEFT, ui_controls::DOWN, loop.QuitClosure()));
     loop.Run();
     observer.Wait();  // Wait for the popup to fully close.
   }
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc b/chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
index 1f5c767..848b7de 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
@@ -137,9 +137,8 @@
     const base::Closure& quit_closure) {
   dnd_thread_.reset();
   TestWhileInDragOperation();
-  ui_controls::SendMouseEvents(ui_controls::LEFT, ui_controls::UP);
-  ui_controls::RunClosureAfterAllPendingUIEvents(
-      quit_closure);
+  ui_controls::SendMouseEventsNotifyWhenDone(ui_controls::LEFT, ui_controls::UP,
+                                             quit_closure);
 }
 
 void ToolbarViewInteractiveUITest::SetUpCommandLine(
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index 1054c19..0413442 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -805,7 +805,11 @@
       {"chromeCleanupExplanationPermissionsNeeded",
        IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_PERMISSIONS_NEEDED},
       {"chromeCleanupExplanationRemove",
-       IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_REMOVE},
+       // Note: removal explanation should be the same as used in the prompt
+       // dialog. Reusing the string to ensure they will not diverge.
+       IDS_CHROME_CLEANUP_PROMPT_EXPLANATION},
+      {"chromeCleanupExplanationRemoving",
+       IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_CURRENTLY_REMOVING},
       {"chromeCleanupExplanationScanError",
        IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_SCAN_ERROR},
       {"chromeCleanupFindButtonLable",
diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn
index df8345edd..d10c09a 100644
--- a/chrome/browser/vr/BUILD.gn
+++ b/chrome/browser/vr/BUILD.gn
@@ -30,10 +30,6 @@
     "databinding/binding_base.h",
     "databinding/vector_binding.h",
     "databinding/vector_element_binding.h",
-    "elements/audio_permission_prompt.cc",
-    "elements/audio_permission_prompt.h",
-    "elements/audio_permission_prompt_texture.cc",
-    "elements/audio_permission_prompt_texture.h",
     "elements/button.cc",
     "elements/button.h",
     "elements/content_element.cc",
@@ -69,6 +65,10 @@
     "elements/omnibox_formatting.h",
     "elements/omnibox_text_field.cc",
     "elements/omnibox_text_field.h",
+    "elements/prompt.cc",
+    "elements/prompt.h",
+    "elements/prompt_texture.cc",
+    "elements/prompt_texture.h",
     "elements/rect.cc",
     "elements/rect.h",
     "elements/render_text_wrapper.cc",
diff --git a/chrome/browser/vr/elements/audio_permission_prompt.cc b/chrome/browser/vr/elements/audio_permission_prompt.cc
deleted file mode 100644
index be7fda58..0000000
--- a/chrome/browser/vr/elements/audio_permission_prompt.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/elements/audio_permission_prompt.h"
-
-#include "chrome/browser/vr/elements/audio_permission_prompt_texture.h"
-
-namespace vr {
-
-AudioPermissionPrompt::AudioPermissionPrompt(
-    int preferred_width,
-    const ExitPromptCallback& result_callback)
-    : ExitPrompt(preferred_width,
-                 result_callback,
-                 std::make_unique<AudioPermissionPromptTexture>()) {
-  set_reason(UiUnsupportedMode::kVoiceSearchNeedsRecordAudioOsPermission);
-}
-
-AudioPermissionPrompt::~AudioPermissionPrompt() = default;
-
-void AudioPermissionPrompt::SetIconColor(SkColor color) {
-  static_cast<AudioPermissionPromptTexture*>(GetTexture())->SetIconColor(color);
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/elements/audio_permission_prompt.h b/chrome/browser/vr/elements/audio_permission_prompt.h
deleted file mode 100644
index d690fba..0000000
--- a/chrome/browser/vr/elements/audio_permission_prompt.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_H_
-#define CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_H_
-
-#include <memory>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "chrome/browser/vr/elements/exit_prompt.h"
-
-namespace vr {
-
-class AudioPermissionPrompt : public ExitPrompt {
- public:
-  AudioPermissionPrompt(int preferred_width,
-                        const ExitPromptCallback& result_callback);
-  ~AudioPermissionPrompt() override;
-
-  void SetIconColor(SkColor color);
-
- private:
-  void OnStateUpdated(const gfx::PointF& position);
-
-  DISALLOW_COPY_AND_ASSIGN(AudioPermissionPrompt);
-};
-
-}  // namespace vr
-
-#endif  // CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_H_
diff --git a/chrome/browser/vr/elements/audio_permission_prompt_texture.cc b/chrome/browser/vr/elements/audio_permission_prompt_texture.cc
deleted file mode 100644
index 9611907a..0000000
--- a/chrome/browser/vr/elements/audio_permission_prompt_texture.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/elements/audio_permission_prompt_texture.h"
-
-#include "base/i18n/case_conversion.h"
-#include "cc/paint/skia_paint_canvas.h"
-#include "chrome/browser/vr/elements/vector_icon.h"
-#include "chrome/grit/generated_resources.h"
-#include "components/strings/grit/components_strings.h"
-#include "components/vector_icons/vector_icons.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font_list.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/geometry/vector2d.h"
-#include "ui/gfx/render_text.h"
-
-namespace vr {
-
-namespace {
-
-constexpr float kWidth = 0.63f;
-constexpr float kHeight = 0.218f;
-constexpr float kButtonHeight = 0.064f;
-constexpr float kCornerRadius = 0.006f;
-constexpr float kPadding = 0.028f;
-constexpr float kIconSize = 0.042f;
-constexpr float kFontSizePromptText = 0.028f;
-constexpr float kTextTopMargin = 0.007f;
-constexpr float kTextLeftMargin = 0.010f;
-constexpr float kVerticalGap = 0.056f;
-constexpr float kButtonsDistance = 0.014f;
-constexpr float kFontSizePromptButtonText = 0.024f;
-constexpr float kButtonRadius = 0.0035f;
-
-constexpr float kButtonWidth = 0.162f;
-
-constexpr char kPreferredFontNameForButtons[] = "sans-serif-medium";
-
-}  // namespace
-
-AudioPermissionPromptTexture::AudioPermissionPromptTexture() = default;
-
-AudioPermissionPromptTexture::~AudioPermissionPromptTexture() = default;
-
-void AudioPermissionPromptTexture::Draw(SkCanvas* sk_canvas,
-                                        const gfx::Size& texture_size) {
-  size_.set_width(texture_size.width());
-  size_.set_height(texture_size.height());
-
-  // background
-  cc::SkiaPaintCanvas paint_canvas(sk_canvas);
-  gfx::Canvas gfx_canvas(&paint_canvas, 1.0f);
-  gfx::Canvas* canvas = &gfx_canvas;
-
-  SkPaint back_paint;
-  back_paint.setColor(background_color());
-  sk_canvas->drawRoundRect(SkRect::MakeWH(size_.width(), size_.height()),
-                           ToPixels(kCornerRadius), ToPixels(kCornerRadius),
-                           back_paint);
-
-  // Icon
-  gfx::PointF icon_location(ToPixels(kPadding), ToPixels(kPadding));
-  VectorIcon::DrawVectorIcon(canvas, vector_icons::kMicIcon,
-                             ToPixels(kIconSize), icon_location, icon_color_);
-
-  // Prompt description.
-  auto text = l10n_util::GetStringUTF16(
-      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_DESCRIPTION);
-  gfx::FontList fonts;
-  GetDefaultFontList(ToPixels(kFontSizePromptText), text, &fonts);
-  gfx::Rect prompt_text_size(
-      ToPixels(kWidth - 2 * kPadding - kTextLeftMargin - kIconSize), 0);
-  std::vector<std::unique_ptr<gfx::RenderText>> lines =
-      PrepareDrawStringRect(text, fonts, foreground_color(), &prompt_text_size,
-                            kTextAlignmentNone, kWrappingBehaviorWrap);
-  canvas->Save();
-  canvas->Translate(
-      gfx::Vector2d(ToPixels(kTextLeftMargin + kIconSize + kPadding),
-                    ToPixels(kPadding + kTextTopMargin)));
-  for (auto& render_text : lines)
-    render_text->Draw(canvas);
-  canvas->Restore();
-
-  // Buttons
-  SkPaint paint;
-  gfx::Rect button_text_size(ToPixels(kButtonWidth), 0);
-  float radius = ToPixels(kButtonRadius);
-
-  // Secondary button area.
-  // TODO(https://crbug.com/787654): Uppercasing should be conditional.
-  text = base::i18n::ToUpper(l10n_util::GetStringUTF16(
-      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_ABORT_BUTTON));
-  GetFontList(kPreferredFontNameForButtons, ToPixels(kFontSizePromptButtonText),
-              text, &fonts);
-  lines = PrepareDrawStringRect(
-      text, fonts, secondary_button_colors_.foreground, &button_text_size,
-      kTextAlignmentCenter, kWrappingBehaviorWrap);
-  secondary_button_rect_.SetRect(
-      ToPixels(kWidth - kPadding - kButtonsDistance - 2 * kButtonWidth),
-      ToPixels(kPadding + kIconSize + kVerticalGap), ToPixels(kButtonWidth),
-      ToPixels(kButtonHeight));
-  paint.setColor(secondary_button_colors_.GetBackgroundColor(
-      secondary_hovered_, secondary_pressed_));
-  canvas->Save();
-  canvas->Translate(
-      gfx::Vector2d(secondary_button_rect_.x(), secondary_button_rect_.y()));
-  sk_canvas->drawRoundRect(
-      SkRect::MakeXYWH(0, 0, ToPixels(kButtonWidth), ToPixels(kButtonHeight)),
-      radius, radius, paint);
-  canvas->Translate(gfx::Vector2d(
-      0, ToPixels(kButtonHeight) / 2 - button_text_size.height() / 2));
-  for (auto& render_text : lines)
-    render_text->Draw(canvas);
-  canvas->Restore();
-
-  // Primary button area.
-  // TODO(https://crbug.com/787654): Uppercasing should be conditional.
-  text = base::i18n::ToUpper(l10n_util::GetStringUTF16(
-      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_CONTINUE_BUTTON));
-  GetFontList(kPreferredFontNameForButtons, ToPixels(kFontSizePromptButtonText),
-              text, &fonts);
-  button_text_size.set_size(gfx::Size(ToPixels(kButtonWidth), 0));
-  lines = PrepareDrawStringRect(text, fonts, primary_button_colors_.foreground,
-                                &button_text_size, kTextAlignmentCenter,
-                                kWrappingBehaviorWrap);
-  primary_button_rect_.SetRect(ToPixels(kWidth - kPadding - kButtonWidth),
-                               ToPixels(kPadding + kIconSize + kVerticalGap),
-                               ToPixels(kButtonWidth), ToPixels(kButtonHeight));
-  paint.setColor(primary_button_colors_.GetBackgroundColor(primary_hovered_,
-                                                           primary_pressed_));
-  canvas->Save();
-  canvas->Translate(
-      gfx::Vector2d(primary_button_rect_.x(), primary_button_rect_.y()));
-  sk_canvas->drawRoundRect(
-      SkRect::MakeXYWH(0, 0, ToPixels(kButtonWidth), ToPixels(kButtonHeight)),
-      radius, radius, paint);
-  canvas->Translate(gfx::Vector2d(
-      0, ToPixels(kButtonHeight) / 2 - button_text_size.height() / 2));
-  for (auto& render_text : lines)
-    render_text->Draw(canvas);
-  canvas->Restore();
-}
-
-void AudioPermissionPromptTexture::SetIconColor(SkColor color) {
-  SetAndDirty(&icon_color_, color);
-}
-
-gfx::Size AudioPermissionPromptTexture::GetPreferredTextureSize(
-    int maximum_width) const {
-  return gfx::Size(maximum_width, maximum_width * kHeight / kWidth);
-}
-
-void AudioPermissionPromptTexture::SetContentMessageId(int message_id) {
-  NOTREACHED();
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/elements/audio_permission_prompt_texture.h b/chrome/browser/vr/elements/audio_permission_prompt_texture.h
deleted file mode 100644
index 5e362d9..0000000
--- a/chrome/browser/vr/elements/audio_permission_prompt_texture.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_TEXTURE_H_
-#define CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_TEXTURE_H_
-
-#include "base/macros.h"
-#include "chrome/browser/vr/elements/exit_prompt_texture.h"
-#include "chrome/browser/vr/model/color_scheme.h"
-#include "ui/gfx/geometry/rect_f.h"
-
-namespace vr {
-
-class AudioPermissionPromptTexture : public ExitPromptTexture {
- public:
-  AudioPermissionPromptTexture();
-  ~AudioPermissionPromptTexture() override;
-  gfx::Size GetPreferredTextureSize(int width) const override;
-
-  void SetIconColor(SkColor color);
-
- private:
-  void SetContentMessageId(int message_id) override;
-  void Draw(SkCanvas* sk_canvas, const gfx::Size& texture_size) override;
-
-  SkColor icon_color_ = SK_ColorBLACK;
-
-  DISALLOW_COPY_AND_ASSIGN(AudioPermissionPromptTexture);
-};
-
-}  // namespace vr
-
-#endif  // CHROME_BROWSER_VR_ELEMENTS_AUDIO_PERMISSION_PROMPT_TEXTURE_H_
diff --git a/chrome/browser/vr/elements/exit_prompt_texture.h b/chrome/browser/vr/elements/exit_prompt_texture.h
index a21cdcb1..785136e 100644
--- a/chrome/browser/vr/elements/exit_prompt_texture.h
+++ b/chrome/browser/vr/elements/exit_prompt_texture.h
@@ -51,11 +51,11 @@
   ButtonColors primary_button_colors_;
   ButtonColors secondary_button_colors_;
 
+  int content_message_id_ = -1;
+
  private:
   void Draw(SkCanvas* sk_canvas, const gfx::Size& texture_size) override;
 
-  int content_message_id_ = -1;
-
   DISALLOW_COPY_AND_ASSIGN(ExitPromptTexture);
 };
 
diff --git a/chrome/browser/vr/elements/prompt.cc b/chrome/browser/vr/elements/prompt.cc
new file mode 100644
index 0000000..b503fc8
--- /dev/null
+++ b/chrome/browser/vr/elements/prompt.cc
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/vr/elements/prompt.h"
+
+#include "chrome/browser/vr/elements/prompt_texture.h"
+
+namespace vr {
+
+Prompt::Prompt(int preferred_width,
+               int content_message_id,
+               const gfx::VectorIcon& icon,
+               int primary_button_message_id,
+               int secondary_button_message_id,
+               const ExitPromptCallback& result_callback)
+    : ExitPrompt(preferred_width,
+                 result_callback,
+                 std::make_unique<PromptTexture>(content_message_id,
+                                                 icon,
+                                                 primary_button_message_id,
+                                                 secondary_button_message_id)) {
+  set_reason(UiUnsupportedMode::kVoiceSearchNeedsRecordAudioOsPermission);
+}
+
+Prompt::~Prompt() = default;
+
+void Prompt::SetIconColor(SkColor color) {
+  static_cast<PromptTexture*>(GetTexture())->SetIconColor(color);
+}
+
+}  // namespace vr
diff --git a/chrome/browser/vr/elements/prompt.h b/chrome/browser/vr/elements/prompt.h
new file mode 100644
index 0000000..184692eb
--- /dev/null
+++ b/chrome/browser/vr/elements/prompt.h
@@ -0,0 +1,37 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VR_ELEMENTS_PROMPT_H_
+#define CHROME_BROWSER_VR_ELEMENTS_PROMPT_H_
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "chrome/browser/vr/elements/exit_prompt.h"
+#include "ui/gfx/vector_icon_types.h"
+
+namespace vr {
+
+class Prompt : public ExitPrompt {
+ public:
+  Prompt(int preferred_width,
+         int content_message_id,
+         const gfx::VectorIcon& icon,
+         int primary_button_message_id,
+         int secondary_button_message_id,
+         const ExitPromptCallback& result_callback);
+  ~Prompt() override;
+
+  void SetIconColor(SkColor color);
+
+ private:
+  void OnStateUpdated(const gfx::PointF& position);
+
+  DISALLOW_COPY_AND_ASSIGN(Prompt);
+};
+
+}  // namespace vr
+
+#endif  // CHROME_BROWSER_VR_ELEMENTS_PROMPT_H_
diff --git a/chrome/browser/vr/elements/prompt_texture.cc b/chrome/browser/vr/elements/prompt_texture.cc
new file mode 100644
index 0000000..e682516
--- /dev/null
+++ b/chrome/browser/vr/elements/prompt_texture.cc
@@ -0,0 +1,161 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/vr/elements/prompt_texture.h"
+
+#include "base/i18n/case_conversion.h"
+#include "cc/paint/skia_paint_canvas.h"
+#include "chrome/browser/vr/elements/vector_icon.h"
+#include "chrome/grit/generated_resources.h"
+#include "components/strings/grit/components_strings.h"
+#include "components/vector_icons/vector_icons.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/gfx/canvas.h"
+#include "ui/gfx/font_list.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/vector2d.h"
+#include "ui/gfx/render_text.h"
+
+namespace vr {
+
+namespace {
+
+constexpr float kWidth = 0.63f;
+constexpr float kHeight = 0.218f;
+constexpr float kButtonHeight = 0.064f;
+constexpr float kCornerRadius = 0.006f;
+constexpr float kPadding = 0.028f;
+constexpr float kIconSize = 0.042f;
+constexpr float kFontSizePromptText = 0.028f;
+constexpr float kTextTopMargin = 0.007f;
+constexpr float kTextLeftMargin = 0.010f;
+constexpr float kVerticalGap = 0.056f;
+constexpr float kButtonsDistance = 0.014f;
+constexpr float kFontSizePromptButtonText = 0.024f;
+constexpr float kButtonRadius = 0.0035f;
+
+constexpr float kButtonWidth = 0.162f;
+
+constexpr char kPreferredFontNameForButtons[] = "sans-serif-medium";
+
+}  // namespace
+
+PromptTexture::PromptTexture(int content_message_id,
+                             const gfx::VectorIcon& icon,
+                             int primary_button_message_id,
+                             int secondary_button_message_id)
+    : icon_(icon),
+      primary_button_message_id_(primary_button_message_id),
+      secondary_button_message_id_(secondary_button_message_id) {
+  SetContentMessageId(content_message_id);
+}
+
+PromptTexture::~PromptTexture() = default;
+
+void PromptTexture::Draw(SkCanvas* sk_canvas, const gfx::Size& texture_size) {
+  size_.set_width(texture_size.width());
+  size_.set_height(texture_size.height());
+
+  // background
+  cc::SkiaPaintCanvas paint_canvas(sk_canvas);
+  gfx::Canvas gfx_canvas(&paint_canvas, 1.0f);
+  gfx::Canvas* canvas = &gfx_canvas;
+
+  SkPaint back_paint;
+  back_paint.setColor(background_color());
+  sk_canvas->drawRoundRect(SkRect::MakeWH(size_.width(), size_.height()),
+                           ToPixels(kCornerRadius), ToPixels(kCornerRadius),
+                           back_paint);
+
+  // Icon
+  gfx::PointF icon_location(ToPixels(kPadding), ToPixels(kPadding));
+  VectorIcon::DrawVectorIcon(canvas, icon_, ToPixels(kIconSize), icon_location,
+                             icon_color_);
+
+  // Prompt description.
+  auto text = l10n_util::GetStringUTF16(content_message_id_);
+  gfx::FontList fonts;
+  GetDefaultFontList(ToPixels(kFontSizePromptText), text, &fonts);
+  gfx::Rect prompt_text_size(
+      ToPixels(kWidth - 2 * kPadding - kTextLeftMargin - kIconSize), 0);
+  std::vector<std::unique_ptr<gfx::RenderText>> lines =
+      PrepareDrawStringRect(text, fonts, foreground_color(), &prompt_text_size,
+                            kTextAlignmentNone, kWrappingBehaviorWrap);
+  canvas->Save();
+  canvas->Translate(
+      gfx::Vector2d(ToPixels(kTextLeftMargin + kIconSize + kPadding),
+                    ToPixels(kPadding + kTextTopMargin)));
+  for (auto& render_text : lines)
+    render_text->Draw(canvas);
+  canvas->Restore();
+
+  // Buttons
+  SkPaint paint;
+  gfx::Rect button_text_size(ToPixels(kButtonWidth), 0);
+  float radius = ToPixels(kButtonRadius);
+
+  // Secondary button area.
+  // TODO(https://crbug.com/787654): Uppercasing should be conditional.
+  text = base::i18n::ToUpper(
+      l10n_util::GetStringUTF16(secondary_button_message_id_));
+  GetFontList(kPreferredFontNameForButtons, ToPixels(kFontSizePromptButtonText),
+              text, &fonts);
+  lines = PrepareDrawStringRect(
+      text, fonts, secondary_button_colors_.foreground, &button_text_size,
+      kTextAlignmentCenter, kWrappingBehaviorWrap);
+  secondary_button_rect_.SetRect(
+      ToPixels(kWidth - kPadding - kButtonsDistance - 2 * kButtonWidth),
+      ToPixels(kPadding + kIconSize + kVerticalGap), ToPixels(kButtonWidth),
+      ToPixels(kButtonHeight));
+  paint.setColor(secondary_button_colors_.GetBackgroundColor(
+      secondary_hovered_, secondary_pressed_));
+  canvas->Save();
+  canvas->Translate(
+      gfx::Vector2d(secondary_button_rect_.x(), secondary_button_rect_.y()));
+  sk_canvas->drawRoundRect(
+      SkRect::MakeXYWH(0, 0, ToPixels(kButtonWidth), ToPixels(kButtonHeight)),
+      radius, radius, paint);
+  canvas->Translate(gfx::Vector2d(
+      0, ToPixels(kButtonHeight) / 2 - button_text_size.height() / 2));
+  for (auto& render_text : lines)
+    render_text->Draw(canvas);
+  canvas->Restore();
+
+  // Primary button area.
+  // TODO(https://crbug.com/787654): Uppercasing should be conditional.
+  text = base::i18n::ToUpper(
+      l10n_util::GetStringUTF16(primary_button_message_id_));
+  GetFontList(kPreferredFontNameForButtons, ToPixels(kFontSizePromptButtonText),
+              text, &fonts);
+  button_text_size.set_size(gfx::Size(ToPixels(kButtonWidth), 0));
+  lines = PrepareDrawStringRect(text, fonts, primary_button_colors_.foreground,
+                                &button_text_size, kTextAlignmentCenter,
+                                kWrappingBehaviorWrap);
+  primary_button_rect_.SetRect(ToPixels(kWidth - kPadding - kButtonWidth),
+                               ToPixels(kPadding + kIconSize + kVerticalGap),
+                               ToPixels(kButtonWidth), ToPixels(kButtonHeight));
+  paint.setColor(primary_button_colors_.GetBackgroundColor(primary_hovered_,
+                                                           primary_pressed_));
+  canvas->Save();
+  canvas->Translate(
+      gfx::Vector2d(primary_button_rect_.x(), primary_button_rect_.y()));
+  sk_canvas->drawRoundRect(
+      SkRect::MakeXYWH(0, 0, ToPixels(kButtonWidth), ToPixels(kButtonHeight)),
+      radius, radius, paint);
+  canvas->Translate(gfx::Vector2d(
+      0, ToPixels(kButtonHeight) / 2 - button_text_size.height() / 2));
+  for (auto& render_text : lines)
+    render_text->Draw(canvas);
+  canvas->Restore();
+}
+
+void PromptTexture::SetIconColor(SkColor color) {
+  SetAndDirty(&icon_color_, color);
+}
+
+gfx::Size PromptTexture::GetPreferredTextureSize(int maximum_width) const {
+  return gfx::Size(maximum_width, maximum_width * kHeight / kWidth);
+}
+
+}  // namespace vr
diff --git a/chrome/browser/vr/elements/prompt_texture.h b/chrome/browser/vr/elements/prompt_texture.h
new file mode 100644
index 0000000..7f0e1fe
--- /dev/null
+++ b/chrome/browser/vr/elements/prompt_texture.h
@@ -0,0 +1,40 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VR_ELEMENTS_PROMPT_TEXTURE_H_
+#define CHROME_BROWSER_VR_ELEMENTS_PROMPT_TEXTURE_H_
+
+#include "base/macros.h"
+#include "chrome/browser/vr/elements/exit_prompt_texture.h"
+#include "chrome/browser/vr/model/color_scheme.h"
+#include "ui/gfx/geometry/rect_f.h"
+#include "ui/gfx/vector_icon_types.h"
+
+namespace vr {
+
+class PromptTexture : public ExitPromptTexture {
+ public:
+  PromptTexture(int content_message_id,
+                const gfx::VectorIcon& icon,
+                int primary_button_message_id,
+                int secondary_button_message_id);
+  ~PromptTexture() override;
+  gfx::Size GetPreferredTextureSize(int width) const override;
+
+  void SetIconColor(SkColor color);
+
+ private:
+  void Draw(SkCanvas* sk_canvas, const gfx::Size& texture_size) override;
+
+  SkColor icon_color_ = SK_ColorBLACK;
+  const gfx::VectorIcon& icon_;
+  int primary_button_message_id_ = -1;
+  int secondary_button_message_id_ = -1;
+
+  DISALLOW_COPY_AND_ASSIGN(PromptTexture);
+};
+
+}  // namespace vr
+
+#endif  // CHROME_BROWSER_VR_ELEMENTS_PROMPT_TEXTURE_H_
diff --git a/chrome/browser/vr/elements/ui_element_name.cc b/chrome/browser/vr/elements/ui_element_name.cc
index d8ba712..4cb1d7e 100644
--- a/chrome/browser/vr/elements/ui_element_name.cc
+++ b/chrome/browser/vr/elements/ui_element_name.cc
@@ -40,6 +40,7 @@
     "kCeiling",
     "kFloor",
     "kStars",
+    "kUpdateKeyboardPrompt",
     "kUrlBarDmmRoot",
     "kUrlBar",
     "kUrlBarLayout",
@@ -67,6 +68,7 @@
     "k2dBrowsingVisibiltyControlForSiteInfoPrompt",
     "k2dBrowsingOpacityControlForAudioPermissionPrompt",
     "k2dBrowsingOpacityControlForNativeDialogPrompt",
+    "k2dBrowsingOpacityControlForUpdateKeyboardPrompt",
     "kIndicatorLayout",
     "kAudioCaptureIndicator",
     "kVideoCaptureIndicator",
diff --git a/chrome/browser/vr/elements/ui_element_name.h b/chrome/browser/vr/elements/ui_element_name.h
index 56eac5bb..7c02196d 100644
--- a/chrome/browser/vr/elements/ui_element_name.h
+++ b/chrome/browser/vr/elements/ui_element_name.h
@@ -39,6 +39,7 @@
   kCeiling,
   kFloor,
   kStars,
+  kUpdateKeyboardPrompt,
   kUrlBarDmmRoot,
   kUrlBar,
   kUrlBarLayout,
@@ -66,6 +67,7 @@
   k2dBrowsingVisibiltyControlForSiteInfoPrompt,
   k2dBrowsingOpacityControlForAudioPermissionPrompt,
   k2dBrowsingOpacityControlForNativeDialogPrompt,
+  k2dBrowsingOpacityControlForUpdateKeyboardPrompt,
   kIndicatorLayout,
   kAudioCaptureIndicator,
   kVideoCaptureIndicator,
diff --git a/chrome/browser/vr/elements/ui_element_type.cc b/chrome/browser/vr/elements/ui_element_type.cc
index 0a153534..c4f088d 100644
--- a/chrome/browser/vr/elements/ui_element_type.cc
+++ b/chrome/browser/vr/elements/ui_element_type.cc
@@ -24,6 +24,8 @@
     "kTypeOmniboxSuggestionIcon",
     "kTypeOmniboxSuggestionContentText",
     "kTypeOmniboxSuggestionDescriptionText",
+    "kTypePromptBackplane",
+    "kTypePromptShadow",
     "kTypeSpacer",
     "kTypeTextInputHint",
     "kTypeTextInputText",
diff --git a/chrome/browser/vr/elements/ui_element_type.h b/chrome/browser/vr/elements/ui_element_type.h
index 23b6f5b..acb4dc08 100644
--- a/chrome/browser/vr/elements/ui_element_type.h
+++ b/chrome/browser/vr/elements/ui_element_type.h
@@ -24,6 +24,8 @@
   kTypeOmniboxSuggestionIcon,
   kTypeOmniboxSuggestionContentText,
   kTypeOmniboxSuggestionDescriptionText,
+  kTypePromptBackplane,
+  kTypePromptShadow,
   kTypeSpacer,
   kTypeTextInputHint,
   kTypeTextInputText,
diff --git a/chrome/browser/vr/model/color_scheme.cc b/chrome/browser/vr/model/color_scheme.cc
index 9c2c1bf..e36e296 100644
--- a/chrome/browser/vr/model/color_scheme.cc
+++ b/chrome/browser/vr/model/color_scheme.cc
@@ -53,28 +53,26 @@
 
   normal_scheme.system_indicator_foreground = normal_scheme.element_foreground;
   normal_scheme.system_indicator_background = normal_scheme.element_background;
-  normal_scheme.audio_permission_prompt_icon_foreground = 0xFF4285F4;
-  normal_scheme.audio_permission_prompt_background = 0xFFF5F5F5;
-  normal_scheme.audio_permission_prompt_secondary_button_colors.foreground =
-      0xFF4285F4;
-  normal_scheme.audio_permission_prompt_secondary_button_colors
-      .foreground_disabled = normal_scheme.button_colors.foreground_disabled;
-  normal_scheme.audio_permission_prompt_secondary_button_colors.background =
-      normal_scheme.audio_permission_prompt_background;
-  normal_scheme.audio_permission_prompt_secondary_button_colors
-      .background_hover = 0x19999999;
-  normal_scheme.audio_permission_prompt_secondary_button_colors
-      .background_down = 0x33999999;
-  normal_scheme.audio_permission_prompt_primary_button_colors.foreground =
-      normal_scheme.audio_permission_prompt_background;
-  normal_scheme.audio_permission_prompt_secondary_button_colors
-      .foreground_disabled = normal_scheme.button_colors.foreground_disabled;
-  normal_scheme.audio_permission_prompt_primary_button_colors.background =
-      0xFF4285F4;
-  normal_scheme.audio_permission_prompt_primary_button_colors.background_hover =
+  normal_scheme.modal_prompt_icon_foreground = 0xFF4285F4;
+  normal_scheme.modal_prompt_background = 0xFFF5F5F5;
+  normal_scheme.modal_prompt_foreground = 0xFF333333;
+  normal_scheme.modal_prompt_secondary_button_colors.foreground = 0xFF4285F4;
+  normal_scheme.modal_prompt_secondary_button_colors.foreground_disabled =
+      normal_scheme.button_colors.foreground_disabled;
+  normal_scheme.modal_prompt_secondary_button_colors.background =
+      normal_scheme.modal_prompt_background;
+  normal_scheme.modal_prompt_secondary_button_colors.background_hover =
+      0x19999999;
+  normal_scheme.modal_prompt_secondary_button_colors.background_down =
+      0x33999999;
+  normal_scheme.modal_prompt_primary_button_colors.foreground =
+      normal_scheme.modal_prompt_background;
+  normal_scheme.modal_prompt_secondary_button_colors.foreground_disabled =
+      normal_scheme.button_colors.foreground_disabled;
+  normal_scheme.modal_prompt_primary_button_colors.background = 0xFF4285F4;
+  normal_scheme.modal_prompt_primary_button_colors.background_hover =
       0xFF3E7DE6;
-  normal_scheme.audio_permission_prompt_primary_button_colors.background_down =
-      0xFF3E7DE6;
+  normal_scheme.modal_prompt_primary_button_colors.background_down = 0xFF3E7DE6;
   normal_scheme.back_button.background = normal_scheme.element_background;
   normal_scheme.back_button.background_down =
       normal_scheme.element_background_down;
@@ -363,10 +361,10 @@
     normal_scheme.system_indicator_background =
         normal_scheme.element_background;
 
-    normal_scheme.audio_permission_prompt_secondary_button_colors
-        .foreground_disabled = normal_scheme.button_colors.foreground_disabled;
-    normal_scheme.audio_permission_prompt_secondary_button_colors.background =
-        normal_scheme.audio_permission_prompt_background;
+    normal_scheme.modal_prompt_secondary_button_colors.foreground_disabled =
+        normal_scheme.button_colors.foreground_disabled;
+    normal_scheme.modal_prompt_secondary_button_colors.background =
+        normal_scheme.modal_prompt_background;
 
     ColorScheme& incognito_scheme = g_incognito_scheme.Get();
     incognito_scheme.element_foreground = 0xA6FFFFFF;
diff --git a/chrome/browser/vr/model/color_scheme.h b/chrome/browser/vr/model/color_scheme.h
index f699d467..12e54daa 100644
--- a/chrome/browser/vr/model/color_scheme.h
+++ b/chrome/browser/vr/model/color_scheme.h
@@ -85,10 +85,11 @@
   SkColor exclusive_screen_toast_background;
   SkColor system_indicator_foreground;
   SkColor system_indicator_background;
-  SkColor audio_permission_prompt_icon_foreground;
-  SkColor audio_permission_prompt_background;
-  ButtonColors audio_permission_prompt_secondary_button_colors;
-  ButtonColors audio_permission_prompt_primary_button_colors;
+  SkColor modal_prompt_icon_foreground;
+  SkColor modal_prompt_background;
+  SkColor modal_prompt_foreground;
+  ButtonColors modal_prompt_secondary_button_colors;
+  ButtonColors modal_prompt_primary_button_colors;
 
   // The colors used for text and buttons on prompts.
   SkColor prompt_foreground;
diff --git a/chrome/browser/vr/ui.cc b/chrome/browser/vr/ui.cc
index 020b9703..4e27170 100644
--- a/chrome/browser/vr/ui.cc
+++ b/chrome/browser/vr/ui.cc
@@ -211,6 +211,10 @@
 }
 
 void Ui::ShowSoftInput(bool show) {
+  if (model_->needs_keyboard_update) {
+    browser_->OnUnsupportedMode(UiUnsupportedMode::kNeedsKeyboardUpdate);
+    return;
+  }
   model_->editing_web_input = show;
 }
 
diff --git a/chrome/browser/vr/ui_input_manager_unittest.cc b/chrome/browser/vr/ui_input_manager_unittest.cc
index 84a6967..9997429e 100644
--- a/chrome/browser/vr/ui_input_manager_unittest.cc
+++ b/chrome/browser/vr/ui_input_manager_unittest.cc
@@ -471,8 +471,10 @@
   // Even if the reticle is over the URL bar, the backplane should be in front
   // and should be hit.
   ASSERT_NE(0, reticle_model.target_element_id);
-  EXPECT_EQ(scene_->GetUiElementByName(kAudioPermissionPromptBackplane)->id(),
-            reticle_model.target_element_id);
+  auto& backplane =
+      scene_->GetUiElementByName(kAudioPermissionPrompt)->children().front();
+  EXPECT_EQ(backplane->type(), kTypePromptBackplane);
+  EXPECT_EQ(backplane->id(), reticle_model.target_element_id);
 }
 
 TEST_F(UiInputManagerContentTest, TreeVsZOrder) {
diff --git a/chrome/browser/vr/ui_scene_constants.h b/chrome/browser/vr/ui_scene_constants.h
index 1b1733e9..1effdbec 100644
--- a/chrome/browser/vr/ui_scene_constants.h
+++ b/chrome/browser/vr/ui_scene_constants.h
@@ -51,9 +51,7 @@
 
 static constexpr float kExitPromptWidth = 0.672f * kContentDistance;
 static constexpr float kExitPromptHeight = 0.2f * kContentDistance;
-
 static constexpr float kExitPromptVerticalOffset = -0.09f * kContentDistance;
-static constexpr float kPromptBackplaneSize = 1000.0f;
 
 static constexpr float kUrlBarDistance = 2.4f;
 static constexpr float kUrlBarWidthDMM = 0.672f;
@@ -295,6 +293,12 @@
 static constexpr float kRepositionContentOpacity = 0.2f;
 static constexpr float kRepositionLabelBackgroundCornerRadius = 0.02f;
 
+static constexpr float kPromptWidthDMM = 0.63f;
+static constexpr float kPromptHeightDMM = 0.218f;
+static constexpr float kPromptVerticalOffsetDMM = -0.1f;
+static constexpr float kPromptShadowOffsetDMM = 0.1f;
+static constexpr float kPromptDistance = 2.4f;
+
 }  // namespace vr
 
 #endif  // CHROME_BROWSER_VR_UI_SCENE_CONSTANTS_H_
diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc
index b2ac44a..4081d4e 100644
--- a/chrome/browser/vr/ui_scene_creator.cc
+++ b/chrome/browser/vr/ui_scene_creator.cc
@@ -14,7 +14,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/vr/databinding/binding.h"
 #include "chrome/browser/vr/databinding/vector_binding.h"
-#include "chrome/browser/vr/elements/audio_permission_prompt.h"
 #include "chrome/browser/vr/elements/button.h"
 #include "chrome/browser/vr/elements/content_element.h"
 #include "chrome/browser/vr/elements/controller.h"
@@ -31,6 +30,7 @@
 #include "chrome/browser/vr/elements/linear_layout.h"
 #include "chrome/browser/vr/elements/omnibox_formatting.h"
 #include "chrome/browser/vr/elements/omnibox_text_field.h"
+#include "chrome/browser/vr/elements/prompt.h"
 #include "chrome/browser/vr/elements/rect.h"
 #include "chrome/browser/vr/elements/repositioner.h"
 #include "chrome/browser/vr/elements/reticle.h"
@@ -406,6 +406,76 @@
   return snackbar_root;
 }
 
+std::unique_ptr<UiElement> CreatePrompt(UiElementName name,
+                                        Model* model,
+                                        UiBrowserInterface* browser,
+                                        int content_message_id,
+                                        const gfx::VectorIcon& icon,
+                                        int primary_button_message_id,
+                                        int secondary_button_message_id) {
+  std::unique_ptr<Prompt> prompt = std::make_unique<Prompt>(
+      1024, content_message_id, icon, primary_button_message_id,
+      secondary_button_message_id,
+      base::BindRepeating(
+          [](Model* model, UiBrowserInterface* browser,
+             ExitPrompt::Button button, UiUnsupportedMode mode) {
+            ExitVrPromptChoice choice = CHOICE_NONE;
+            switch (button) {
+              case ExitPrompt::NONE:
+                choice = CHOICE_NONE;
+                break;
+              case ExitPrompt::PRIMARY:
+                choice = CHOICE_EXIT;
+                break;
+              case ExitPrompt::SECONDARY:
+                choice = CHOICE_STAY;
+                break;
+            }
+            browser->OnExitVrPromptResult(choice, mode);
+            model->active_modal_prompt_type = kModalPromptTypeNone;
+          },
+          base::Unretained(model), base::Unretained(browser)));
+  prompt->SetDrawPhase(kPhaseForeground);
+  prompt->SetTranslate(0, 0, kPromptShadowOffsetDMM);
+  prompt->SetSize(kPromptWidthDMM, kPromptHeightDMM);
+  prompt->set_hit_testable(true);
+  VR_BIND_BUTTON_COLORS(model, prompt.get(),
+                        &ColorScheme::modal_prompt_primary_button_colors,
+                        &Prompt::SetPrimaryButtonColors);
+  VR_BIND_BUTTON_COLORS(model, prompt.get(),
+                        &ColorScheme::modal_prompt_secondary_button_colors,
+                        &Prompt::SetSecondaryButtonColors);
+  VR_BIND_COLOR(model, prompt.get(), &ColorScheme::modal_prompt_icon_foreground,
+                &Prompt::SetIconColor);
+  VR_BIND_COLOR(model, prompt.get(), &ColorScheme::modal_prompt_background,
+                &TexturedElement::SetBackgroundColor);
+  VR_BIND_COLOR(model, prompt.get(), &ColorScheme::modal_prompt_foreground,
+                &TexturedElement::SetForegroundColor);
+
+  // Place an invisible but hittable plane behind the exit prompt, to keep the
+  // reticle roughly planar with the content if near content.
+  auto backplane = Create<InvisibleHitTarget>(kNone, kPhaseForeground);
+  backplane->SetType(kTypePromptBackplane);
+  backplane->SetSize(kBackplaneSize, kBackplaneSize);
+  backplane->SetTranslate(0, kPromptVerticalOffsetDMM, 0);
+  backplane->SetTransitionedProperties({OPACITY});
+  EventHandlers event_handlers;
+  event_handlers.button_up =
+      base::BindRepeating([](ExitPrompt* prompt) { prompt->Cancel(); },
+                          base::Unretained(prompt.get()));
+  backplane->set_event_handlers(event_handlers);
+
+  auto shadow = Create<Shadow>(kNone, kPhaseForeground);
+  shadow->SetType(kTypePromptShadow);
+  shadow->AddChild(std::move(prompt));
+  backplane->AddChild(std::move(shadow));
+
+  auto scaler = Create<ScaledDepthAdjuster>(name, kPhaseNone, kPromptDistance);
+  scaler->SetType(kTypeScaledDepthAdjuster);
+  scaler->AddChild(std::move(backplane));
+  return scaler;
+}
+
 std::unique_ptr<UiElement> CreateControllerLabel(UiElementName name,
                                                  float z_offset,
                                                  const base::string16& text,
@@ -541,7 +611,7 @@
   CreateContentQuad();
   CreateHostedUi();
   CreateExitPrompt();
-  CreateAudioPermissionPrompt();
+  CreatePrompts();
   CreateSystemIndicators();
   CreateUrlBar();
   CreateLoadingIndicator();
@@ -652,12 +722,9 @@
 
   element = Create<UiElement>(k2dBrowsingVisibiltyControlForSiteInfoPrompt,
                               kPhaseNone);
-  element->AddBinding(VR_BIND_FUNC(
-      bool, Model, model_,
-      model->active_modal_prompt_type ==
-              kModalPromptTypeExitVRForVoiceSearchRecordAudioOsPermission ||
-          model->active_modal_prompt_type == kModalPromptTypeNone,
-      UiElement, element.get(), SetVisible));
+  VR_BIND_VISIBILITY(element, model->active_modal_prompt_type !=
+                                  kModalPromptTypeExitVRForSiteInfo);
+
   scene_->AddUiElement(k2dBrowsingVisibiltyControlForVoice, std::move(element));
 
   element = Create<UiElement>(k2dBrowsingOpacityControlForAudioPermissionPrompt,
@@ -680,13 +747,24 @@
   scene_->AddUiElement(k2dBrowsingOpacityControlForAudioPermissionPrompt,
                        std::move(element));
 
+  element = Create<UiElement>(k2dBrowsingOpacityControlForUpdateKeyboardPrompt,
+                              kPhaseNone);
+  element->SetTransitionedProperties({OPACITY});
+  element->AddBinding(
+      VR_BIND(bool, Model, model_,
+              model->active_modal_prompt_type != kModalPromptTypeUpdateKeyboard,
+              UiElement, element.get(),
+              view->SetOpacity(value ? 1.0 : kModalPromptFadeOpacity)));
+  scene_->AddUiElement(k2dBrowsingOpacityControlForNativeDialogPrompt,
+                       std::move(element));
+
   element = Create<UiElement>(k2dBrowsingForeground, kPhaseNone);
   element->SetTransitionedProperties({OPACITY});
   element->SetTransitionDuration(base::TimeDelta::FromMilliseconds(
       kSpeechRecognitionOpacityAnimationDurationMs));
   VR_BIND_VISIBILITY(element, model->default_browsing_enabled() ||
                                   model->fullscreen_enabled());
-  scene_->AddUiElement(k2dBrowsingOpacityControlForNativeDialogPrompt,
+  scene_->AddUiElement(k2dBrowsingOpacityControlForUpdateKeyboardPrompt,
                        std::move(element));
 
   element = Create<UiElement>(k2dBrowsingContentGroup, kPhaseNone);
@@ -1257,7 +1335,7 @@
   auto hit_target = std::make_unique<InvisibleHitTarget>();
   hit_target->SetName(kSpeechRecognitionResultBackplane);
   hit_target->SetDrawPhase(kPhaseForeground);
-  hit_target->SetSize(kPromptBackplaneSize, kPromptBackplaneSize);
+  hit_target->SetSize(kBackplaneSize, kBackplaneSize);
   speech_result_parent->AddChild(std::move(hit_target));
 
   auto speech_recognition_listening = std::make_unique<UiElement>();
@@ -1631,8 +1709,14 @@
   base::RepeatingCallback<void()> url_click_callback;
   if (base::FeatureList::IsEnabled(features::kVrBrowserKeyboard)) {
     url_click_callback = base::BindRepeating(
-        [](Model* model) { model->push_mode(kModeEditingOmnibox); },
-        base::Unretained(model_));
+        [](Model* model, UiBrowserInterface* browser) {
+          if (model->needs_keyboard_update) {
+            browser->OnUnsupportedMode(UiUnsupportedMode::kNeedsKeyboardUpdate);
+          } else {
+            model->push_mode(kModeEditingOmnibox);
+          }
+        },
+        base::Unretained(model_), base::Unretained(browser_));
   } else {
     url_click_callback = base::BindRepeating([] {});
   }
@@ -2109,7 +2193,7 @@
   auto backplane = std::make_unique<InvisibleHitTarget>();
   backplane->SetDrawPhase(kPhaseForeground);
   backplane->SetName(kExitPromptBackplane);
-  backplane->SetSize(kPromptBackplaneSize, kPromptBackplaneSize);
+  backplane->SetSize(kBackplaneSize, kBackplaneSize);
   backplane->SetTranslate(0.0,
                           kContentVerticalOffset + kExitPromptVerticalOffset,
                           -kContentDistance);
@@ -2117,7 +2201,8 @@
       backplane,
       model->active_modal_prompt_type != kModalPromptTypeNone &&
           model->active_modal_prompt_type !=
-              kModalPromptTypeExitVRForVoiceSearchRecordAudioOsPermission);
+              kModalPromptTypeExitVRForVoiceSearchRecordAudioOsPermission &&
+          model->active_modal_prompt_type != kModalPromptTypeUpdateKeyboard);
 
   std::unique_ptr<ExitPrompt> exit_prompt = std::make_unique<ExitPrompt>(
       512, base::BindRepeating(
@@ -2180,77 +2265,26 @@
   scene_->AddUiElement(kExitPromptBackplane, std::move(exit_prompt));
 }
 
-void UiSceneCreator::CreateAudioPermissionPrompt() {
-  // Place an invisible but hittable plane behind the exit prompt, to keep the
-  // reticle roughly planar with the content if near content.
-  auto backplane = std::make_unique<InvisibleHitTarget>();
-  backplane->SetDrawPhase(kPhaseForeground);
-  backplane->SetName(kAudioPermissionPromptBackplane);
-  backplane->SetSize(kPromptBackplaneSize, kPromptBackplaneSize);
-  backplane->SetTranslate(0.0, kContentVerticalOffset, -kOverlayPlaneDistance);
-  backplane->SetVisible(false);
-  backplane->SetTransitionedProperties({OPACITY});
+void UiSceneCreator::CreatePrompts() {
+  auto prompt = CreatePrompt(
+      kAudioPermissionPrompt, model_, browser_,
+      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_DESCRIPTION, vector_icons::kMicIcon,
+      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_CONTINUE_BUTTON,
+      IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_ABORT_BUTTON);
   VR_BIND_VISIBILITY(
-      backplane,
-      model->active_modal_prompt_type ==
-          kModalPromptTypeExitVRForVoiceSearchRecordAudioOsPermission);
+      prompt, model->active_modal_prompt_type ==
+                  kModalPromptTypeExitVRForVoiceSearchRecordAudioOsPermission);
+  scene_->AddUiElement(k2dBrowsingRepositioner, std::move(prompt));
 
-  std::unique_ptr<Shadow> shadow = std::make_unique<Shadow>();
-  shadow->SetName(kAudioPermissionPromptShadow);
-  shadow->SetDrawPhase(kPhaseForeground);
-
-  std::unique_ptr<AudioPermissionPrompt> prompt =
-      std::make_unique<AudioPermissionPrompt>(
-          1024, base::BindRepeating(
-                    [](Model* model, UiBrowserInterface* browser,
-                       ExitPrompt::Button button, UiUnsupportedMode mode) {
-                      ExitVrPromptChoice choice = CHOICE_NONE;
-                      switch (button) {
-                        case ExitPrompt::NONE:
-                          choice = CHOICE_NONE;
-                          break;
-                        case ExitPrompt::PRIMARY:
-                          choice = CHOICE_EXIT;
-                          break;
-                        case ExitPrompt::SECONDARY:
-                          choice = CHOICE_STAY;
-                          break;
-                      }
-                      browser->OnExitVrPromptResult(choice, mode);
-                      model->active_modal_prompt_type = kModalPromptTypeNone;
-                    },
-                    base::Unretained(model_), base::Unretained(browser_)));
-  prompt->SetName(kAudioPermissionPrompt);
-  prompt->SetDrawPhase(kPhaseForeground);
-  prompt->SetSize(kAudioPermissionPromptWidth, kAudioPermissionPromptHeight);
-  prompt->set_hit_testable(true);
-  prompt->SetTranslate(0.0, 0.0f, kAudionPermisionPromptDepth);
-  VR_BIND_BUTTON_COLORS(
-      model_, prompt.get(),
-      &ColorScheme::audio_permission_prompt_primary_button_colors,
-      &AudioPermissionPrompt::SetPrimaryButtonColors);
-  VR_BIND_BUTTON_COLORS(
-      model_, prompt.get(),
-      &ColorScheme::audio_permission_prompt_secondary_button_colors,
-      &AudioPermissionPrompt::SetSecondaryButtonColors);
-  VR_BIND_COLOR(model_, prompt.get(),
-                &ColorScheme::audio_permission_prompt_icon_foreground,
-                &AudioPermissionPrompt::SetIconColor);
-  VR_BIND_COLOR(model_, prompt.get(),
-                &ColorScheme::audio_permission_prompt_background,
-                &TexturedElement::SetBackgroundColor);
-  VR_BIND_COLOR(model_, prompt.get(), &ColorScheme::element_foreground,
-                &TexturedElement::SetForegroundColor);
-
-  EventHandlers event_handlers;
-  event_handlers.button_up =
-      base::BindRepeating([](ExitPrompt* prompt) { prompt->Cancel(); },
-                          base::Unretained(prompt.get()));
-  backplane->set_event_handlers(event_handlers);
-
-  shadow->AddChild(std::move(prompt));
-  backplane->AddChild(std::move(shadow));
-  scene_->AddUiElement(k2dBrowsingRepositioner, std::move(backplane));
+  // We re-use the same button texts as the audio permission prompt.
+  prompt = CreatePrompt(kUpdateKeyboardPrompt, model_, browser_,
+                        IDS_VR_UPDATE_KEYBOARD_PROMPT,
+                        vector_icons::kInfoOutlineIcon,
+                        IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_CONTINUE_BUTTON,
+                        IDS_VR_SHELL_AUDIO_PERMISSION_PROMPT_ABORT_BUTTON);
+  VR_BIND_VISIBILITY(prompt, model->active_modal_prompt_type ==
+                                 kModalPromptTypeUpdateKeyboard);
+  scene_->AddUiElement(k2dBrowsingRepositioner, std::move(prompt));
 }
 
 void UiSceneCreator::CreateWebVrOverlayElements() {
diff --git a/chrome/browser/vr/ui_scene_creator.h b/chrome/browser/vr/ui_scene_creator.h
index 964c7b0f..f8b77bac 100644
--- a/chrome/browser/vr/ui_scene_creator.h
+++ b/chrome/browser/vr/ui_scene_creator.h
@@ -47,7 +47,7 @@
   void CreateOmnibox();
   void CreateCloseButton();
   void CreateExitPrompt();
-  void CreateAudioPermissionPrompt();
+  void CreatePrompts();
   void CreateFullscreenToast();
   void CreateVoiceSearchUiGroup();
   void CreateContentRepositioningAffordance();
diff --git a/chrome/browser/vr/ui_unittest.cc b/chrome/browser/vr/ui_unittest.cc
index c865121..da1ded3 100644
--- a/chrome/browser/vr/ui_unittest.cc
+++ b/chrome/browser/vr/ui_unittest.cc
@@ -521,6 +521,41 @@
   VerifyOnlyElementsVisible("Prompt invisible", kElementsVisibleInBrowsing);
 }
 
+TEST_F(UiTest, ClickingOmniboxTriggersUnsupportedMode) {
+  UiInitialState state;
+  state.needs_keyboard_update = true;
+  CreateScene(state);
+  VerifyOnlyElementsVisible("Initial", kElementsVisibleInBrowsing);
+
+  // Clicking the omnibox should show the update prompt.
+  auto* omnibox = scene_->GetUiElementByName(kUrlBarOriginContent);
+  EXPECT_CALL(*browser_,
+              OnUnsupportedMode(UiUnsupportedMode::kNeedsKeyboardUpdate));
+  omnibox->OnButtonUp({0, 10});
+  ui_->ShowExitVrPrompt(UiUnsupportedMode::kNeedsKeyboardUpdate);
+  OnBeginFrame();
+  EXPECT_EQ(model_->active_modal_prompt_type,
+            ModalPromptType::kModalPromptTypeUpdateKeyboard);
+  EXPECT_TRUE(scene_->GetUiElementByName(kUpdateKeyboardPrompt)->IsVisible());
+}
+
+TEST_F(UiTest, WebInputEditingTriggersUnsupportedMode) {
+  UiInitialState state;
+  state.needs_keyboard_update = true;
+  CreateScene(state);
+  VerifyOnlyElementsVisible("Initial", kElementsVisibleInBrowsing);
+
+  // A call to show the keyboard should show the update prompt.
+  EXPECT_CALL(*browser_,
+              OnUnsupportedMode(UiUnsupportedMode::kNeedsKeyboardUpdate));
+  ui_->ShowSoftInput(true);
+  ui_->ShowExitVrPrompt(UiUnsupportedMode::kNeedsKeyboardUpdate);
+  OnBeginFrame();
+  EXPECT_EQ(model_->active_modal_prompt_type,
+            ModalPromptType::kModalPromptTypeUpdateKeyboard);
+  EXPECT_TRUE(scene_->GetUiElementByName(kUpdateKeyboardPrompt)->IsVisible());
+}
+
 TEST_F(UiTest, UiUpdatesForShowingExitPrompt) {
   CreateScene(kNotInCct, kNotInWebVr);
 
diff --git a/chrome/common/client_hints/client_hints.cc b/chrome/common/client_hints/client_hints.cc
index 19b9585..b0a30709 100644
--- a/chrome/common/client_hints/client_hints.cc
+++ b/chrome/common/client_hints/client_hints.cc
@@ -12,7 +12,6 @@
 
 void GetAllowedClientHintsFromSource(
     const GURL& url,
-    const GURL& document_origin,
     const ContentSettingsForOneType& client_hints_rules,
     blink::WebEnabledClientHints* client_hints) {
   if (client_hints_rules.empty())
@@ -22,10 +21,6 @@
     return;
 
   const GURL& origin = url.GetOrigin();
-  // Client hints are allowed only for the resources that belong to the same
-  // origin as the current document.
-  if (origin != document_origin)
-    return;
 
   for (const auto& rule : client_hints_rules) {
     // Look for an exact match since persisted client hints are disabled by
diff --git a/chrome/common/client_hints/client_hints.h b/chrome/common/client_hints/client_hints.h
index 90f2321..a904642 100644
--- a/chrome/common/client_hints/client_hints.h
+++ b/chrome/common/client_hints/client_hints.h
@@ -16,13 +16,10 @@
 namespace client_hints {
 
 // Retrieves the persistent client hints that should be set when fetching a
-// resource from |url| that belongs to a document loaded from the origin
-// |document_origin|.
-// The method also updates |client_hints| with the result.
+// resource from |url|. The method updates |client_hints| with the result.
 // |client_hints_rules| contains the content settings for the client hints.
 void GetAllowedClientHintsFromSource(
     const GURL& url,
-    const GURL& document_origin,
     const ContentSettingsForOneType& client_hints_rules,
     blink::WebEnabledClientHints* client_hints);
 
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
index d9c4dfa..50a94228 100644
--- a/chrome/renderer/content_settings_observer.cc
+++ b/chrome/renderer/content_settings_observer.cc
@@ -510,15 +510,8 @@
   if (content_setting_rules_->client_hints_rules.empty())
     return;
 
-  // Pass the host of the URL of the top webframe.
   client_hints::GetAllowedClientHintsFromSource(
       url,
-      GURL(render_frame()
-               ->GetWebFrame()
-               ->Top()
-               ->GetSecurityOrigin()
-               .ToString()
-               .Ascii()),
       content_setting_rules_->client_hints_rules, client_hints);
 }
 
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index a476543..c52e001f 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -182,7 +182,10 @@
       "base/test_browser_window.h",
     ]
   } else {
-    public_deps += [ "//components/zoom:test_support" ]
+    public_deps += [
+      "//components/ukm:test_support",
+      "//components/zoom:test_support",
+    ]
     sources += [
       "../browser/ui/tabs/pinned_tab_test_utils.cc",
       "../browser/ui/tabs/pinned_tab_test_utils.h",
@@ -451,6 +454,7 @@
       "../browser/autofill/autofill_server_browsertest.cc",
       "../browser/autofill/content_autofill_driver_browsertest.cc",
       "../browser/autofill/form_structure_browsertest.cc",
+      "../browser/background_fetch/background_fetch_browsertest.cc",
       "../browser/banners/app_banner_manager_browsertest.cc",
       "../browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc",
       "../browser/browser_encoding_browsertest.cc",
@@ -3008,7 +3012,6 @@
       "//chrome/browser/resource_coordinator:tab_metrics_event_proto",
       "//components/favicon/core/test:test_support",
       "//components/signin/core/browser:signin_features",
-      "//components/ukm:test_support",
       "//services/metrics/public/cpp:ukm_builders",
       "//third_party/libaddressinput",
     ]
@@ -4542,6 +4545,7 @@
       "../browser/ui/search/local_ntp_uitest.cc",
       "../browser/ui/send_mouse_move_uitest_win.cc",
       "../browser/ui/startup/startup_browser_creator_interactive_uitest.cc",
+      "../browser/ui/tabs/window_activity_watcher_interactive_uitest.cc",
       "../browser/ui/translate/translate_bubble_test_utils.h",
       "../browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc",
       "//ui/base/clipboard/clipboard_unittest.cc",
@@ -4621,11 +4625,13 @@
       "//chrome:strings",
       "//chrome/browser",
       "//chrome/browser/devtools",
+      "//chrome/browser/resource_coordinator:tab_metrics_event_proto",
       "//chrome/renderer",
       "//components/keep_alive_registry",
       "//components/resources",
       "//components/sync",
       "//components/sync:test_support_model",
+      "//components/ukm:test_support",
       "//content/app/resources",
       "//content/test:test_support",
       "//crypto:platform",
@@ -4636,6 +4642,7 @@
       "//net",
       "//net:net_resources",
       "//net:test_support",
+      "//services/metrics/public/cpp:ukm_builders",
       "//skia",
       "//testing/gmock",
       "//testing/gtest",
diff --git a/chrome/test/base/interactive_test_utils.cc b/chrome/test/base/interactive_test_utils.cc
index 9e281f0..22a8418 100644
--- a/chrome/test/base/interactive_test_utils.cc
+++ b/chrome/test/base/interactive_test_utils.cc
@@ -56,7 +56,42 @@
   if (browser != browser_)
     return;
 
-  ASSERT_TRUE(browser->window()->IsActive());
+// On Mac, BrowserWindowCocoa::Show() sets the active browser before the
+// window becomes the key window.
+#if !defined(OS_MACOSX)
+  EXPECT_TRUE(browser->window()->IsActive());
+#endif
+
+  observed_ = true;
+  BrowserList::RemoveObserver(this);
+  if (run_loop_.running())
+    run_loop_.Quit();
+}
+
+BrowserDeactivationWaiter::BrowserDeactivationWaiter(const Browser* browser)
+    : browser_(browser), observed_(false) {
+  if (chrome::FindLastActive() != browser_ && !browser->window()->IsActive()) {
+    observed_ = true;
+    return;
+  }
+  BrowserList::AddObserver(this);
+}
+
+BrowserDeactivationWaiter::~BrowserDeactivationWaiter() = default;
+
+void BrowserDeactivationWaiter::WaitForDeactivation() {
+  if (observed_)
+    return;
+  DCHECK(!run_loop_.running()) << "WaitForDeactivation() can be called at most "
+                                  "once. Construct a new "
+                                  "BrowserDeactivationWaiter instead.";
+  run_loop_.Run();
+}
+
+void BrowserDeactivationWaiter::OnBrowserNoLongerActive(Browser* browser) {
+  if (browser != browser_)
+    return;
+
   observed_ = true;
   BrowserList::RemoveObserver(this);
   if (run_loop_.running())
diff --git a/chrome/test/base/interactive_test_utils.h b/chrome/test/base/interactive_test_utils.h
index f0944801..55fea9a 100644
--- a/chrome/test/base/interactive_test_utils.h
+++ b/chrome/test/base/interactive_test_utils.h
@@ -27,8 +27,6 @@
 
 // Use in browser interactive uitests to wait until a browser is set to active.
 // To use, create and call WaitForActivation().
-// TODO(warx): check if code base exists the requirement for deactivation sync,
-// this class can be modified to support that.
 class BrowserActivationWaiter : public BrowserListObserver {
  public:
   explicit BrowserActivationWaiter(const Browser* browser);
@@ -50,6 +48,30 @@
   DISALLOW_COPY_AND_ASSIGN(BrowserActivationWaiter);
 };
 
+// Use in browser interactive uitests to wait until a browser is deactivated.
+// To use, create and call WaitForDeactivation().
+class BrowserDeactivationWaiter : public BrowserListObserver {
+ public:
+  explicit BrowserDeactivationWaiter(const Browser* browser);
+  ~BrowserDeactivationWaiter() override;
+
+  // Runs a message loop until the |browser_| supplied to the constructor is
+  // deactivated, or returns immediately if |browser_| has already become
+  // inactive.
+  // Should only be called once.
+  void WaitForDeactivation();
+
+ private:
+  // BrowserListObserver:
+  void OnBrowserNoLongerActive(Browser* browser) override;
+
+  const Browser* const browser_;
+  bool observed_;
+  base::RunLoop run_loop_;
+
+  DISALLOW_COPY_AND_ASSIGN(BrowserDeactivationWaiter);
+};
+
 // Brings the native window for |browser| to the foreground and waits until the
 // browser is active.
 bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT;
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 1e0d321f..1719ba4 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -151,7 +151,7 @@
   TestExtensionURLRequestContext() {
     content::CookieStoreConfig cookie_config;
     cookie_config.cookieable_schemes.push_back(extensions::kExtensionScheme);
-    cookie_store_ = content::CreateCookieStore(cookie_config, nullptr);
+    cookie_store_ = content::CreateCookieStore(cookie_config);
     set_cookie_store(cookie_store_.get());
   }
 
diff --git a/chrome/test/chromedriver/test/test_expectations b/chrome/test/chromedriver/test/test_expectations
index d2d016e..ba3e931 100644
--- a/chrome/test/chromedriver/test/test_expectations
+++ b/chrome/test/chromedriver/test/test_expectations
@@ -303,6 +303,7 @@
         'MiscTest.testClickingShouldNotTrampleWOrHInGlobalScope',
         'MiscTest.testShouldReportTheCurrentUrlCorrectly',
         'MiscTest.testStimulatesStrangeOnloadInteractionInFirefox',
+        'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_emailInput',
     ]
 )
 _OS_NEGATIVE_FILTER['android:chrome_beta'] = (
diff --git a/chrome/test/data/background_fetch/background_fetch.html b/chrome/test/data/background_fetch/background_fetch.html
new file mode 100644
index 0000000..95d417e
--- /dev/null
+++ b/chrome/test/data/background_fetch/background_fetch.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8" />
+    <title>BackgroundFetchBrowserTest helper page</title>
+    <script src="../result_queue.js"></script>
+    <script src="background_fetch.js"></script>
+  </head>
+  <body>
+    <!-- Logic located in background_fetch.js. -->
+  </body>
+</html>
diff --git a/chrome/test/data/background_fetch/background_fetch.js b/chrome/test/data/background_fetch/background_fetch.js
new file mode 100644
index 0000000..0732d8b
--- /dev/null
+++ b/chrome/test/data/background_fetch/background_fetch.js
@@ -0,0 +1,22 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Background Fetch Id to use when its value is not significant.
+const kBackgroundFetchId = 'bg-fetch-id';
+
+function RegisterServiceWorker() {
+  navigator.serviceWorker.register('sw.js').then(() => {
+    sendResultToTest('ok - service worker registered');
+  }).catch(sendErrorToTest);
+}
+
+// Starts a Background Fetch request for a single to-be-downloaded file.
+function StartSingleFileDownload() {
+  navigator.serviceWorker.ready.then(swRegistration => {
+    return swRegistration.backgroundFetch.fetch(
+        kBackgroundFetchId, [ '/notifications/icon.png' ]);
+  }).then(bgFetchRegistration => {
+    sendResultToTest('ok');
+  }).catch(sendErrorToTest);
+}
diff --git a/chrome/test/data/background_fetch/sw.js b/chrome/test/data/background_fetch/sw.js
new file mode 100644
index 0000000..2567b76
--- /dev/null
+++ b/chrome/test/data/background_fetch/sw.js
@@ -0,0 +1,5 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Deliberately left empty.
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc
index 9053895..dd4dfb69 100644
--- a/chromecast/browser/url_request_context_factory.cc
+++ b/chromecast/browser/url_request_context_factory.cc
@@ -355,7 +355,7 @@
   PopulateNetworkSessionParams(IgnoreCertificateErrors(), &session_params);
   system_job_factory_.reset(new net::URLRequestJobFactoryImpl());
   system_cookie_store_ =
-      content::CreateCookieStore(content::CookieStoreConfig(), net_log_);
+      content::CreateCookieStore(content::CookieStoreConfig());
 
   net::URLRequestContext* system_context = new net::URLRequestContext();
   system_context->set_host_resolver(host_resolver_.get());
@@ -422,7 +422,7 @@
       protocol_handlers, std::move(request_interceptors));
 
   content::CookieStoreConfig cookie_config(cookie_path, false, true, nullptr);
-  main_cookie_store_ = content::CreateCookieStore(cookie_config, net_log_);
+  main_cookie_store_ = content::CreateCookieStore(cookie_config);
 
   net::URLRequestContext* main_context = new net::URLRequestContext();
   main_context->set_host_resolver(host_resolver_.get());
diff --git a/components/autofill/content/common/autofill_types.mojom b/components/autofill/content/common/autofill_types.mojom
index a595a19..23261d7 100644
--- a/components/autofill/content/common/autofill_types.mojom
+++ b/components/autofill/content/common/autofill_types.mojom
@@ -182,8 +182,8 @@
   uint32 confirmation_field_signature;
 };
 
-// autofill::PossibleUsernamePair
-struct PossibleUsernamePair {
+// autofill::ValueElementPair
+struct ValueElementPair {
   mojo_base.mojom.String16 value;
   mojo_base.mojom.String16 field_name;
 };
@@ -199,8 +199,8 @@
   mojo_base.mojom.String16 username_element;
   bool username_marked_by_site;
   mojo_base.mojom.String16 username_value;
-  array<PossibleUsernamePair> other_possible_usernames;
-  array<mojo_base.mojom.String16> all_possible_passwords;
+  array<ValueElementPair> other_possible_usernames;
+  array<ValueElementPair> all_possible_passwords;
   bool form_has_autofilled_value;
   mojo_base.mojom.String16 password_element;
   mojo_base.mojom.String16 password_value;
diff --git a/components/autofill/content/common/autofill_types.typemap b/components/autofill/content/common/autofill_types.typemap
index 775d6e5..44e88ba 100644
--- a/components/autofill/content/common/autofill_types.typemap
+++ b/components/autofill/content/common/autofill_types.typemap
@@ -43,7 +43,7 @@
   "autofill.mojom.PasswordFormScheme=autofill::PasswordForm::Scheme",
   "autofill.mojom.PasswordFormType=autofill::PasswordForm::Type",
   "autofill.mojom.RoleAttribute=autofill::FormFieldData::RoleAttribute",
-  "autofill.mojom.PossibleUsernamePair=autofill::PossibleUsernamePair",
+  "autofill.mojom.ValueElementPair=autofill::ValueElementPair",
   "autofill.mojom.PasswordFormSubmissionIndicatorEvent=autofill::PasswordForm::SubmissionIndicatorEvent",
   "autofill.mojom.SubmissionSource=autofill::SubmissionSource",
 ]
diff --git a/components/autofill/content/common/autofill_types_struct_traits.cc b/components/autofill/content/common/autofill_types_struct_traits.cc
index aaa587f91..8a4bc43 100644
--- a/components/autofill/content/common/autofill_types_struct_traits.cc
+++ b/components/autofill/content/common/autofill_types_struct_traits.cc
@@ -860,10 +860,10 @@
 }
 
 // static
-bool StructTraits<autofill::mojom::PossibleUsernamePairDataView,
-                  autofill::PossibleUsernamePair>::
-    Read(autofill::mojom::PossibleUsernamePairDataView data,
-         autofill::PossibleUsernamePair* out) {
+bool StructTraits<autofill::mojom::ValueElementPairDataView,
+                  autofill::ValueElementPair>::
+    Read(autofill::mojom::ValueElementPairDataView data,
+         autofill::ValueElementPair* out) {
   if (!data.ReadValue(&out->first) || !data.ReadFieldName(&out->second))
     return false;
 
diff --git a/components/autofill/content/common/autofill_types_struct_traits.h b/components/autofill/content/common/autofill_types_struct_traits.h
index 88de915..e69832b 100644
--- a/components/autofill/content/common/autofill_types_struct_traits.h
+++ b/components/autofill/content/common/autofill_types_struct_traits.h
@@ -5,7 +5,10 @@
 #ifndef COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_TYPES_STRUCT_TRAITS_H_
 #define COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_TYPES_STRUCT_TRAITS_H_
 
+#include <map>
+#include <string>
 #include <utility>
+#include <vector>
 
 #include "base/i18n/rtl.h"
 #include "base/strings/string16.h"
@@ -426,12 +429,12 @@
     return r.username_value;
   }
 
-  static const std::vector<autofill::PossibleUsernamePair>&
+  static const std::vector<autofill::ValueElementPair>&
   other_possible_usernames(const autofill::PasswordForm& r) {
     return r.other_possible_usernames;
   }
 
-  static const std::vector<base::string16>& all_possible_passwords(
+  static const std::vector<autofill::ValueElementPair>& all_possible_passwords(
       const autofill::PasswordForm& r) {
     return r.all_possible_passwords;
   }
@@ -585,18 +588,18 @@
 };
 
 template <>
-struct StructTraits<autofill::mojom::PossibleUsernamePairDataView,
-                    autofill::PossibleUsernamePair> {
-  static base::string16 value(const autofill::PossibleUsernamePair& r) {
+struct StructTraits<autofill::mojom::ValueElementPairDataView,
+                    autofill::ValueElementPair> {
+  static base::string16 value(const autofill::ValueElementPair& r) {
     return r.first;
   }
 
-  static base::string16 field_name(const autofill::PossibleUsernamePair& r) {
+  static base::string16 field_name(const autofill::ValueElementPair& r) {
     return r.second;
   }
 
-  static bool Read(autofill::mojom::PossibleUsernamePairDataView data,
-                   autofill::PossibleUsernamePair* out);
+  static bool Read(autofill::mojom::ValueElementPairDataView data,
+                   autofill::ValueElementPair* out);
 };
 
 }  // namespace mojo
diff --git a/components/autofill/content/common/autofill_types_struct_traits_unittest.cc b/components/autofill/content/common/autofill_types_struct_traits_unittest.cc
index 0cc9dc20..b4e9493 100644
--- a/components/autofill/content/common/autofill_types_struct_traits_unittest.cc
+++ b/components/autofill/content/common/autofill_types_struct_traits_unittest.cc
@@ -70,12 +70,14 @@
   form->username_element = base::ASCIIToUTF16("username");
   form->username_marked_by_site = true;
   form->username_value = base::ASCIIToUTF16("test@gmail.com");
-  form->other_possible_usernames.push_back(PossibleUsernamePair(
+  form->other_possible_usernames.push_back(ValueElementPair(
       base::ASCIIToUTF16("Jerry_1"), base::ASCIIToUTF16("id1")));
-  form->other_possible_usernames.push_back(PossibleUsernamePair(
+  form->other_possible_usernames.push_back(ValueElementPair(
       base::ASCIIToUTF16("Jerry_2"), base::ASCIIToUTF16("id2")));
-  form->all_possible_passwords.push_back(base::ASCIIToUTF16("pass1"));
-  form->all_possible_passwords.push_back(base::ASCIIToUTF16("pass2"));
+  form->all_possible_passwords.push_back(
+      ValueElementPair(base::ASCIIToUTF16("pass1"), base::ASCIIToUTF16("el1")));
+  form->all_possible_passwords.push_back(
+      ValueElementPair(base::ASCIIToUTF16("pass2"), base::ASCIIToUTF16("el2")));
   form->form_has_autofilled_value = true;
   form->password_element = base::ASCIIToUTF16("password");
   form->password_value = base::ASCIIToUTF16("test");
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 47a5c68..c67de27 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -544,6 +544,9 @@
 }
 
 bool AutofillAgent::CollectFormlessElements(FormData* output) {
+  if (render_frame() == nullptr || render_frame()->GetWebFrame() == nullptr)
+    return false;
+
   WebDocument document = render_frame()->GetWebFrame()->GetDocument();
 
   // Build up the FormData from the unowned elements. This logic mostly
diff --git a/components/autofill/content/renderer/password_form_conversion_utils.cc b/components/autofill/content/renderer/password_form_conversion_utils.cc
index 84a81b64..46e6682a9 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils.cc
@@ -406,13 +406,12 @@
   }
 }
 
-autofill::PossibleUsernamePair MakePossibleUsernamePair(
+autofill::ValueElementPair MakePossibleUsernamePair(
     const blink::WebInputElement& input) {
   base::string16 trimmed_input_value, trimmed_input_autofill;
   base::TrimString(input.Value().Utf16(), base::ASCIIToUTF16(" "),
                    &trimmed_input_value);
-  return autofill::PossibleUsernamePair(trimmed_input_value,
-                                        input.NameForAutofill().Utf16());
+  return {trimmed_input_value, input.NameForAutofill().Utf16()};
 }
 
 // Check if a script modified username is suitable for Password Manager to
@@ -680,7 +679,7 @@
 
   bool form_has_autofilled_value = false;
   // Add non-empty unique possible passwords to the vector.
-  std::vector<base::string16> all_possible_passwords;
+  std::vector<autofill::ValueElementPair> all_possible_passwords;
   for (const WebInputElement& password_element : passwords_without_heuristics) {
     const base::string16 value = password_element.Value().Utf16();
     if (value.empty())
@@ -689,9 +688,12 @@
         FieldHasPropertiesMask(field_value_and_properties_map, password_element,
                                FieldPropertiesFlags::AUTOFILLED);
     form_has_autofilled_value |= element_has_autofilled_value;
-    if (find(all_possible_passwords.begin(), all_possible_passwords.end(),
-             value) == all_possible_passwords.end()) {
-      all_possible_passwords.push_back(std::move(value));
+    if (find_if(all_possible_passwords.begin(), all_possible_passwords.end(),
+                [&value](const auto& pair) -> bool {
+                  return pair.first == value;
+                }) == all_possible_passwords.end()) {
+      all_possible_passwords.push_back(
+          {std::move(value), password_element.NameForAutofill().Utf16()});
     }
   }
 
@@ -753,8 +755,8 @@
       form_util::GetCanonicalOriginForDocument(form.document);
   password_form->signon_realm = GetSignOnRealm(password_form->origin);
 
-  // Convert |possible_usernames| to PossibleUsernamesVector.
-  autofill::PossibleUsernamesVector other_possible_usernames;
+  // Convert |possible_usernames| to ValueElementVector.
+  autofill::ValueElementVector other_possible_usernames;
   for (const WebInputElement& possible_username : possible_usernames) {
     if (possible_username == username_element)
       continue;
diff --git a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
index ec4be0d..64d2a63 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
@@ -858,7 +858,7 @@
         EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_username_value),
                   password_form->username_value);
         EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_other_possible_usernames),
-                  OtherPossibleUsernamesToString(
+                  ValueElementVectorToString(
                       password_form->other_possible_usernames));
       } else {
         EXPECT_TRUE(password_form->username_value.empty());
@@ -928,8 +928,8 @@
     EXPECT_EQ(base::UTF8ToUTF16("William"), password_form->username_value);
     EXPECT_THAT(
         password_form->other_possible_usernames,
-        testing::ElementsAre(PossibleUsernamePair(
-            base::UTF8ToUTF16("Smith"), base::UTF8ToUTF16("usrname2"))));
+        testing::ElementsAre(ValueElementPair(base::UTF8ToUTF16("Smith"),
+                                              base::UTF8ToUTF16("usrname2"))));
   }
 }
 
@@ -998,8 +998,8 @@
     EXPECT_EQ(base::UTF8ToUTF16("William"), password_form->username_value);
     EXPECT_THAT(
         password_form->other_possible_usernames,
-        testing::ElementsAre(PossibleUsernamePair(
-            base::UTF8ToUTF16("Smith"), base::UTF8ToUTF16("usrname2"))));
+        testing::ElementsAre(ValueElementPair(base::UTF8ToUTF16("Smith"),
+                                              base::UTF8ToUTF16("usrname2"))));
   }
 }
 
@@ -1357,12 +1357,12 @@
     if (strcmp(cases[i].expected_username_value, "William") == 0) {
       EXPECT_THAT(
           password_form->other_possible_usernames,
-          testing::ElementsAre(PossibleUsernamePair(
+          testing::ElementsAre(ValueElementPair(
               base::UTF8ToUTF16("Smith"), base::UTF8ToUTF16("usrname2"))));
     } else {
       EXPECT_THAT(
           password_form->other_possible_usernames,
-          testing::ElementsAre(PossibleUsernamePair(
+          testing::ElementsAre(ValueElementPair(
               base::UTF8ToUTF16("William"), base::UTF8ToUTF16("usrname1"))));
     }
     EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_password_element),
@@ -1814,13 +1814,19 @@
   EXPECT_EQ(base::ASCIIToUTF16("username1"), password_form->username_element);
   EXPECT_EQ(base::ASCIIToUTF16("John"), password_form->username_value);
   EXPECT_EQ(base::ASCIIToUTF16("alpha1"), password_form->password_value);
-  EXPECT_THAT(password_form->all_possible_passwords,
-              testing::ElementsAre(
-                  base::ASCIIToUTF16("alpha1"), base::ASCIIToUTF16("alpha2"),
-                  base::ASCIIToUTF16("alpha3"), base::ASCIIToUTF16("alpha4")));
-  EXPECT_EQ(
-      base::ASCIIToUTF16("alpha1, alpha2, alpha3, alpha4"),
-      AllPossiblePasswordsToString(password_form->all_possible_passwords));
+  EXPECT_THAT(
+      password_form->all_possible_passwords,
+      testing::ElementsAre(ValueElementPair(base::ASCIIToUTF16("alpha1"),
+                                            base::ASCIIToUTF16("password1")),
+                           ValueElementPair(base::ASCIIToUTF16("alpha2"),
+                                            base::ASCIIToUTF16("password2")),
+                           ValueElementPair(base::ASCIIToUTF16("alpha3"),
+                                            base::ASCIIToUTF16("password3")),
+                           ValueElementPair(base::ASCIIToUTF16("alpha4"),
+                                            base::ASCIIToUTF16("password4"))));
+  EXPECT_EQ(base::ASCIIToUTF16("alpha1+password1, alpha2+password2, "
+                               "alpha3+password3, alpha4+password4"),
+            ValueElementVectorToString(password_form->all_possible_passwords));
 }
 
 TEST_F(MAYBE_PasswordFormConversionUtilsTest,
diff --git a/components/autofill/core/common/password_form.cc b/components/autofill/core/common/password_form.cc
index c9777b6..bb4b01c 100644
--- a/components/autofill/core/common/password_form.cc
+++ b/components/autofill/core/common/password_form.cc
@@ -41,11 +41,10 @@
                      form.new_password_value_is_default);
   target->SetBoolean("new_password_marked_by_site",
                      form.new_password_marked_by_site);
-  target->SetString(
-      "other_possible_usernames",
-      OtherPossibleUsernamesToString(form.other_possible_usernames));
+  target->SetString("other_possible_usernames",
+                    ValueElementVectorToString(form.other_possible_usernames));
   target->SetString("all_possible_passwords",
-                    AllPossiblePasswordsToString(form.all_possible_passwords));
+                    ValueElementVectorToString(form.all_possible_passwords));
   target->SetBoolean("blacklisted", form.blacklisted_by_user);
   target->SetBoolean("preferred", form.preferred);
   target->SetDouble("date_created", form.date_created.ToDoubleT());
@@ -191,21 +190,16 @@
   return left->origin < right->origin;
 }
 
-base::string16 OtherPossibleUsernamesToString(
-    const PossibleUsernamesVector& possible_usernames) {
-  std::vector<base::string16> pairs(possible_usernames.size());
-  std::transform(possible_usernames.begin(), possible_usernames.end(),
-                 pairs.begin(), [](const PossibleUsernamePair& p) {
+base::string16 ValueElementVectorToString(
+    const ValueElementVector& value_element_pairs) {
+  std::vector<base::string16> pairs(value_element_pairs.size());
+  std::transform(value_element_pairs.begin(), value_element_pairs.end(),
+                 pairs.begin(), [](const ValueElementPair& p) {
                    return p.first + base::ASCIIToUTF16("+") + p.second;
                  });
   return base::JoinString(pairs, base::ASCIIToUTF16(", "));
 }
 
-base::string16 AllPossiblePasswordsToString(
-    const std::vector<base::string16>& possible_passwords) {
-  return base::JoinString(possible_passwords, base::ASCIIToUTF16(", "));
-}
-
 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout) {
   switch (layout) {
     case PasswordForm::Layout::LAYOUT_OTHER:
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index 634b230..f3f4ad3 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -18,11 +18,11 @@
 
 namespace autofill {
 
-// Pair of possible username value and field name that contained this value.
-using PossibleUsernamePair = std::pair<base::string16, base::string16>;
+// Pair of a value and the name of the element that contained this value.
+using ValueElementPair = std::pair<base::string16, base::string16>;
 
 // Vector of possible username values and corresponding field names.
-using PossibleUsernamesVector = std::vector<PossibleUsernamePair>;
+using ValueElementVector = std::vector<ValueElementPair>;
 
 // The PasswordForm struct encapsulates information about a login form,
 // which can be an HTML form or a dialog with username/password text fields.
@@ -181,12 +181,12 @@
   // determining the username are incorrect. Optional.
   //
   // When parsing an HTML form, this is typically empty.
-  PossibleUsernamesVector other_possible_usernames;
+  ValueElementVector other_possible_usernames;
 
   // This member is populated in cases where we there are multiple possible
   // password values. Used in pending password state, to populate a dropdown
   // for possible passwords. Contains all possible passwords. Optional.
-  std::vector<base::string16> all_possible_passwords;
+  ValueElementVector all_possible_passwords;
 
   // True if |all_possible_passwords| have autofilled value or its part.
   bool form_has_autofilled_value;
@@ -362,13 +362,9 @@
                   const std::unique_ptr<PasswordForm>& right) const;
 };
 
-// Converts a vector of possible usernames to string.
-base::string16 OtherPossibleUsernamesToString(
-    const PossibleUsernamesVector& possible_usernames);
-
-// Converts a vector of possible passwords to string.
-base::string16 AllPossiblePasswordsToString(
-    const std::vector<base::string16>& possible_passwords);
+// Converts a vector of ValueElementPair to string.
+base::string16 ValueElementVectorToString(
+    const ValueElementVector& value_element_pairs);
 
 // For testing.
 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout);
diff --git a/components/component_updater/component_installer_unittest.cc b/components/component_updater/component_installer_unittest.cc
index a1f6717..4c52a80e 100644
--- a/components/component_updater/component_installer_unittest.cc
+++ b/components/component_updater/component_installer_unittest.cc
@@ -79,6 +79,7 @@
 
   void Update(const std::vector<std::string>& ids,
               CrxDataCallback crx_data_callback,
+              bool is_foreground,
               Callback callback) {
     DoUpdate(ids, std::move(crx_data_callback));
     std::move(callback).Run(update_client::Error::NONE);
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
index 5fbf749..11f205d 100644
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -320,6 +320,7 @@
     update_client_->Update(
         unsecure_ids,
         base::BindOnce(&CrxUpdateService::OnUpdate, base::Unretained(this)),
+        false,
         base::BindOnce(&CrxUpdateService::OnUpdateComplete,
                        base::Unretained(this), Callback(),
                        base::TimeTicks::Now()));
@@ -329,6 +330,7 @@
     update_client_->Update(
         secure_ids,
         base::BindOnce(&CrxUpdateService::OnUpdate, base::Unretained(this)),
+        false,
         base::BindOnce(&CrxUpdateService::OnUpdateComplete,
                        base::Unretained(this), Callback(),
                        base::TimeTicks::Now()));
diff --git a/components/component_updater/component_updater_service_unittest.cc b/components/component_updater/component_updater_service_unittest.cc
index 60a081c0..c2f46d1 100644
--- a/components/component_updater/component_updater_service_unittest.cc
+++ b/components/component_updater/component_updater_service_unittest.cc
@@ -83,7 +83,11 @@
 
   void Update(const std::vector<std::string>& ids,
               CrxDataCallback crx_data_callback,
+              bool is_foreground,
               Callback callback) override {
+    // All update calls initiated by the component update service are
+    // automatically triggered as background updates without user intervention.
+    EXPECT_FALSE(is_foreground);
     DoUpdate(ids, std::move(crx_data_callback));
     std::move(callback).Run(update_client::Error::NONE);
   }
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index 60649998..fec8e1c 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -378,7 +378,7 @@
       setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
   std::unique_ptr<net::CookieStore> cookie_store =
       std::make_unique<net::CookieStoreIOS>(
-          [NSHTTPCookieStorage sharedHTTPCookieStorage], net_log_.get());
+          [NSHTTPCookieStorage sharedHTTPCookieStorage]);
   context_builder.SetCookieAndChannelIdStores(std::move(cookie_store), nullptr);
 
   context_builder.set_enable_brotli(brotli_enabled_);
diff --git a/components/feed/BUILD.gn b/components/feed/BUILD.gn
new file mode 100644
index 0000000..68118d3
--- /dev/null
+++ b/components/feed/BUILD.gn
@@ -0,0 +1,14 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//components/feed/features.gni")
+
+# This file is in a separate target so all targets in the build can refer to the
+# buildflag header to get the necessary preprocessor defines without bringing in
+# any of the feed targets.
+buildflag_header("features") {
+  header = "features.h"
+  flags = [ "ENABLE_FEED_IN_CHROME=$enable_feed_in_chrome" ]
+}
diff --git a/components/feed/OWNERS b/components/feed/OWNERS
new file mode 100644
index 0000000..ba0283b8
--- /dev/null
+++ b/components/feed/OWNERS
@@ -0,0 +1,6 @@
+fgorski@chromium.org
+pavely@chromium.org
+zea@chromium.org
+
+# Team: chrome-jardin-team@google.com
+# COMPONENT: UI>Browser>ContentSuggestions>Feed
diff --git a/components/feed/README.md b/components/feed/README.md
new file mode 100644
index 0000000..546cf3c
--- /dev/null
+++ b/components/feed/README.md
@@ -0,0 +1,10 @@
+# Feed Host Component
+
+Feed host is a component providing necessary APIs for hosting a third party
+[Feed](https://chromium.googlesource.com/feed) library in Chrome. Initially the
+Feed library is only supporting Chrome for Android, but most of the host API
+implementations are designed to be reusable on other platforms.
+
+Library code and host API definitions can be found under
+[//third_party/feed/](../../third_party/feed/). More information about the
+library is available in the [README.md](../../third_party/feed/src/README.md).
diff --git a/components/feed/features.gni b/components/feed/features.gni
new file mode 100644
index 0000000..73f73c7
--- /dev/null
+++ b/components/feed/features.gni
@@ -0,0 +1,7 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+  enable_feed_in_chrome = is_android
+}
diff --git a/components/grpc_support/include/bidirectional_stream_c.h b/components/grpc_support/include/bidirectional_stream_c.h
index ffb235a..98866696 100644
--- a/components/grpc_support/include/bidirectional_stream_c.h
+++ b/components/grpc_support/include/bidirectional_stream_c.h
@@ -171,8 +171,7 @@
 
 /* Starts the stream by sending request to |url| using |method| and |headers|.
  * If |end_of_stream| is true, then no data is expected to be written. The
- * |method| is HTTP verb, with PUT having a special meaning to mark idempotent
- * request, which could use QUIC 0-RTT.
+ * |method| is HTTP verb.
  */
 GRPC_SUPPORT_EXPORT
 int bidirectional_stream_start(bidirectional_stream* stream,
diff --git a/components/offline_pages/core/model/clear_storage_task.cc b/components/offline_pages/core/model/clear_storage_task.cc
index bd203f98..8f72bd8 100644
--- a/components/offline_pages/core/model/clear_storage_task.cc
+++ b/components/offline_pages/core/model/clear_storage_task.cc
@@ -13,8 +13,7 @@
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
-#include "base/time/clock.h"
-#include "base/time/default_clock.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
 #include "components/offline_pages/core/client_policy_controller.h"
@@ -32,9 +31,9 @@
 
 namespace {
 
-#define PAGE_INFO_PROJECTION                                               \
-  " offline_id, client_namespace, client_id, file_size, last_access_time," \
-  " file_path"
+#define PAGE_INFO_PROJECTION                                            \
+  " offline_id, client_namespace, client_id, file_size, creation_time," \
+  " last_access_time, file_path "
 
 // This struct needs to be in sync with |PAGE_INFO_PROJECTION|.
 struct PageInfo {
@@ -43,6 +42,7 @@
   int64_t offline_id;
   ClientId client_id;
   int64_t file_size;
+  base::Time creation_time;
   base::Time last_access_time;
   base::FilePath file_path;
 };
@@ -63,10 +63,12 @@
   page_info.client_id =
       ClientId(statement->ColumnString(1), statement->ColumnString(2));
   page_info.file_size = statement->ColumnInt64(3);
-  page_info.last_access_time =
+  page_info.creation_time =
       store_utils::FromDatabaseTime(statement->ColumnInt64(4));
+  page_info.last_access_time =
+      store_utils::FromDatabaseTime(statement->ColumnInt64(5));
   page_info.file_path =
-      store_utils::FromDatabaseFilePath(statement->ColumnString(5));
+      store_utils::FromDatabaseFilePath(statement->ColumnString(6));
   return page_info;
 }
 
@@ -78,9 +80,6 @@
   const char kSql[] = "SELECT " PAGE_INFO_PROJECTION
                       " FROM offlinepages_v1"
                       " WHERE client_namespace = ?";
-  sql::Transaction transaction(db);
-  if (!transaction.Begin())
-    return result;
 
   for (const auto& temp_namespace_policy : temp_namespace_policy_map) {
     std::string name_space = temp_namespace_policy.first;
@@ -88,10 +87,12 @@
     statement.BindString(0, name_space);
     while (statement.Step())
       result->emplace_back(MakePageInfo(&statement));
+    if (!statement.Succeeded()) {
+      result->clear();
+      break;
+    }
   }
 
-  if (!transaction.Commit())
-    result->clear();
   return result;
 }
 
@@ -187,25 +188,29 @@
   if (!db)
     return std::make_pair(0, DeletePageResult::STORE_FAILURE);
 
-  DeletePageResult result = DeletePageResult::SUCCESS;
-  size_t pages_cleared = 0;
-
-  auto page_infos =
+  std::unique_ptr<std::vector<PageInfo>> page_infos =
       GetPageInfosToClear(temp_namespace_policy_map, start_time, stats, db);
 
-  if (page_infos->empty())
-    return std::make_pair(pages_cleared, result);
-
+  size_t pages_cleared = 0;
   for (const auto& page_info : *page_infos) {
     if (!base::PathExists(page_info.file_path) ||
         DeleteArchiveSync(page_info.file_path)) {
-      if (DeletePageEntryByOfflineIdSync(db, page_info.offline_id))
+      if (DeletePageEntryByOfflineIdSync(db, page_info.offline_id)) {
         pages_cleared++;
+        // Reports the time since creation in minutes.
+        base::TimeDelta time_since_creation =
+            start_time - page_info.creation_time;
+        UMA_HISTOGRAM_CUSTOM_COUNTS(
+            "OfflinePages.ClearTemporaryPages.TimeSinceCreation",
+            time_since_creation.InMinutes(), 1,
+            base::TimeDelta::FromDays(30).InMinutes(), 50);
+      }
     }
   }
-  if (pages_cleared != page_infos->size())
-    result = DeletePageResult::STORE_FAILURE;
-  return std::make_pair(pages_cleared, result);
+
+  return std::make_pair(pages_cleared, pages_cleared == page_infos->size()
+                                           ? DeletePageResult::SUCCESS
+                                           : DeletePageResult::STORE_FAILURE);
 }
 
 std::map<std::string, LifetimePolicy> GetTempNamespacePolicyMap(
diff --git a/components/offline_pages/core/model/clear_storage_task_unittest.cc b/components/offline_pages/core/model/clear_storage_task_unittest.cc
index d129e7f..c412c86 100644
--- a/components/offline_pages/core/model/clear_storage_task_unittest.cc
+++ b/components/offline_pages/core/model/clear_storage_task_unittest.cc
@@ -9,10 +9,10 @@
 #include "base/bind.h"
 #include "base/files/file_enumerator.h"
 #include "base/files/file_util.h"
+#include "base/test/histogram_tester.h"
 #include "base/test/simple_test_clock.h"
 #include "base/test/test_mock_time_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "base/time/clock.h"
 #include "base/time/time.h"
 #include "components/offline_pages/core/client_namespace_constants.h"
 #include "components/offline_pages/core/client_policy_controller.h"
@@ -76,10 +76,9 @@
   void TearDown() override;
 
   void Initialize(const std::vector<PageSettings>& settings,
-                  base::SimpleTestClock* clock,
                   TestOptions options = TestOptions::DEFAULT);
   void OnClearStorageDone(size_t cleared_page_count, ClearStorageResult result);
-  void AddPages(const PageSettings& setting, base::SimpleTestClock* clock_ptr);
+  void AddPages(const PageSettings& setting);
   void RunClearStorageTask(const base::Time& start_time);
 
   void SetFreeSpace(int64_t free_space) {
@@ -97,12 +96,13 @@
   }
   ArchiveManager* archive_manager() { return archive_manager_.get(); }
   const base::FilePath& temp_dir_path() { return temp_dir_.GetPath(); }
-  base::SimpleTestClock* clock() { return clock_; }
+  base::SimpleTestClock* clock() { return &clock_; }
   size_t last_cleared_page_count() { return last_cleared_page_count_; }
   int total_cleared_times() { return total_cleared_times_; }
   ClearStorageResult last_clear_storage_result() {
     return last_clear_storage_result_;
   }
+  base::HistogramTester* histogram_tester() { return histogram_tester_.get(); }
 
  private:
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
@@ -114,11 +114,12 @@
   std::unique_ptr<ClientPolicyController> policy_controller_;
   std::unique_ptr<TestArchiveManager> archive_manager_;
   base::ScopedTempDir temp_dir_;
-  base::SimpleTestClock* clock_;
+  base::SimpleTestClock clock_;
 
   size_t last_cleared_page_count_;
   int total_cleared_times_;
   ClearStorageResult last_clear_storage_result_;
+  std::unique_ptr<base::HistogramTester> histogram_tester_;
 };
 
 ClearStorageTaskTest::ClearStorageTaskTest()
@@ -137,6 +138,8 @@
   ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
   // Setting up policies for testing.
   policy_controller_ = std::make_unique<ClientPolicyController>();
+  clock_.SetNow(base::Time::Now());
+  histogram_tester_ = std::make_unique<base::HistogramTester>();
 }
 
 void ClearStorageTaskTest::TearDown() {
@@ -150,13 +153,12 @@
 
 void ClearStorageTaskTest::Initialize(
     const std::vector<PageSettings>& page_settings,
-    base::SimpleTestClock* clock,
     TestOptions options) {
   generator()->SetFileSize(kTestFileSize);
 
   // Adding pages based on |page_settings|.
   for (const auto& setting : page_settings)
-    AddPages(setting, clock);
+    AddPages(setting);
   archive_manager_.reset(new TestArchiveManager(store_test_util()));
 }
 
@@ -167,20 +169,26 @@
   total_cleared_times_++;
 }
 
-void ClearStorageTaskTest::AddPages(const PageSettings& setting,
-                                    base::SimpleTestClock* clock_ptr) {
+void ClearStorageTaskTest::AddPages(const PageSettings& setting) {
+  // Note: even though the creation time set below is inconsistent with the last
+  // access time set further down, these values are used independently and
+  // this choice allows for easier testing of the TimeSinceCreation metric. This
+  // way we can work directly with the times used to advance the testing clock
+  // during each test.
+  generator()->SetCreationTime(clock()->Now());
   generator()->SetNamespace(setting.name_space);
   generator()->SetArchiveDirectory(temp_dir_path());
+
   for (int i = 0; i < setting.fresh_page_count; ++i) {
-    generator()->SetLastAccessTime(clock_ptr->Now());
+    generator()->SetLastAccessTime(clock_.Now());
     OfflinePageItem page = generator()->CreateItemWithTempFile();
     store_test_util()->InsertItem(page);
   }
   for (int i = 0; i < setting.expired_page_count; ++i) {
     // Make the pages expired.
     generator()->SetLastAccessTime(
-        clock_ptr->Now() - policy_controller_->GetPolicy(setting.name_space)
-                               .lifetime_policy.expiration_period);
+        clock_.Now() - policy_controller_->GetPolicy(setting.name_space)
+                           .lifetime_policy.expiration_period);
     OfflinePageItem page = generator()->CreateItemWithTempFile();
     store_test_util()->InsertItem(page);
   }
@@ -195,15 +203,10 @@
 }
 
 TEST_F(ClearStorageTaskTest, ClearPagesLessThanLimit) {
-  auto clock = std::make_unique<base::SimpleTestClock>();
-  clock->SetNow(base::Time::Now());
-  Initialize({{kBookmarkNamespace, 1, 1}, {kLastNNamespace, 1, 1}},
-             clock.get());
+  Initialize({{kBookmarkNamespace, 1, 1}, {kLastNNamespace, 1, 1}});
 
-  clock->Advance(base::TimeDelta::FromMinutes(5));
-  base::Time start_time = clock->Now();
-
-  RunClearStorageTask(start_time);
+  clock()->Advance(base::TimeDelta::FromMinutes(5));
+  RunClearStorageTask(clock()->Now());
 
   // In total there're 2 expired pages so they'll be cleared successfully.
   // There will be 2 pages remaining in the store, and make sure their files
@@ -213,18 +216,15 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(2LL, store_test_util()->GetPageCount());
   EXPECT_EQ(2UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectUniqueSample(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 5, 2);
 }
 
 TEST_F(ClearStorageTaskTest, ClearPagesMoreFreshPages) {
-  auto clock = std::make_unique<base::SimpleTestClock>();
-  clock->SetNow(base::Time::Now());
-  Initialize({{kBookmarkNamespace, 30, 0}, {kLastNNamespace, 100, 1}},
-             clock.get());
+  Initialize({{kBookmarkNamespace, 30, 0}, {kLastNNamespace, 100, 1}});
 
-  clock->Advance(base::TimeDelta::FromMinutes(5));
-  base::Time start_time = clock->Now();
-
-  RunClearStorageTask(start_time);
+  clock()->Advance(base::TimeDelta::FromMinutes(5));
+  RunClearStorageTask(clock()->Now());
 
   // In total there's 1 expired page so it'll be cleared successfully.
   // There will be (30 + 100) pages remaining in the store, and make sure their
@@ -234,17 +234,15 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(130LL, store_test_util()->GetPageCount());
   EXPECT_EQ(130UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectUniqueSample(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 5, 1);
 }
 
 TEST_F(ClearStorageTaskTest, TryClearPersistentPages) {
-  auto clock = std::make_unique<base::SimpleTestClock>();
-  clock->SetNow(base::Time::Now());
-  Initialize({{kDownloadNamespace, 20, 0}}, clock.get());
+  Initialize({{kDownloadNamespace, 20, 0}});
 
-  clock->Advance(base::TimeDelta::FromDays(367));
-  base::Time start_time = clock->Now();
-
-  RunClearStorageTask(start_time);
+  clock()->Advance(base::TimeDelta::FromDays(367));
+  RunClearStorageTask(clock()->Now());
 
   // There's 20 pages and the clock advances for more than a year.
   // No pages should be deleted since they're all persistent pages.
@@ -253,19 +251,17 @@
   EXPECT_EQ(ClearStorageResult::UNNECESSARY, last_clear_storage_result());
   EXPECT_EQ(20LL, store_test_util()->GetPageCount());
   EXPECT_EQ(20UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectTotalCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 0);
 }
 
 TEST_F(ClearStorageTaskTest, TryClearPersistentPagesWithStoragePressure) {
-  auto clock = std::make_unique<base::SimpleTestClock>();
-  clock->SetNow(base::Time::Now());
   // Sets the free space with 1KB.
-  Initialize({{kDownloadNamespace, 20, 0}}, clock.get());
+  Initialize({{kDownloadNamespace, 20, 0}});
   SetFreeSpace(1024);
 
-  clock->Advance(base::TimeDelta::FromDays(367));
-  base::Time start_time = clock->Now();
-
-  RunClearStorageTask(start_time);
+  clock()->Advance(base::TimeDelta::FromDays(367));
+  RunClearStorageTask(clock()->Now());
 
   // There're 20 pages and the clock advances for more than a year.
   // No pages should be deleted since they're all persistent pages.
@@ -277,15 +273,12 @@
 }
 
 TEST_F(ClearStorageTaskTest, ClearMultipleTimes) {
-  auto clock = std::make_unique<base::SimpleTestClock>();
-  clock->SetNow(base::Time::Now());
   // Initializing with 20 unexpired and 0 expired pages in bookmark namespace,
   // 30 unexpired and 1 expired pages in last_n namespace, and 40 persistent
   // pages in download namespace. Free space on the disk is 200MB.
   Initialize({{kBookmarkNamespace, 20, 0},
               {kLastNNamespace, 30, 1},
-              {kDownloadNamespace, 40, 0}},
-             clock.get());
+              {kDownloadNamespace, 40, 0}});
 
   // Check preconditions, especially that last_n expiration is longer than
   // bookmark's.
@@ -304,8 +297,8 @@
   ASSERT_GT(last_n_policy.expiration_period, bookmark_policy.expiration_period);
 
   // Advance 30 minutes from initial pages creation time.
-  clock->Advance(base::TimeDelta::FromMinutes(30));
-  RunClearStorageTask(clock->Now());
+  clock()->Advance(base::TimeDelta::FromMinutes(30));
+  RunClearStorageTask(clock()->Now());
 
   // There's only 1 expired pages, so it will be cleared. There will be (30 +
   // 20 + 40) pages remaining.
@@ -314,11 +307,13 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(90LL, store_test_util()->GetPageCount());
   EXPECT_EQ(90UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectUniqueSample(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 30, 1);
 
   // Advance the clock by the expiration period of bookmark namespace so that
   // all pages left in that namespace should be expired.
-  clock->Advance(bookmark_policy.expiration_period);
-  RunClearStorageTask(clock->Now());
+  clock()->Advance(bookmark_policy.expiration_period);
+  RunClearStorageTask(clock()->Now());
 
   // All pages in bookmark namespace should be cleared. And only 70 pages
   // remaining after the clearing.
@@ -327,11 +322,16 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(70LL, store_test_util()->GetPageCount());
   EXPECT_EQ(70UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectTotalCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 21);
+  histogram_tester()->ExpectBucketCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation",
+      30 + bookmark_policy.expiration_period.InMinutes(), 20);
 
   // Advance the clock by 1 ms, there's no change in pages so the attempt to
   // clear storage should be unnecessary.
-  clock->Advance(base::TimeDelta::FromMilliseconds(1));
-  RunClearStorageTask(clock->Now());
+  clock()->Advance(base::TimeDelta::FromMilliseconds(1));
+  RunClearStorageTask(clock()->Now());
 
   // The clearing attempt is unnecessary.
   EXPECT_EQ(0UL, last_cleared_page_count());
@@ -339,6 +339,8 @@
   EXPECT_EQ(ClearStorageResult::UNNECESSARY, last_clear_storage_result());
   EXPECT_EQ(70LL, store_test_util()->GetPageCount());
   EXPECT_EQ(70UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectTotalCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 21);
 
   // Adding more fresh pages in last_n namespace to make storage usage exceed
   // limit, so even if only 5 minutes passed from last clearing, this will still
@@ -348,10 +350,10 @@
   // * 0.3 = 100.5MB. In order to bring the storage usage down to (135MB +
   // 200MB) * 0.1 = 33.5MB, (115MB - 33.5MB) needs to be released, which is 163
   // temporary pages to be cleared.
-  AddPages({kLastNNamespace, 200, 0}, clock.get());
+  AddPages({kLastNNamespace, 200, 0});
   SetFreeSpace(200 * (1 << 20));
-  clock->Advance(base::TimeDelta::FromMinutes(5));
-  RunClearStorageTask(clock->Now());
+  clock()->Advance(base::TimeDelta::FromMinutes(5));
+  RunClearStorageTask(clock()->Now());
 
   // There should be 107 pages remaining after the clearing.
   EXPECT_EQ(163UL, last_cleared_page_count());
@@ -359,11 +361,21 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(107LL, store_test_util()->GetPageCount());
   EXPECT_EQ(107UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectTotalCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 184);
+  // The 30 original ones last_n pages are cleared (and they fall into the same
+  // bucket as the 20 from bookmarks)...
+  histogram_tester()->ExpectBucketCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation",
+      30 + bookmark_policy.expiration_period.InMinutes() + 5, 20 + 30);
+  // ... As well as 133 from this latest round.
+  histogram_tester()->ExpectBucketCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 5, 133);
 
   // Advance the clock by 300 days, in order to expire all temporary pages. Only
   // 67 temporary pages are left from the last clearing.
-  clock->Advance(base::TimeDelta::FromDays(300));
-  RunClearStorageTask(clock->Now());
+  clock()->Advance(base::TimeDelta::FromDays(300));
+  RunClearStorageTask(clock()->Now());
 
   // All temporary pages should be cleared by now.
   EXPECT_EQ(67UL, last_cleared_page_count());
@@ -371,6 +383,11 @@
   EXPECT_EQ(ClearStorageResult::SUCCESS, last_clear_storage_result());
   EXPECT_EQ(40LL, store_test_util()->GetPageCount());
   EXPECT_EQ(40UL, test_utils::GetFileCountInDirectory(temp_dir_path()));
+  histogram_tester()->ExpectTotalCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation", 251);
+  histogram_tester()->ExpectBucketCount(
+      "OfflinePages.ClearTemporaryPages.TimeSinceCreation",
+      base::TimeDelta::FromDays(300).InMinutes() + 5, 67);
 }
 
 }  // namespace offline_pages
diff --git a/components/offline_pages/core/model/offline_page_item_generator.cc b/components/offline_pages/core/model/offline_page_item_generator.cc
index d6e14436..b6a936a 100644
--- a/components/offline_pages/core/model/offline_page_item_generator.cc
+++ b/components/offline_pages/core/model/offline_page_item_generator.cc
@@ -28,6 +28,7 @@
   item.url = url_;
   item.original_url = original_url_;
   item.file_size = file_size_;
+  item.creation_time = creation_time_;
   item.last_access_time = last_access_time_;
   item.access_count = access_count_;
   item.digest = digest_;
@@ -73,6 +74,10 @@
   file_size_ = file_size;
 }
 
+void OfflinePageItemGenerator::SetCreationTime(base::Time creation_time) {
+  creation_time_ = creation_time;
+}
+
 void OfflinePageItemGenerator::SetLastAccessTime(base::Time last_access_time) {
   last_access_time_ = last_access_time;
 }
diff --git a/components/offline_pages/core/model/offline_page_item_generator.h b/components/offline_pages/core/model/offline_page_item_generator.h
index 7294348..c9095b3 100644
--- a/components/offline_pages/core/model/offline_page_item_generator.h
+++ b/components/offline_pages/core/model/offline_page_item_generator.h
@@ -31,6 +31,7 @@
   void SetUrl(const GURL& url);
   void SetOriginalUrl(const GURL& url);
   void SetFileSize(int64_t file_size);
+  void SetCreationTime(base::Time time);
   void SetLastAccessTime(base::Time time);
   void SetAccessCount(int access_count);
   void SetArchiveDirectory(const base::FilePath& archive_dir);
@@ -43,6 +44,7 @@
   GURL url_;
   GURL original_url_;
   int64_t file_size_ = 0;
+  base::Time creation_time_;
   base::Time last_access_time_;
   int access_count_ = 0;
   base::FilePath archive_dir_;
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index 8c07677..f4c693d2 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -51,8 +51,8 @@
 // version can still read/write the current database.
 const int kCompatibleVersionNumber = 19;
 
-base::Pickle SerializePossibleUsernamePairs(
-    const autofill::PossibleUsernamesVector& vec) {
+base::Pickle SerializeValueElementPairs(
+    const autofill::ValueElementVector& vec) {
   base::Pickle p;
   for (size_t i = 0; i < vec.size(); ++i) {
     p.WriteString16(vec[i].first);
@@ -61,9 +61,9 @@
   return p;
 }
 
-autofill::PossibleUsernamesVector DeserializePossibleUsernamePairs(
+autofill::ValueElementVector DeserializeValueElementPairs(
     const base::Pickle& p) {
-  autofill::PossibleUsernamesVector ret;
+  autofill::ValueElementVector ret;
   base::string16 value;
   base::string16 field_name;
 
@@ -71,7 +71,7 @@
   while (iterator.ReadString16(&value)) {
     bool name_success = iterator.ReadString16(&field_name);
     DCHECK(name_success);
-    ret.push_back(autofill::PossibleUsernamePair(value, field_name));
+    ret.push_back(autofill::ValueElementPair(value, field_name));
   }
   return ret;
 }
@@ -156,7 +156,7 @@
   s->BindInt(COLUMN_SKIP_ZERO_CLICK, form.skip_zero_click);
   s->BindInt(COLUMN_GENERATION_UPLOAD_STATUS, form.generation_upload_status);
   base::Pickle usernames_pickle =
-      SerializePossibleUsernamePairs(form.other_possible_usernames);
+      SerializeValueElementPairs(form.other_possible_usernames);
   s->BindBlob(COLUMN_POSSIBLE_USERNAME_PAIRS, usernames_pickle.data(),
               usernames_pickle.size());
 }
@@ -879,7 +879,7 @@
   s.BindInt(next_param++, form.skip_zero_click);
   s.BindInt(next_param++, form.generation_upload_status);
   base::Pickle username_pickle =
-      SerializePossibleUsernamePairs(form.other_possible_usernames);
+      SerializeValueElementPairs(form.other_possible_usernames);
   s.BindBlob(next_param++, username_pickle.data(), username_pickle.size());
   // NOTE: Add new fields here unless the field is a part of the unique key.
   // If so, add new field below.
@@ -1019,7 +1019,7 @@
     base::Pickle pickle(
         static_cast<const char*>(s.ColumnBlob(COLUMN_POSSIBLE_USERNAME_PAIRS)),
         s.ColumnByteLength(COLUMN_POSSIBLE_USERNAME_PAIRS));
-    form->other_possible_usernames = DeserializePossibleUsernamePairs(pickle);
+    form->other_possible_usernames = DeserializeValueElementPairs(pickle);
   }
   form->times_used = s.ColumnInt(COLUMN_TIMES_USED);
   if (s.ColumnByteLength(COLUMN_FORM_DATA)) {
diff --git a/components/password_manager/core/browser/login_database_unittest.cc b/components/password_manager/core/browser/login_database_unittest.cc
index 93d08fe..e1c4d5b 100644
--- a/components/password_manager/core/browser/login_database_unittest.cc
+++ b/components/password_manager/core/browser/login_database_unittest.cc
@@ -31,8 +31,8 @@
 #include "url/origin.h"
 
 using autofill::PasswordForm;
-using autofill::PossibleUsernamePair;
-using autofill::PossibleUsernamesVector;
+using autofill::ValueElementPair;
+using autofill::ValueElementVector;
 using base::ASCIIToUTF16;
 using ::testing::Eq;
 using ::testing::Pointee;
@@ -134,9 +134,8 @@
 }  // namespace
 
 // Serialization routines for vectors implemented in login_database.cc.
-base::Pickle SerializePossibleUsernamePairs(const PossibleUsernamesVector& vec);
-PossibleUsernamesVector DeserializePossibleUsernamePairs(
-    const base::Pickle& pickle);
+base::Pickle SerializeValueElementPairs(const ValueElementVector& vec);
+ValueElementVector DeserializeValueElementPairs(const base::Pickle& pickle);
 
 class LoginDatabaseTest : public testing::Test {
  protected:
@@ -1168,21 +1167,18 @@
 
 TEST_F(LoginDatabaseTest, VectorSerialization) {
   // Empty vector.
-  PossibleUsernamesVector vec;
-  base::Pickle temp = SerializePossibleUsernamePairs(vec);
-  PossibleUsernamesVector output = DeserializePossibleUsernamePairs(temp);
+  ValueElementVector vec;
+  base::Pickle temp = SerializeValueElementPairs(vec);
+  ValueElementVector output = DeserializeValueElementPairs(temp);
   EXPECT_THAT(output, Eq(vec));
 
   // Normal data.
-  vec.push_back(
-      PossibleUsernamePair(ASCIIToUTF16("first"), ASCIIToUTF16("id1")));
-  vec.push_back(
-      PossibleUsernamePair(ASCIIToUTF16("second"), ASCIIToUTF16("id2")));
-  vec.push_back(
-      PossibleUsernamePair(ASCIIToUTF16("third"), ASCIIToUTF16("id3")));
+  vec.push_back({ASCIIToUTF16("first"), ASCIIToUTF16("id1")});
+  vec.push_back({ASCIIToUTF16("second"), ASCIIToUTF16("id2")});
+  vec.push_back({ASCIIToUTF16("third"), ASCIIToUTF16("id3")});
 
-  temp = SerializePossibleUsernamePairs(vec);
-  output = DeserializePossibleUsernamePairs(temp);
+  temp = SerializeValueElementPairs(vec);
+  output = DeserializeValueElementPairs(temp);
   EXPECT_THAT(output, Eq(vec));
 }
 
@@ -1357,7 +1353,7 @@
   form.action = GURL("http://accounts.google.com/login");
   form.password_value = ASCIIToUTF16("my_new_password");
   form.preferred = false;
-  form.other_possible_usernames.push_back(autofill::PossibleUsernamePair(
+  form.other_possible_usernames.push_back(autofill::ValueElementPair(
       ASCIIToUTF16("my_new_username"), ASCIIToUTF16("new_username_id")));
   form.times_used = 20;
   form.submit_element = ASCIIToUTF16("submit_element");
@@ -1734,7 +1730,7 @@
 
   void TearDown() override { OSCryptMocker::TearDown(); }
 
-  // Creates the databse from |sql_file|.
+  // Creates the database from |sql_file|.
   void CreateDatabase(base::StringPiece sql_file) {
     base::FilePath database_dump;
     ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &database_dump));
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index f5f2b16..17194ee7 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -40,7 +40,7 @@
 
 using autofill::FormStructure;
 using autofill::PasswordForm;
-using autofill::PossibleUsernamePair;
+using autofill::ValueElementPair;
 using base::Time;
 
 // Shorten the name to spare line breaks. The code provides enough context
@@ -110,7 +110,7 @@
 
   // Filter out |form->username_value| and sensitive information.
   const base::string16& username_value = form->username_value;
-  base::EraseIf(usernames, [&username_value](const PossibleUsernamePair& pair) {
+  base::EraseIf(usernames, [&username_value](const ValueElementPair& pair) {
     return pair.first == username_value ||
            autofill::IsValidCreditCardNumber(pair.first) ||
            autofill::IsSSN(pair.first);
@@ -488,9 +488,8 @@
   // |username_value| and |username_element| of the submitted form. When the
   // user has to override the username, Chrome will send a username vote.
   if (!submitted_form_->username_value.empty()) {
-    credential.other_possible_usernames.push_back(
-        autofill::PossibleUsernamePair(submitted_form_->username_value,
-                                       submitted_form_->username_element));
+    credential.other_possible_usernames.push_back(autofill::ValueElementPair(
+        submitted_form_->username_value, submitted_form_->username_element));
   }
 
   ProvisionallySave(credential, IGNORE_OTHER_POSSIBLE_USERNAMES);
@@ -781,7 +780,7 @@
     const base::string16& username) {
   DCHECK(!username_correction_vote_);
 
-  for (const PossibleUsernamePair& pair : match.other_possible_usernames) {
+  for (const ValueElementPair& pair : match.other_possible_usernames) {
     if (pair.first == username) {
       username_correction_vote_.reset(new autofill::PasswordForm(match));
       username_correction_vote_->username_element = pair.second;
@@ -1158,6 +1157,8 @@
   pending_credentials_.preferred = submitted_form_->preferred;
   pending_credentials_.form_has_autofilled_value =
       submitted_form_->form_has_autofilled_value;
+  pending_credentials_.all_possible_passwords =
+      submitted_form_->all_possible_passwords;
   CopyFieldPropertiesMasks(*submitted_form_, &pending_credentials_);
 
   // If we're dealing with an API-driven provisionally saved form, then take
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc
index eb29199..32feed22 100644
--- a/components/password_manager/core/browser/password_form_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
@@ -54,7 +54,7 @@
 using autofill::FieldPropertiesFlags;
 using autofill::FieldPropertiesMask;
 using autofill::PasswordForm;
-using autofill::PossibleUsernamePair;
+using autofill::ValueElementPair;
 using base::ASCIIToUTF16;
 using ::testing::_;
 using ::testing::Contains;
@@ -406,7 +406,7 @@
     saved_match_.preferred = true;
     saved_match_.username_value = ASCIIToUTF16("test@gmail.com");
     saved_match_.password_value = ASCIIToUTF16("test1");
-    saved_match_.other_possible_usernames.push_back(PossibleUsernamePair(
+    saved_match_.other_possible_usernames.push_back(ValueElementPair(
         ASCIIToUTF16("test2@gmail.com"), ASCIIToUTF16("full_name")));
 
     autofill::FormFieldData field;
@@ -1327,8 +1327,8 @@
 
   PasswordForm saved_form = *saved_match();
   saved_form.other_possible_usernames.push_back(
-      PossibleUsernamePair(ASCIIToUTF16("other_possible@gmail.com"),
-                           ASCIIToUTF16("other_username")));
+      ValueElementPair(ASCIIToUTF16("other_possible@gmail.com"),
+                       ASCIIToUTF16("other_username")));
 
   fake_form_fetcher()->SetNonFederated({&saved_form}, 0u);
 
@@ -1363,7 +1363,7 @@
 TEST_F(PasswordFormManagerTest, TestAlternateUsername_OtherUsername) {
   EXPECT_CALL(*client()->mock_driver(), AllowPasswordGenerationForForm(_));
 
-  const PossibleUsernamePair kOtherUsername(
+  const ValueElementPair kOtherUsername(
       ASCIIToUTF16("other_possible@gmail.com"), ASCIIToUTF16("other_username"));
   PasswordForm saved_form = *saved_match();
   saved_form.other_possible_usernames.push_back(kOtherUsername);
@@ -1493,16 +1493,16 @@
 }
 
 TEST_F(PasswordFormManagerTest, TestSanitizePossibleUsernames) {
-  const PossibleUsernamePair kUsernameOther(ASCIIToUTF16("other username"),
-                                            ASCIIToUTF16("other_username_id"));
+  const ValueElementPair kUsernameOther(ASCIIToUTF16("other username"),
+                                        ASCIIToUTF16("other_username_id"));
 
   fake_form_fetcher()->SetNonFederated(std::vector<const PasswordForm*>(), 0u);
 
   PasswordForm credentials(*observed_form());
   credentials.other_possible_usernames.push_back(
-      PossibleUsernamePair(ASCIIToUTF16("543-43-1234"), ASCIIToUTF16("id1")));
-  credentials.other_possible_usernames.push_back(PossibleUsernamePair(
-      ASCIIToUTF16("378282246310005"), ASCIIToUTF16("id2")));
+      ValueElementPair(ASCIIToUTF16("543-43-1234"), ASCIIToUTF16("id1")));
+  credentials.other_possible_usernames.push_back(
+      ValueElementPair(ASCIIToUTF16("378282246310005"), ASCIIToUTF16("id2")));
   credentials.other_possible_usernames.push_back(kUsernameOther);
   credentials.username_value = ASCIIToUTF16("test@gmail.com");
   credentials.preferred = true;
@@ -1523,14 +1523,14 @@
 }
 
 TEST_F(PasswordFormManagerTest, TestSanitizePossibleUsernamesDuplicates) {
-  const PossibleUsernamePair kUsernameSsn(ASCIIToUTF16("511-32-9830"),
-                                          ASCIIToUTF16("ssn_id"));
-  const PossibleUsernamePair kUsernameEmail(ASCIIToUTF16("test@gmail.com"),
-                                            ASCIIToUTF16("email_id"));
-  const PossibleUsernamePair kUsernameDuplicate(ASCIIToUTF16("duplicate"),
-                                                ASCIIToUTF16("duplicate_id"));
-  const PossibleUsernamePair kUsernameRandom(ASCIIToUTF16("random"),
-                                             ASCIIToUTF16("random_id"));
+  const ValueElementPair kUsernameSsn(ASCIIToUTF16("511-32-9830"),
+                                      ASCIIToUTF16("ssn_id"));
+  const ValueElementPair kUsernameEmail(ASCIIToUTF16("test@gmail.com"),
+                                        ASCIIToUTF16("email_id"));
+  const ValueElementPair kUsernameDuplicate(ASCIIToUTF16("duplicate"),
+                                            ASCIIToUTF16("duplicate_id"));
+  const ValueElementPair kUsernameRandom(ASCIIToUTF16("random"),
+                                         ASCIIToUTF16("random_id"));
 
   fake_form_fetcher()->SetNonFederated(std::vector<const PasswordForm*>(), 0u);
 
@@ -1562,17 +1562,20 @@
 TEST_F(PasswordFormManagerTest, TestAllPossiblePasswords) {
   fake_form_fetcher()->SetNonFederated(std::vector<const PasswordForm*>(), 0u);
 
+  ValueElementPair pair1 = {ASCIIToUTF16("pass1"), ASCIIToUTF16("el1")};
+  ValueElementPair pair2 = {ASCIIToUTF16("pass2"), ASCIIToUTF16("el2")};
+  ValueElementPair pair3 = {ASCIIToUTF16("pass3"), ASCIIToUTF16("el3")};
+
   PasswordForm credentials(*observed_form());
-  credentials.all_possible_passwords.push_back(ASCIIToUTF16("pass1"));
-  credentials.all_possible_passwords.push_back(ASCIIToUTF16("pass2"));
-  credentials.all_possible_passwords.push_back(ASCIIToUTF16("pass3"));
+  credentials.all_possible_passwords.push_back(pair1);
+  credentials.all_possible_passwords.push_back(pair2);
+  credentials.all_possible_passwords.push_back(pair3);
 
   form_manager()->ProvisionallySave(
       credentials, PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
 
   EXPECT_THAT(form_manager()->pending_credentials().all_possible_passwords,
-              UnorderedElementsAre(ASCIIToUTF16("pass1"), ASCIIToUTF16("pass2"),
-                                   ASCIIToUTF16("pass3")));
+              UnorderedElementsAre(pair1, pair2, pair3));
 }
 
 // Test that if metadata stored with a form in PasswordStore are incomplete,
@@ -2364,8 +2367,8 @@
                                     : ASCIIToUTF16("typed_username");
     credential.password_value = ASCIIToUTF16("password");
     credential.other_possible_usernames.push_back(
-        PossibleUsernamePair(ASCIIToUTF16("edited_username"),
-                             ASCIIToUTF16("correct_username_element")));
+        ValueElementPair(ASCIIToUTF16("edited_username"),
+                         ASCIIToUTF16("correct_username_element")));
     form_manager.ProvisionallySave(
         credential, PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
 
@@ -2410,8 +2413,8 @@
     } else {
       EXPECT_THAT(
           saved_result.other_possible_usernames,
-          ElementsAre(PossibleUsernamePair(ASCIIToUTF16("typed_username"),
-                                           observed_form()->username_element)));
+          ElementsAre(ValueElementPair(ASCIIToUTF16("typed_username"),
+                                       observed_form()->username_element)));
     }
   }
 }
@@ -2522,7 +2525,7 @@
     if (!captured_username_is_empty) {
       // A non-empty captured username value should be saved to recover later if
       // a user makes a mistake in username editing.
-      expected_pending.other_possible_usernames.push_back(PossibleUsernamePair(
+      expected_pending.other_possible_usernames.push_back(ValueElementPair(
           ASCIIToUTF16("captured_username"), ASCIIToUTF16("Email")));
     }
 
@@ -2560,7 +2563,7 @@
   credential.username_value = ASCIIToUTF16("pin_code");
   credential.password_value = ASCIIToUTF16("password");
   credential.other_possible_usernames.push_back(
-      PossibleUsernamePair(base::string16(), ASCIIToUTF16("empty_field")));
+      ValueElementPair(base::string16(), ASCIIToUTF16("empty_field")));
   form_manager.ProvisionallySave(
       credential, PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
 
@@ -2584,10 +2587,9 @@
   EXPECT_TRUE(saved_result.username_value.empty());
   EXPECT_TRUE(saved_result.username_element.empty());
   EXPECT_EQ(ASCIIToUTF16("password"), saved_result.password_value);
-  EXPECT_THAT(
-      saved_result.other_possible_usernames,
-      ElementsAre(PossibleUsernamePair(ASCIIToUTF16("pin_code"),
-                                       observed_form()->username_element)));
+  EXPECT_THAT(saved_result.other_possible_usernames,
+              ElementsAre(ValueElementPair(ASCIIToUTF16("pin_code"),
+                                           observed_form()->username_element)));
 }
 
 // Test that when user updates username to a PSL matching credential, we should
@@ -3671,7 +3673,7 @@
     }
 
     saved_match()->other_possible_usernames.push_back(
-        PossibleUsernamePair(base::string16(), ASCIIToUTF16("empty_field")));
+        ValueElementPair(base::string16(), ASCIIToUTF16("empty_field")));
     fake_form_fetcher()->SetNonFederated({saved_match()}, 0u);
 
     // A user enters the password in the form. The username is absent or not
diff --git a/components/safe_browsing/browser/safe_browsing_url_request_context_getter.cc b/components/safe_browsing/browser/safe_browsing_url_request_context_getter.cc
index 76eae1b..e4622eeb 100644
--- a/components/safe_browsing/browser/safe_browsing_url_request_context_getter.cc
+++ b/components/safe_browsing/browser/safe_browsing_url_request_context_getter.cc
@@ -63,8 +63,7 @@
                                              nullptr);
     cookie_config.channel_id_service = channel_id_service_.get();
     cookie_config.background_task_runner = background_task_runner;
-    safe_browsing_cookie_store_ =
-        content::CreateCookieStore(cookie_config, nullptr);
+    safe_browsing_cookie_store_ = content::CreateCookieStore(cookie_config);
     safe_browsing_request_context_->set_cookie_store(
         safe_browsing_cookie_store_.get());
 
diff --git a/components/sync/base/data_type_histogram.h b/components/sync/base/data_type_histogram.h
index 6eda77f..4d13644 100644
--- a/components/sync/base/data_type_histogram.h
+++ b/components/sync/base/data_type_histogram.h
@@ -20,12 +20,6 @@
                                  syncer::ModelType model_type,
                                  size_t value);
 
-// For now, this just implements UMA_HISTOGRAM_LONG_TIMES. This can be adjusted
-// if we feel the min, max, or bucket count amount are not appropriate.
-#define SYNC_FREQ_HISTOGRAM(name, time)                                        \
-  UMA_HISTOGRAM_CUSTOM_TIMES(name, time, base::TimeDelta::FromMilliseconds(1), \
-                             base::TimeDelta::FromHours(1), 50)
-
 // Helper macro for datatype specific histograms. For each datatype, invokes
 // a pre-defined PER_DATA_TYPE_MACRO(type_str), where |type_str| is the string
 // version of the datatype.
diff --git a/components/sync/base/data_type_histogram_unittest.cc b/components/sync/base/data_type_histogram_unittest.cc
index fc0d4ba..764738d 100644
--- a/components/sync/base/data_type_histogram_unittest.cc
+++ b/components/sync/base/data_type_histogram_unittest.cc
@@ -23,19 +23,6 @@
   }
 }
 
-// Create a histogram of type SYNC_FREQ_HISTOGRAM for each model type. Nothing
-// should break.
-TEST(DataTypeHistogramTest, BasicFreq) {
-  for (int i = FIRST_REAL_MODEL_TYPE; i <= LAST_REAL_MODEL_TYPE; ++i) {
-    ModelType type = ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str)                      \
-  SYNC_FREQ_HISTOGRAM("BasicFreqPrefix" type_str "Suffix", \
-                      base::TimeDelta::FromSeconds(1));
-    SYNC_DATA_TYPE_HISTOGRAM(type);
-#undef PER_DATA_TYPE_MACRO
-  }
-}
-
 // Create a histogram of type UMA_HISTOGRAM_ENUMERATION for each model type.
 // Nothing should break.
 TEST(DataTypeHistogramTest, BasicEnum) {
diff --git a/components/sync/engine_impl/sync_scheduler_impl.cc b/components/sync/engine_impl/sync_scheduler_impl.cc
index 5a04035..935fc8ac 100644
--- a/components/sync/engine_impl/sync_scheduler_impl.cc
+++ b/components/sync/engine_impl/sync_scheduler_impl.cc
@@ -16,7 +16,6 @@
 #include "base/single_thread_task_runner.h"
 #include "base/threading/platform_thread.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "components/sync/base/data_type_histogram.h"
 #include "components/sync/base/logging.h"
 #include "components/sync/engine_impl/backoff_delay_provider.h"
 #include "components/sync/protocol/proto_enum_conversions.h"
@@ -339,7 +338,6 @@
 
   SDVLOG_LOC(nudge_location, 2) << "Scheduling sync because of local change to "
                                 << ModelTypeSetToString(types);
-  UpdateNudgeTimeRecords(types);
   TimeDelta nudge_delay = nudge_tracker_.RecordLocalChange(types);
   ScheduleNudgeImpl(nudge_delay, nudge_location);
 }
@@ -555,24 +553,6 @@
   }
 }
 
-void SyncSchedulerImpl::UpdateNudgeTimeRecords(ModelTypeSet types) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-
-  TimeTicks now = TimeTicks::Now();
-  // Update timing information for how often datatypes are triggering nudges.
-  for (ModelTypeSet::Iterator iter = types.First(); iter.Good(); iter.Inc()) {
-    TimeTicks previous = last_local_nudges_by_model_type_[iter.Get()];
-    last_local_nudges_by_model_type_[iter.Get()] = now;
-    if (previous.is_null())
-      continue;
-
-#define PER_DATA_TYPE_MACRO(type_str) \
-  SYNC_FREQ_HISTOGRAM("Sync.Freq" type_str, now - previous);
-    SYNC_DATA_TYPE_HISTOGRAM(iter.Get());
-#undef PER_DATA_TYPE_MACRO
-  }
-}
-
 TimeDelta SyncSchedulerImpl::GetPollInterval() {
   return (!cycle_context_->notifications_enabled() ||
           !cycle_context_->ShouldFetchUpdatesBeforeCommit())
diff --git a/components/sync/engine_impl/sync_scheduler_impl.h b/components/sync/engine_impl/sync_scheduler_impl.h
index 3044df6c..be5907ef 100644
--- a/components/sync/engine_impl/sync_scheduler_impl.h
+++ b/components/sync/engine_impl/sync_scheduler_impl.h
@@ -217,12 +217,6 @@
   // up and does not need to perform an initial sync.
   void SendInitialSnapshot();
 
-  // This is used for histogramming and analysis of ScheduleNudge* APIs.
-  // SyncScheduler is the ultimate choke-point for all such invocations (with
-  // and without InvalidationState variants, all NudgeSources, etc) and as such
-  // is the most flexible place to do this bookkeeping.
-  void UpdateNudgeTimeRecords(ModelTypeSet types);
-
   bool IsEarlierThanCurrentPendingJob(const base::TimeDelta& delay);
 
   // Used for logging.
@@ -270,11 +264,6 @@
 
   SyncCycleContext* cycle_context_;
 
-  // A map tracking LOCAL NudgeSource invocations of ScheduleNudge* APIs,
-  // organized by datatype. Each datatype that was part of the types requested
-  // in the call will have its TimeTicks value updated.
-  std::map<ModelType, base::TimeTicks> last_local_nudges_by_model_type_;
-
   // The last time we ran a sync cycle. Null if we haven't ran one since Chrome
   // startup. Used for metrics.
   base::TimeTicks last_sync_cycle_start_;
diff --git a/components/sync_sessions/BUILD.gn b/components/sync_sessions/BUILD.gn
index 8f4ba32..ace2ae97 100644
--- a/components/sync_sessions/BUILD.gn
+++ b/components/sync_sessions/BUILD.gn
@@ -6,6 +6,8 @@
   sources = [
     "favicon_cache.cc",
     "favicon_cache.h",
+    "local_session_event_handler_impl.cc",
+    "local_session_event_handler_impl.h",
     "local_session_event_router.h",
     "lost_navigations_recorder.cc",
     "lost_navigations_recorder.h",
@@ -61,11 +63,14 @@
     "mock_sync_sessions_client.h",
     "session_sync_test_helper.cc",
     "session_sync_test_helper.h",
+    "test_synced_window_delegates_getter.cc",
+    "test_synced_window_delegates_getter.h",
   ]
 
   public_deps = [
     ":sync_sessions",
     "//base",
+    "//components/sessions:test_support",
     "//components/sync",
     "//testing/gmock",
     "//testing/gtest",
@@ -79,6 +84,7 @@
   testonly = true
   sources = [
     "favicon_cache_unittest.cc",
+    "local_session_event_handler_impl_unittest.cc",
     "lost_navigations_recorder_unittest.cc",
     "open_tabs_ui_delegate_impl_unittest.cc",
     "session_data_type_controller_unittest.cc",
diff --git a/components/sync_sessions/local_session_event_handler_impl.cc b/components/sync_sessions/local_session_event_handler_impl.cc
new file mode 100644
index 0000000..01e5e84
--- /dev/null
+++ b/components/sync_sessions/local_session_event_handler_impl.cc
@@ -0,0 +1,600 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_sessions/local_session_event_handler_impl.h"
+
+#include <algorithm>
+#include <map>
+#include <utility>
+#include <vector>
+
+#include "base/metrics/histogram_macros.h"
+#include "base/strings/stringprintf.h"
+#include "components/sync/model/sync_change.h"
+#include "components/sync/protocol/sync.pb.h"
+#include "components/sync_sessions/sessions_global_id_mapper.h"
+#include "components/sync_sessions/sync_sessions_client.h"
+#include "components/sync_sessions/synced_session_tracker.h"
+#include "components/sync_sessions/synced_tab_delegate.h"
+#include "components/sync_sessions/synced_window_delegate.h"
+#include "components/sync_sessions/synced_window_delegates_getter.h"
+
+namespace sync_sessions {
+namespace {
+
+using sessions::SerializedNavigationEntry;
+
+// The maximum number of navigations in each direction we care to sync.
+const int kMaxSyncNavigationCount = 6;
+
+// Ensure that the tab id is not invalid.
+bool ShouldSyncTabId(SessionID::id_type tab_id) {
+  if (tab_id == kInvalidTabID) {
+    return false;
+  }
+  return true;
+}
+
+bool IsWindowSyncable(const SyncedWindowDelegate& window_delegate) {
+  return window_delegate.ShouldSync() && window_delegate.GetTabCount() &&
+         window_delegate.HasWindow();
+}
+
+sync_pb::SessionSpecifics SessionTabToSpecifics(
+    const sessions::SessionTab& session_tab,
+    const std::string& local_tag,
+    int tab_node_id) {
+  sync_pb::SessionSpecifics specifics;
+  session_tab.ToSyncData().Swap(specifics.mutable_tab());
+  specifics.set_session_tag(local_tag);
+  specifics.set_tab_node_id(tab_node_id);
+  return specifics;
+}
+
+// Each sync id should only ever be used once. Previously there existed a race
+// condition which could cause them to be duplicated, see
+// https://crbug.com/639009 for more information. This counts the number of
+// times each id is used so that the second window/tab loop can act on every
+// tab using duplicate ids. Lastly, it is important to note that this
+// duplication scan is only checking the in-memory tab state. On Android, if
+// we have no tabbed window, we may also have sync data with conflicting sync
+// ids, but to keep this logic simple and less error prone, we do not attempt
+// to do anything clever.
+std::map<int, size_t> DetectDuplicateSyncIds(
+    const SyncedWindowDelegatesGetter::SyncedWindowDelegateMap& windows) {
+  std::map<int, size_t> sync_id_count;
+  int duplicate_count = 0;
+  for (auto& window_iter_pair : windows) {
+    const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
+    if (IsWindowSyncable(*window_delegate)) {
+      for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
+        SyncedTabDelegate* synced_tab = window_delegate->GetTabAt(j);
+        if (synced_tab &&
+            synced_tab->GetSyncId() != TabNodePool::kInvalidTabNodeID) {
+          auto iter = sync_id_count.find(synced_tab->GetSyncId());
+          if (iter == sync_id_count.end()) {
+            sync_id_count.insert(iter,
+                                 std::make_pair(synced_tab->GetSyncId(), 1));
+          } else {
+            // If an id is used more than twice, this count will be a bit odd,
+            // but for our purposes, it will be sufficient.
+            duplicate_count++;
+            iter->second++;
+          }
+        }
+      }
+    }
+  }
+
+  if (duplicate_count > 0) {
+    UMA_HISTOGRAM_COUNTS_100("Sync.SesssionsDuplicateSyncId", duplicate_count);
+  }
+
+  return sync_id_count;
+}
+
+}  // namespace
+
+LocalSessionEventHandlerImpl::WriteBatch::WriteBatch() = default;
+
+LocalSessionEventHandlerImpl::WriteBatch::~WriteBatch() = default;
+
+LocalSessionEventHandlerImpl::Delegate::~Delegate() = default;
+
+LocalSessionEventHandlerImpl::LocalSessionEventHandlerImpl(
+    Delegate* delegate,
+    SyncSessionsClient* sessions_client,
+    SyncedSessionTracker* session_tracker)
+    : delegate_(delegate),
+      sessions_client_(sessions_client),
+      session_tracker_(session_tracker) {
+  DCHECK(delegate);
+  DCHECK(sessions_client);
+  DCHECK(session_tracker);
+}
+
+LocalSessionEventHandlerImpl::~LocalSessionEventHandlerImpl() {}
+
+void LocalSessionEventHandlerImpl::AssociateWindowsAndTabs(
+    const std::string& session_tag,
+    const std::string& session_name,
+    sync_pb::SyncEnums::DeviceType device_type,
+    WriteBatch* change_output) {
+  SyncedSession* current_session = session_tracker_->GetSession(session_tag);
+  current_session->session_name = session_name;
+  current_session->device_type = device_type;
+  current_session->session_tag = session_tag;
+
+  current_session_tag_ = session_tag;
+
+  AssociateWindows(RELOAD_TABS, ScanForTabbedWindow(), change_output);
+}
+
+SessionsGlobalIdMapper* LocalSessionEventHandlerImpl::GetGlobalIdMapper() {
+  return &global_id_mapper_;
+}
+
+void LocalSessionEventHandlerImpl::SetSessionTabFromDelegateForTest(
+    const SyncedTabDelegate& tab_delegate,
+    base::Time mtime,
+    sessions::SessionTab* session_tab) {
+  SetSessionTabFromDelegate(tab_delegate, mtime, session_tab);
+}
+
+void LocalSessionEventHandlerImpl::AssociateWindows(ReloadTabsOption option,
+                                                    bool has_tabbed_window,
+                                                    WriteBatch* change_output) {
+  // Note that |current_session| is a pointer owned by |session_tracker_|.
+  // |session_tracker_| will continue to update |current_session| under
+  // the hood so care must be taken accessing it. In particular, invoking
+  // ResetSessionTracking(..) will invalidate all the tab data within
+  // the session, hence why copies of the SyncedSession must be made ahead of
+  // time.
+  SyncedSession* current_session =
+      session_tracker_->GetSession(current_session_tag_);
+
+  SyncedWindowDelegatesGetter::SyncedWindowDelegateMap windows =
+      sessions_client_->GetSyncedWindowDelegatesGetter()
+          ->GetSyncedWindowDelegates();
+
+  // Without native data, we need be careful not to obliterate any old
+  // information, while at the same time handling updated tab ids. See
+  // https://crbug.com/639009 for more info.
+  if (has_tabbed_window) {
+    // Just reset the session tracking. No need to worry about the previous
+    // session; the current tabbed windows are now the source of truth.
+    session_tracker_->ResetSessionTracking(current_session_tag_);
+    current_session->modified_time = base::Time::Now();
+  } else {
+    DVLOG(1) << "Found no tabbed windows. Reloading "
+             << current_session->windows.size()
+             << " windows from previous session.";
+
+    // A copy of the specifics must be made because |current_session| will be
+    // updated in place and therefore can't be relied on as the source of truth.
+    sync_pb::SessionSpecifics specifics;
+    specifics.set_session_tag(current_session_tag_);
+    current_session->ToSessionHeaderProto().Swap(specifics.mutable_header());
+    UpdateTrackerWithSpecifics(specifics, base::Time::Now(), session_tracker_);
+
+    // The tab entities stored in sync have outdated SessionId values. Go
+    // through and update them to the new SessionIds.
+    for (auto& win_iter : current_session->windows) {
+      for (auto& tab : win_iter.second->wrapped_window.tabs) {
+        int sync_id = TabNodePool::kInvalidTabNodeID;
+        if (!session_tracker_->GetTabNodeFromLocalTabId(tab->tab_id.id(),
+                                                        &sync_id) ||
+            sync_id == TabNodePool::kInvalidTabNodeID) {
+          continue;
+        }
+        DVLOG(1) << "Rewriting tab node " << sync_id << " with tab id "
+                 << tab->tab_id.id();
+        AppendChangeForExistingTab(sync_id, *tab, change_output);
+      }
+    }
+  }
+
+  const std::map<int, size_t> sync_id_count = DetectDuplicateSyncIds(windows);
+  for (auto& window_iter_pair : windows) {
+    const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
+    if (option == RELOAD_TABS) {
+      UMA_HISTOGRAM_COUNTS("Sync.SessionTabs", window_delegate->GetTabCount());
+    }
+
+    // Make sure the window has tabs and a viewable window. The viewable
+    // window check is necessary because, for example, when a browser is
+    // closed the destructor is not necessarily run immediately. This means
+    // its possible for us to get a handle to a browser that is about to be
+    // removed. If the tab count is 0 or the window is null, the browser is
+    // about to be deleted, so we ignore it.
+    if (!IsWindowSyncable(*window_delegate)) {
+      continue;
+    }
+
+    SessionID::id_type window_id = window_delegate->GetSessionId();
+    DVLOG(1) << "Associating window " << window_id << " with "
+             << window_delegate->GetTabCount() << " tabs.";
+
+    bool found_tabs = false;
+    for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
+      SessionID::id_type tab_id = window_delegate->GetTabIdAt(j);
+      SyncedTabDelegate* synced_tab = window_delegate->GetTabAt(j);
+
+      // GetTabAt can return a null tab; in that case just skip it. Similarly,
+      // if for some reason the tab id is invalid, skip it.
+      if (!synced_tab || !ShouldSyncTabId(tab_id)) {
+        continue;
+      }
+
+      if (synced_tab->GetSyncId() != TabNodePool::kInvalidTabNodeID) {
+        auto duplicate_iter = sync_id_count.find(synced_tab->GetSyncId());
+        DCHECK(duplicate_iter != sync_id_count.end());
+        if (duplicate_iter->second > 1) {
+          // Strip the id before processing it. This is going to mean it'll be
+          // treated the same as a new tab. If it's also a placeholder, we'll
+          // have no data about it, sync it cannot be synced until it is
+          // loaded. It is too difficult to try to guess which of the multiple
+          // tabs using the same id actually corresponds to the existing sync
+          // data.
+          synced_tab->SetSyncId(TabNodePool::kInvalidTabNodeID);
+        }
+      }
+
+      // Placeholder tabs are those without WebContents, either because they
+      // were never loaded into memory or they were evicted from memory
+      // (typically only on Android devices). They only have a tab id,
+      // window id, and a saved synced id (corresponding to the tab node
+      // id). Note that only placeholders have this sync id, as it's
+      // necessary to properly reassociate the tab with the entity that was
+      // backing it.
+      if (synced_tab->IsPlaceholderTab()) {
+        // For tabs without WebContents update the |tab_id| and |window_id|,
+        // as it could have changed after a session restore.
+        if (synced_tab->GetSyncId() > TabNodePool::kInvalidTabNodeID) {
+          AssociateRestoredPlaceholderTab(*synced_tab, tab_id, window_id,
+                                          change_output);
+        } else {
+          DVLOG(1) << "Placeholder tab " << tab_id << " has no sync id.";
+        }
+      } else if (RELOAD_TABS == option) {
+        AssociateTab(synced_tab, has_tabbed_window, change_output);
+      }
+
+      // If the tab was syncable, it would have been added to the tracker
+      // either by the above Associate[RestoredPlaceholder]Tab call or by
+      // the OnLocalTabModified method invoking AssociateTab directly.
+      // Therefore, we can key whether this window has valid tabs based on
+      // the tab's presence in the tracker.
+      const sessions::SessionTab* tab = nullptr;
+      if (session_tracker_->LookupSessionTab(current_session_tag_, tab_id,
+                                             &tab)) {
+        found_tabs = true;
+
+        // Update this window's representation in the synced session tracker.
+        // This is a no-op if called multiple times.
+        session_tracker_->PutWindowInSession(current_session_tag_, window_id);
+
+        // Put the tab in the window (must happen after the window is added
+        // to the session).
+        session_tracker_->PutTabInWindow(current_session_tag_, window_id,
+                                         tab_id);
+      }
+    }
+    if (found_tabs) {
+      SyncedSessionWindow* synced_session_window =
+          current_session->windows[window_id].get();
+      if (window_delegate->IsTypeTabbed()) {
+        synced_session_window->window_type =
+            sync_pb::SessionWindow_BrowserType_TYPE_TABBED;
+      } else if (window_delegate->IsTypePopup()) {
+        synced_session_window->window_type =
+            sync_pb::SessionWindow_BrowserType_TYPE_POPUP;
+      } else {
+        // This is a custom tab within an app. These will not be restored on
+        // startup if not present.
+        synced_session_window->window_type =
+            sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB;
+      }
+    }
+  }
+
+  std::set<int> deleted_tab_node_ids;
+  session_tracker_->CleanupLocalTabs(&deleted_tab_node_ids);
+  for (int tab_node_id : deleted_tab_node_ids) {
+    change_output->Delete(tab_node_id);
+  }
+
+  // Always update the header.  Sync takes care of dropping this update
+  // if the entity specifics are identical (i.e windows, client name did
+  // not change).
+  auto specifics = std::make_unique<sync_pb::SessionSpecifics>();
+  specifics->set_session_tag(current_session_tag_);
+  current_session->ToSessionHeaderProto().Swap(specifics->mutable_header());
+  change_output->Update(std::move(specifics));
+}
+
+void LocalSessionEventHandlerImpl::AssociateTab(
+    SyncedTabDelegate* const tab_delegate,
+    bool has_tabbed_window,
+    WriteBatch* change_output) {
+  DCHECK(!tab_delegate->IsPlaceholderTab());
+
+  if (tab_delegate->IsBeingDestroyed()) {
+    task_tracker_.CleanTabTasks(tab_delegate->GetSessionId());
+    // Do nothing else. By not proactively adding the tab to the session, it
+    // will be removed if necessary during subsequent cleanup.
+    return;
+  }
+
+  // Ensure the task tracker has up to date task ids for this tab.
+  UpdateTaskTracker(tab_delegate);
+
+  if (!tab_delegate->ShouldSync(sessions_client_)) {
+    return;
+  }
+
+  SessionID::id_type tab_id = tab_delegate->GetSessionId();
+  DVLOG(1) << "Syncing tab " << tab_id << " from window "
+           << tab_delegate->GetWindowId();
+
+  int tab_node_id = TabNodePool::kInvalidTabNodeID;
+  bool existing_tab_node = true;
+  if (session_tracker_->IsLocalTabNodeAssociated(tab_delegate->GetSyncId())) {
+    tab_node_id = tab_delegate->GetSyncId();
+    session_tracker_->ReassociateLocalTab(tab_node_id, tab_id);
+  } else if (has_tabbed_window) {
+    existing_tab_node =
+        session_tracker_->GetTabNodeFromLocalTabId(tab_id, &tab_node_id);
+    CHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id)
+        << "https://crbug.com/639009";
+    tab_delegate->SetSyncId(tab_node_id);
+  } else {
+    // Only allowed to allocate sync ids when we have native data, which is only
+    // true when we have a tabbed window. Without a sync id we cannot sync this
+    // data, the tracker cannot even really track it. So don't do any more work.
+    // This effectively breaks syncing custom tabs when the native browser isn't
+    // fully loaded. Ideally this is fixed by saving tab data and sync data
+    // atomically, see https://crbug.com/681921.
+    return;
+  }
+
+  sessions::SessionTab* session_tab =
+      session_tracker_->GetTab(current_session_tag_, tab_id);
+
+  // Get the previously synced url.
+  int old_index = session_tab->normalized_navigation_index();
+  GURL old_url;
+  if (session_tab->navigations.size() > static_cast<size_t>(old_index))
+    old_url = session_tab->navigations[old_index].virtual_url();
+
+  // Update the tracker's session representation.
+  SetSessionTabFromDelegate(*tab_delegate, base::Time::Now(), session_tab);
+  session_tracker_->GetSession(current_session_tag_)->modified_time =
+      base::Time::Now();
+
+  // Write to the sync model itself.
+  auto specifics = std::make_unique<sync_pb::SessionSpecifics>();
+  SessionTabToSpecifics(*session_tab, current_session_tag_, tab_node_id)
+      .Swap(specifics.get());
+  WriteTasksIntoSpecifics(specifics->mutable_tab());
+  if (existing_tab_node) {
+    change_output->Update(std::move(specifics));
+  } else {
+    change_output->Add(std::move(specifics));
+  }
+
+  int current_index = tab_delegate->GetCurrentEntryIndex();
+  const GURL new_url = tab_delegate->GetVirtualURLAtIndex(current_index);
+  if (new_url != old_url) {
+    delegate_->OnFaviconVisited(
+        new_url, tab_delegate->GetFaviconURLAtIndex(current_index));
+  }
+}
+
+void LocalSessionEventHandlerImpl::UpdateTaskTracker(
+    SyncedTabDelegate* const tab_delegate) {
+  TabTasks* tab_tasks = task_tracker_.GetTabTasks(
+      tab_delegate->GetSessionId(), tab_delegate->GetSourceTabID());
+
+  // Iterate through all navigations in the tab to ensure they all have a task
+  // id set (it's possible some haven't been seen before, such as when a tab
+  // is restored).
+  for (int i = 0; i < tab_delegate->GetEntryCount(); ++i) {
+    sessions::SerializedNavigationEntry serialized_entry;
+    tab_delegate->GetSerializedNavigationAtIndex(i, &serialized_entry);
+
+    int nav_id = serialized_entry.unique_id();
+    int64_t global_id = serialized_entry.timestamp().ToInternalValue();
+    tab_tasks->UpdateWithNavigation(
+        nav_id, tab_delegate->GetTransitionAtIndex(i), global_id);
+  }
+}
+
+void LocalSessionEventHandlerImpl::WriteTasksIntoSpecifics(
+    sync_pb::SessionTab* tab_specifics) {
+  TabTasks* tab_tasks =
+      task_tracker_.GetTabTasks(tab_specifics->tab_id(), kInvalidTabID);
+  for (int i = 0; i < tab_specifics->navigation_size(); i++) {
+    // Excluding blocked navigations, which are appended at tail.
+    if (tab_specifics->navigation(i).blocked_state() ==
+        sync_pb::TabNavigation::STATE_BLOCKED) {
+      break;
+    }
+
+    std::vector<int64_t> task_ids = tab_tasks->GetTaskIdsForNavigation(
+        tab_specifics->navigation(i).unique_id());
+    if (task_ids.empty()) {
+      continue;
+    }
+
+    tab_specifics->mutable_navigation(i)->set_task_id(task_ids.back());
+    // Pop the task id of navigation self.
+    task_ids.pop_back();
+    tab_specifics->mutable_navigation(i)->clear_ancestor_task_id();
+    for (auto ancestor_task_id : task_ids) {
+      tab_specifics->mutable_navigation(i)->add_ancestor_task_id(
+          ancestor_task_id);
+    }
+  }
+}
+
+void LocalSessionEventHandlerImpl::OnLocalTabModified(
+    SyncedTabDelegate* modified_tab) {
+  DCHECK(!current_session_tag_.empty());
+
+  sessions::SerializedNavigationEntry current;
+  modified_tab->GetSerializedNavigationAtIndex(
+      modified_tab->GetCurrentEntryIndex(), &current);
+  global_id_mapper_.TrackNavigationIds(current.timestamp(),
+                                       current.unique_id());
+
+  bool found_tabbed_window = ScanForTabbedWindow();
+  std::unique_ptr<WriteBatch> batch = delegate_->CreateLocalSessionWriteBatch();
+  AssociateTab(modified_tab, found_tabbed_window, batch.get());
+  // Note, we always associate windows because it's possible a tab became
+  // "interesting" by going to a valid URL, in which case it needs to be added
+  // to the window's tab information. Similarly, if a tab became
+  // "uninteresting", we remove it from the window's tab information.
+  AssociateWindows(DONT_RELOAD_TABS, found_tabbed_window, batch.get());
+  batch->Commit();
+}
+
+void LocalSessionEventHandlerImpl::OnFaviconsChanged(
+    const std::set<GURL>& page_urls,
+    const GURL& /* icon_url */) {
+  for (const GURL& page_url : page_urls) {
+    if (page_url.is_valid()) {
+      delegate_->OnPageFaviconUpdated(page_url);
+    }
+  }
+}
+
+void LocalSessionEventHandlerImpl::AssociateRestoredPlaceholderTab(
+    const SyncedTabDelegate& tab_delegate,
+    SessionID::id_type new_tab_id,
+    SessionID::id_type new_window_id,
+    WriteBatch* change_output) {
+  DCHECK_NE(tab_delegate.GetSyncId(), TabNodePool::kInvalidTabNodeID);
+
+  // It's possible the placeholder tab is associated with a tab node that's
+  // since been deleted. If that's the case, there's no way to reassociate it,
+  // so just return now without adding the tab to the session tracker.
+  if (!session_tracker_->IsLocalTabNodeAssociated(tab_delegate.GetSyncId())) {
+    DVLOG(1) << "Restored placeholder tab's node " << tab_delegate.GetSyncId()
+             << " deleted.";
+    return;
+  }
+
+  // Update tracker with the new association (and inform it of the tab node
+  // in the process).
+  session_tracker_->ReassociateLocalTab(tab_delegate.GetSyncId(), new_tab_id);
+
+  // Update the window id on the SessionTab itself.
+  sessions::SessionTab* local_tab =
+      session_tracker_->GetTab(current_session_tag_, new_tab_id);
+  local_tab->window_id.set_id(new_window_id);
+
+  AppendChangeForExistingTab(tab_delegate.GetSyncId(), *local_tab,
+                             change_output);
+}
+
+void LocalSessionEventHandlerImpl::AppendChangeForExistingTab(
+    int sync_id,
+    const sessions::SessionTab& tab,
+    WriteBatch* change_output) const {
+  // Rewrite the specifics based on the reassociated SessionTab to preserve
+  // the new tab and window ids.
+  auto specifics = std::make_unique<sync_pb::SessionSpecifics>();
+  SessionTabToSpecifics(tab, current_session_tag_, sync_id)
+      .Swap(specifics.get());
+  change_output->Update(std::move(specifics));
+}
+
+void LocalSessionEventHandlerImpl::SetSessionTabFromDelegate(
+    const SyncedTabDelegate& tab_delegate,
+    base::Time mtime,
+    sessions::SessionTab* session_tab) const {
+  DCHECK(session_tab);
+  session_tab->window_id.set_id(tab_delegate.GetWindowId());
+  session_tab->tab_id.set_id(tab_delegate.GetSessionId());
+  session_tab->tab_visual_index = 0;
+  // Use -1 to indicate that the index hasn't been set properly yet.
+  session_tab->current_navigation_index = -1;
+  const SyncedWindowDelegate* window_delegate =
+      sessions_client_->GetSyncedWindowDelegatesGetter()->FindById(
+          tab_delegate.GetWindowId());
+  session_tab->pinned =
+      window_delegate ? window_delegate->IsTabPinned(&tab_delegate) : false;
+  session_tab->extension_app_id = tab_delegate.GetExtensionAppId();
+  session_tab->user_agent_override.clear();
+  session_tab->timestamp = mtime;
+  const int current_index = tab_delegate.GetCurrentEntryIndex();
+  const int min_index = std::max(0, current_index - kMaxSyncNavigationCount);
+  const int max_index = std::min(current_index + kMaxSyncNavigationCount,
+                                 tab_delegate.GetEntryCount());
+  bool is_supervised = tab_delegate.ProfileIsSupervised();
+  session_tab->navigations.clear();
+
+  for (int i = min_index; i < max_index; ++i) {
+    if (!tab_delegate.GetVirtualURLAtIndex(i).is_valid()) {
+      continue;
+    }
+    sessions::SerializedNavigationEntry serialized_entry;
+    tab_delegate.GetSerializedNavigationAtIndex(i, &serialized_entry);
+
+    // Set current_navigation_index to the index in navigations.
+    if (i == current_index)
+      session_tab->current_navigation_index = session_tab->navigations.size();
+
+    session_tab->navigations.push_back(serialized_entry);
+    if (is_supervised) {
+      session_tab->navigations.back().set_blocked_state(
+          SerializedNavigationEntry::STATE_ALLOWED);
+    }
+  }
+
+  // If the current navigation is invalid, set the index to the end of the
+  // navigation array.
+  if (session_tab->current_navigation_index < 0) {
+    session_tab->current_navigation_index = session_tab->navigations.size() - 1;
+  }
+
+  if (is_supervised) {
+    int offset = session_tab->navigations.size();
+    const std::vector<std::unique_ptr<const SerializedNavigationEntry>>&
+        blocked_navigations = *tab_delegate.GetBlockedNavigations();
+    for (size_t i = 0; i < blocked_navigations.size(); ++i) {
+      session_tab->navigations.push_back(*blocked_navigations[i]);
+      session_tab->navigations.back().set_index(offset + i);
+      session_tab->navigations.back().set_blocked_state(
+          SerializedNavigationEntry::STATE_BLOCKED);
+      // TODO(bauerb): Add categories
+    }
+  }
+  session_tab->session_storage_persistent_id.clear();
+}
+
+bool LocalSessionEventHandlerImpl::ScanForTabbedWindow() {
+  for (const auto& window_iter_pair :
+       sessions_client_->GetSyncedWindowDelegatesGetter()
+           ->GetSyncedWindowDelegates()) {
+    if (window_iter_pair.second->IsTypeTabbed()) {
+      const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
+      if (IsWindowSyncable(*window_delegate)) {
+        // When only custom tab windows are open, often we'll have a seemingly
+        // okay type tabbed window, but GetTabAt will return null for each
+        // index. This case is exactly what this method needs to protect
+        // against.
+        for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
+          if (window_delegate->GetTabAt(j)) {
+            return true;
+          }
+        }
+      }
+    }
+  }
+  return false;
+}
+
+}  // namespace sync_sessions
diff --git a/components/sync_sessions/local_session_event_handler_impl.h b/components/sync_sessions/local_session_event_handler_impl.h
new file mode 100644
index 0000000..95346b1
--- /dev/null
+++ b/components/sync_sessions/local_session_event_handler_impl.h
@@ -0,0 +1,159 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SYNC_SESSIONS_LOCAL_SESSION_EVENT_HANDLER_IMPL_H_
+#define COMPONENTS_SYNC_SESSIONS_LOCAL_SESSION_EVENT_HANDLER_IMPL_H_
+
+#include <memory>
+#include <set>
+#include <string>
+
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "components/sessions/core/session_id.h"
+#include "components/sessions/core/session_types.h"
+#include "components/sync_sessions/local_session_event_router.h"
+#include "components/sync_sessions/sessions_global_id_mapper.h"
+#include "components/sync_sessions/synced_session.h"
+#include "components/sync_sessions/task_tracker.h"
+
+namespace sync_pb {
+class SessionSpecifics;
+class SessionTab;
+}  // namespace sync_pb
+
+namespace sync_sessions {
+
+class SyncedSessionTracker;
+class SyncedTabDelegate;
+
+// Class responsible for propagating local session changes to the sessions
+// model including SyncedSessionTracker (in-memory representation) as well as
+// the persistency and sync layers (via delegate).
+class LocalSessionEventHandlerImpl : public LocalSessionEventHandler {
+ public:
+  class WriteBatch {
+   public:
+    WriteBatch();
+    virtual ~WriteBatch();
+    virtual void Delete(int tab_node_id) = 0;
+    virtual void Add(std::unique_ptr<sync_pb::SessionSpecifics> specifics) = 0;
+    virtual void Update(
+        std::unique_ptr<sync_pb::SessionSpecifics> specifics) = 0;
+    virtual void Commit() = 0;
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(WriteBatch);
+  };
+
+  class Delegate {
+   public:
+    virtual ~Delegate();
+    virtual std::unique_ptr<WriteBatch> CreateLocalSessionWriteBatch() = 0;
+    // Analogous to the functions in FaviconCache.
+    virtual void OnPageFaviconUpdated(const GURL& page_url) = 0;
+    virtual void OnFaviconVisited(const GURL& page_url,
+                                  const GURL& favicon_url) = 0;
+  };
+
+  LocalSessionEventHandlerImpl(Delegate* delegate,
+                               SyncSessionsClient* sessions_client,
+                               SyncedSessionTracker* session_tracker);
+  ~LocalSessionEventHandlerImpl() override;
+
+  SessionsGlobalIdMapper* GetGlobalIdMapper();
+
+  // Resync local window and tab information. Updates the local sessions header
+  // node with the status of open windows and the order of tabs they contain.
+  // |change_output| must not be nullptr.
+  //
+  // Must be called before routing events to this class (typically a call to
+  // the router's StartRoutingTo()), that is, before using this object as
+  // LocalSessionEventHandler.
+  // TODO(crbug.com/681921): Revisit if this function can be merged with the
+  // constructor, since it's essentially a two-step initialization.
+  void AssociateWindowsAndTabs(const std::string& session_tag,
+                               const std::string& session_name,
+                               sync_pb::SyncEnums::DeviceType device_type,
+                               WriteBatch* change_output);
+
+  // LocalSessionEventHandler implementation.
+  void OnLocalTabModified(SyncedTabDelegate* modified_tab) override;
+  void OnFaviconsChanged(const std::set<GURL>& page_urls,
+                         const GURL& icon_url) override;
+
+  // Set |session_tab| from |tab_delegate| and |mtime|. Exposed publicly for
+  // testing.
+  void SetSessionTabFromDelegateForTest(const SyncedTabDelegate& tab_delegate,
+                                        base::Time mtime,
+                                        sessions::SessionTab* session_tab);
+
+ private:
+  enum ReloadTabsOption { RELOAD_TABS, DONT_RELOAD_TABS };
+  void AssociateWindows(ReloadTabsOption option,
+                        bool has_tabbed_window,
+                        WriteBatch* change_output);
+
+  // Loads and reassociates the local tab referenced in |tab|.
+  // |change_output| *must* be provided as a link to the SyncChange pipeline
+  // that exists in the caller's context. This function will append necessary
+  // changes for processing later. Will only assign a new sync id if there is
+  // a tabbed window, which results in failure for tabs without sync ids yet.
+  void AssociateTab(SyncedTabDelegate* const tab,
+                    bool has_tabbed_window,
+                    WriteBatch* change_output);
+
+  // It's possible that when we associate windows, tabs aren't all loaded
+  // into memory yet (e.g on android) and we don't have a WebContents. In this
+  // case we can't do a full association, but we still want to update tab IDs
+  // as they may have changed after a session was restored.  This method
+  // compares new_tab_id and new_window_id against the previously persisted tab
+  // ID and window ID (from our TabNodePool) and updates them if either differs.
+  void AssociateRestoredPlaceholderTab(const SyncedTabDelegate& tab_delegate,
+                                       SessionID::id_type new_tab_id,
+                                       SessionID::id_type new_window_id,
+                                       WriteBatch* change_output);
+
+  // Appends an ACTION_UPDATE for a sync tab entity onto |change_output| to
+  // reflect the contents of |tab|, given the tab node id |sync_id|.
+  void AppendChangeForExistingTab(int sync_id,
+                                  const sessions::SessionTab& tab,
+                                  WriteBatch* change_output) const;
+
+  // Set |session_tab| from |tab_delegate| and |mtime|.
+  void SetSessionTabFromDelegate(const SyncedTabDelegate& tab_delegate,
+                                 base::Time mtime,
+                                 sessions::SessionTab* session_tab) const;
+
+  // Updates task tracker with the navigations of |tab_delegate|.
+  void UpdateTaskTracker(SyncedTabDelegate* const tab_delegate);
+
+  // Update |tab_specifics| with the corresponding task ids.
+  void WriteTasksIntoSpecifics(sync_pb::SessionTab* tab_specifics);
+
+  // On Android, it's possible to not have any tabbed windows when only custom
+  // tabs are currently open. This means that there is tab data that will be
+  // restored later, but we cannot access it. This method is an elaborate way to
+  // check if we're currently in that state or not.
+  bool ScanForTabbedWindow();
+
+  // Injected dependencies (not owned).
+  Delegate* const delegate_;
+  SyncSessionsClient* const sessions_client_;
+  SyncedSessionTracker* const session_tracker_;
+
+  SessionsGlobalIdMapper global_id_mapper_;
+
+  // Tracks Chrome Tasks, which associates navigations, with tab and navigation
+  // changes of current session.
+  TaskTracker task_tracker_;
+
+  std::string current_session_tag_;
+
+  DISALLOW_COPY_AND_ASSIGN(LocalSessionEventHandlerImpl);
+};
+
+}  // namespace sync_sessions
+
+#endif  // COMPONENTS_SYNC_SESSIONS_LOCAL_SESSION_EVENT_HANDLER_IMPL_H_
diff --git a/components/sync_sessions/local_session_event_handler_impl_unittest.cc b/components/sync_sessions/local_session_event_handler_impl_unittest.cc
new file mode 100644
index 0000000..63e60be
--- /dev/null
+++ b/components/sync_sessions/local_session_event_handler_impl_unittest.cc
@@ -0,0 +1,505 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_sessions/local_session_event_handler_impl.h"
+
+#include <utility>
+#include <vector>
+
+#include "base/strings/stringprintf.h"
+#include "components/sessions/core/serialized_navigation_entry.h"
+#include "components/sessions/core/serialized_navigation_entry_test_helper.h"
+#include "components/sync/model/sync_change.h"
+#include "components/sync/protocol/sync.pb.h"
+#include "components/sync_sessions/mock_sync_sessions_client.h"
+#include "components/sync_sessions/synced_session_tracker.h"
+#include "components/sync_sessions/test_synced_window_delegates_getter.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace sync_sessions {
+namespace {
+
+using sessions::SerializedNavigationEntry;
+using sessions::SerializedNavigationEntryTestHelper;
+using testing::ByMove;
+using testing::Eq;
+using testing::IsEmpty;
+using testing::NiceMock;
+using testing::Return;
+using testing::SizeIs;
+using testing::StrictMock;
+using testing::_;
+
+const char kFoo1[] = "http://foo1/";
+const char kBar1[] = "http://bar1/";
+const char kBar2[] = "http://bar2/";
+const char kBaz1[] = "http://baz1/";
+
+const char kSessionTag[] = "sessiontag1";
+const char kSessionName[] = "Session Name 1";
+
+const base::Time kTime0 = base::Time::FromInternalValue(100);
+const base::Time kTime1 = base::Time::FromInternalValue(110);
+const base::Time kTime2 = base::Time::FromInternalValue(120);
+const base::Time kTime3 = base::Time::FromInternalValue(130);
+const base::Time kTime4 = base::Time::FromInternalValue(140);
+const base::Time kTime5 = base::Time::FromInternalValue(150);
+const base::Time kTime6 = base::Time::FromInternalValue(190);
+
+const SessionID::id_type kWindowId1 = 1000001;
+const SessionID::id_type kWindowId2 = 1000002;
+const SessionID::id_type kTabId1 = 1000003;
+const SessionID::id_type kTabId2 = 1000004;
+const SessionID::id_type kTabId3 = 1000005;
+
+MATCHER_P3(MatchesHeader, session_tag, num_windows, num_tabs, "") {
+  if (arg == nullptr) {
+    *result_listener << "which is null";
+    return false;
+  }
+
+  const sync_pb::SessionSpecifics& specifics = *arg;
+  if (!specifics.has_header()) {
+    *result_listener << "which is not a header entity";
+    return false;
+  }
+  if (specifics.session_tag() != session_tag) {
+    *result_listener << "which contains an unexpected session tag";
+    return false;
+  }
+  if (specifics.header().window_size() != num_windows) {
+    *result_listener << "which contains an unexpected number of windows: "
+                     << specifics.header().window_size();
+    return false;
+  }
+  int tab_count = 0;
+  for (auto& window : specifics.header().window()) {
+    tab_count += window.tab_size();
+  }
+  if (tab_count != num_tabs) {
+    *result_listener << "which contains an unexpected number of tabs: "
+                     << tab_count;
+    return false;
+  }
+  return true;
+}
+
+MATCHER_P4(MatchesTab, session_tag, window_id, tab_id, urls, "") {
+  if (arg == nullptr) {
+    *result_listener << "which is null";
+    return false;
+  }
+
+  const sync_pb::SessionSpecifics& specifics = *arg;
+
+  if (!specifics.has_tab()) {
+    *result_listener << "which is not a tab entity";
+    return false;
+  }
+  if (specifics.session_tag() != session_tag) {
+    *result_listener << "which contains an unexpected session tag";
+    return false;
+  }
+  if (specifics.tab().window_id() != window_id) {
+    *result_listener << "which contains an unexpected window ID";
+    return false;
+  }
+  if (specifics.tab().tab_id() != tab_id) {
+    *result_listener << "which contains an unexpected tab ID";
+    return false;
+  }
+  if (specifics.tab().navigation_size() != static_cast<int>(urls.size())) {
+    *result_listener << "which contains an unexpected number of windows";
+    return false;
+  }
+  for (int i = 0; i < specifics.tab().navigation_size(); ++i) {
+    if (specifics.tab().navigation(i).virtual_url() != urls.at(i)) {
+      *result_listener << "which contains an unexpected navigation URL " << i;
+      return false;
+    }
+  }
+  return true;
+}
+
+class MockWriteBatch : public LocalSessionEventHandlerImpl::WriteBatch {
+ public:
+  MockWriteBatch() {}
+  ~MockWriteBatch() override {}
+
+  void Add(std::unique_ptr<sync_pb::SessionSpecifics> specifics) override {
+    DoAdd(specifics.get());
+  }
+
+  void Update(std::unique_ptr<sync_pb::SessionSpecifics> specifics) override {
+    DoUpdate(specifics.get());
+  }
+
+  MOCK_METHOD1(Delete, void(int tab_node_id));
+  // TODO(crbug.com/729950): Use unique_ptr here direclty once move-only
+  // arguments are supported in gMock.
+  MOCK_METHOD1(DoAdd, void(sync_pb::SessionSpecifics* specifics));
+  MOCK_METHOD1(DoUpdate, void(sync_pb::SessionSpecifics* specifics));
+  MOCK_METHOD0(Commit, void());
+};
+
+class MockDelegate : public LocalSessionEventHandlerImpl::Delegate {
+ public:
+  ~MockDelegate() override {}
+
+  MOCK_METHOD0(CreateLocalSessionWriteBatch,
+               std::unique_ptr<LocalSessionEventHandlerImpl::WriteBatch>());
+  MOCK_METHOD1(OnPageFaviconUpdated, void(const GURL& page_url));
+  MOCK_METHOD2(OnFaviconVisited,
+               void(const GURL& page_url, const GURL& favicon_url));
+};
+
+class LocalSessionEventHandlerImplTest : public testing::Test {
+ public:
+  LocalSessionEventHandlerImplTest()
+      : session_tracker_(&mock_sync_sessions_client_),
+        handler_(&mock_delegate_,
+                 &mock_sync_sessions_client_,
+                 &session_tracker_) {
+    ON_CALL(mock_sync_sessions_client_, GetSyncedWindowDelegatesGetter())
+        .WillByDefault(testing::Return(&window_getter_));
+
+    session_tracker_.SetLocalSessionTag(kSessionTag);
+  }
+
+  TestSyncedWindowDelegate* AddWindow(
+      SessionID::id_type window_id = SessionID().id()) {
+    return window_getter_.AddWindow(
+        sync_pb::SessionWindow_BrowserType_TYPE_TABBED, window_id);
+  }
+
+  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
+                                const std::string& url,
+                                SessionID::id_type tab_id = SessionID().id()) {
+    TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id, tab_id);
+    tab->Navigate(url, base::Time::Now());
+    return tab;
+  }
+
+  TestSyncedTabDelegate* AddTabWithTime(SessionID::id_type window_id,
+                                        const std::string& url,
+                                        base::Time time = base::Time::Now()) {
+    TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id);
+    tab->Navigate(url, time);
+    return tab;
+  }
+
+  testing::NiceMock<MockDelegate> mock_delegate_;
+  testing::NiceMock<MockSyncSessionsClient> mock_sync_sessions_client_;
+  SyncedSessionTracker session_tracker_;
+  TestSyncedWindowDelegatesGetter window_getter_;
+  LocalSessionEventHandlerImpl handler_;
+};
+
+// Populate the mock tab delegate with some data and navigation
+// entries and make sure that setting a SessionTab from it preserves
+// those entries (and clobbers any existing data).
+TEST_F(LocalSessionEventHandlerImplTest, SetSessionTabFromDelegate) {
+  // Create a tab with three valid entries.
+  TestSyncedTabDelegate* tab =
+      AddTabWithTime(AddWindow()->GetSessionId(), kFoo1, kTime1);
+  tab->Navigate(kBar1, kTime2);
+  tab->Navigate(kBaz1, kTime3);
+
+  sessions::SessionTab session_tab;
+  session_tab.window_id.set_id(1);
+  session_tab.tab_id.set_id(1);
+  session_tab.tab_visual_index = 1;
+  session_tab.current_navigation_index = 1;
+  session_tab.pinned = true;
+  session_tab.extension_app_id = "app id";
+  session_tab.user_agent_override = "override";
+  session_tab.timestamp = kTime5;
+  session_tab.navigations.push_back(
+      SerializedNavigationEntryTestHelper::CreateNavigation(
+          "http://www.example.com", "Example"));
+  session_tab.session_storage_persistent_id = "persistent id";
+  handler_.SetSessionTabFromDelegateForTest(*tab, kTime4, &session_tab);
+
+  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
+  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
+  EXPECT_EQ(0, session_tab.tab_visual_index);
+  EXPECT_EQ(tab->GetCurrentEntryIndex(), session_tab.current_navigation_index);
+  EXPECT_FALSE(session_tab.pinned);
+  EXPECT_TRUE(session_tab.extension_app_id.empty());
+  EXPECT_TRUE(session_tab.user_agent_override.empty());
+  EXPECT_EQ(kTime4, session_tab.timestamp);
+  ASSERT_EQ(3u, session_tab.navigations.size());
+  EXPECT_EQ(GURL(kFoo1), session_tab.navigations[0].virtual_url());
+  EXPECT_EQ(GURL(kBar1), session_tab.navigations[1].virtual_url());
+  EXPECT_EQ(GURL(kBaz1), session_tab.navigations[2].virtual_url());
+  EXPECT_EQ(kTime1, session_tab.navigations[0].timestamp());
+  EXPECT_EQ(kTime2, session_tab.navigations[1].timestamp());
+  EXPECT_EQ(kTime3, session_tab.navigations[2].timestamp());
+  EXPECT_EQ(200, session_tab.navigations[0].http_status_code());
+  EXPECT_EQ(200, session_tab.navigations[1].http_status_code());
+  EXPECT_EQ(200, session_tab.navigations[2].http_status_code());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
+            session_tab.navigations[0].blocked_state());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
+            session_tab.navigations[1].blocked_state());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
+            session_tab.navigations[2].blocked_state());
+  EXPECT_TRUE(session_tab.session_storage_persistent_id.empty());
+}
+
+// Ensure the current_navigation_index gets set properly when the navigation
+// stack gets trucated to +/- 6 entries.
+TEST_F(LocalSessionEventHandlerImplTest,
+       SetSessionTabFromDelegateNavigationIndex) {
+  TestSyncedTabDelegate* tab = AddTab(AddWindow()->GetSessionId(), kFoo1);
+  const int kNavs = 10;
+  for (int i = 1; i < kNavs; ++i) {
+    tab->Navigate(base::StringPrintf("http://foo%i", i));
+  }
+  tab->set_current_entry_index(kNavs - 2);
+
+  sessions::SessionTab session_tab;
+  handler_.SetSessionTabFromDelegateForTest(*tab, kTime6, &session_tab);
+
+  EXPECT_EQ(6, session_tab.current_navigation_index);
+  ASSERT_EQ(8u, session_tab.navigations.size());
+  EXPECT_EQ(GURL("http://foo2"), session_tab.navigations[0].virtual_url());
+  EXPECT_EQ(GURL("http://foo3"), session_tab.navigations[1].virtual_url());
+  EXPECT_EQ(GURL("http://foo4"), session_tab.navigations[2].virtual_url());
+}
+
+// Ensure the current_navigation_index gets set to the end of the navigation
+// stack if the current navigation is invalid.
+TEST_F(LocalSessionEventHandlerImplTest,
+       SetSessionTabFromDelegateCurrentInvalid) {
+  TestSyncedTabDelegate* tab =
+      AddTabWithTime(AddWindow()->GetSessionId(), kFoo1, kTime0);
+  tab->Navigate(std::string(""), kTime1);
+  tab->Navigate(kBar1, kTime2);
+  tab->Navigate(kBar2, kTime3);
+  tab->set_current_entry_index(1);
+
+  sessions::SessionTab session_tab;
+  handler_.SetSessionTabFromDelegateForTest(*tab, kTime6, &session_tab);
+
+  EXPECT_EQ(2, session_tab.current_navigation_index);
+  ASSERT_EQ(3u, session_tab.navigations.size());
+}
+
+// Tests that for supervised users blocked navigations are recorded and marked
+// as such, while regular navigations are marked as allowed.
+TEST_F(LocalSessionEventHandlerImplTest, BlockedNavigations) {
+  TestSyncedTabDelegate* tab =
+      AddTabWithTime(AddWindow()->GetSessionId(), kFoo1, kTime1);
+
+  auto entry2 = std::make_unique<sessions::SerializedNavigationEntry>();
+  GURL url2("http://blocked.com/foo");
+  SerializedNavigationEntryTestHelper::SetVirtualURL(GURL(url2), entry2.get());
+  SerializedNavigationEntryTestHelper::SetTimestamp(kTime2, entry2.get());
+
+  auto entry3 = std::make_unique<sessions::SerializedNavigationEntry>();
+  GURL url3("http://evil.com");
+  SerializedNavigationEntryTestHelper::SetVirtualURL(GURL(url3), entry3.get());
+  SerializedNavigationEntryTestHelper::SetTimestamp(kTime3, entry3.get());
+
+  std::vector<std::unique_ptr<sessions::SerializedNavigationEntry>>
+      blocked_navigations;
+  blocked_navigations.push_back(std::move(entry2));
+  blocked_navigations.push_back(std::move(entry3));
+
+  tab->set_is_supervised(true);
+  tab->set_blocked_navigations(blocked_navigations);
+
+  sessions::SessionTab session_tab;
+  session_tab.window_id.set_id(1);
+  session_tab.tab_id.set_id(1);
+  session_tab.tab_visual_index = 1;
+  session_tab.current_navigation_index = 1;
+  session_tab.pinned = true;
+  session_tab.extension_app_id = "app id";
+  session_tab.user_agent_override = "override";
+  session_tab.timestamp = kTime5;
+  session_tab.navigations.push_back(
+      SerializedNavigationEntryTestHelper::CreateNavigation(
+          "http://www.example.com", "Example"));
+  session_tab.session_storage_persistent_id = "persistent id";
+  handler_.SetSessionTabFromDelegateForTest(*tab, kTime4, &session_tab);
+
+  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
+  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
+  EXPECT_EQ(0, session_tab.tab_visual_index);
+  EXPECT_EQ(0, session_tab.current_navigation_index);
+  EXPECT_FALSE(session_tab.pinned);
+  EXPECT_TRUE(session_tab.extension_app_id.empty());
+  EXPECT_TRUE(session_tab.user_agent_override.empty());
+  EXPECT_EQ(kTime4, session_tab.timestamp);
+  ASSERT_EQ(3u, session_tab.navigations.size());
+  EXPECT_EQ(GURL(kFoo1), session_tab.navigations[0].virtual_url());
+  EXPECT_EQ(url2, session_tab.navigations[1].virtual_url());
+  EXPECT_EQ(url3, session_tab.navigations[2].virtual_url());
+  EXPECT_EQ(kTime1, session_tab.navigations[0].timestamp());
+  EXPECT_EQ(kTime2, session_tab.navigations[1].timestamp());
+  EXPECT_EQ(kTime3, session_tab.navigations[2].timestamp());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_ALLOWED,
+            session_tab.navigations[0].blocked_state());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_BLOCKED,
+            session_tab.navigations[1].blocked_state());
+  EXPECT_EQ(SerializedNavigationEntry::STATE_BLOCKED,
+            session_tab.navigations[2].blocked_state());
+  EXPECT_TRUE(session_tab.session_storage_persistent_id.empty());
+}
+
+// Tests that calling AssociateWindowsAndTabs() handles well the case with no
+// open tabs or windows.
+TEST_F(LocalSessionEventHandlerImplTest, AssociateWindowsAndTabsIfEmpty) {
+  EXPECT_CALL(mock_delegate_, CreateLocalSessionWriteBatch()).Times(0);
+  EXPECT_CALL(mock_delegate_, OnPageFaviconUpdated(_)).Times(0);
+  EXPECT_CALL(mock_delegate_, OnFaviconVisited(_, _)).Times(0);
+
+  StrictMock<MockWriteBatch> mock_batch;
+  EXPECT_CALL(mock_batch, DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/0,
+                                                 /*num_tabs=*/0)));
+
+  handler_.AssociateWindowsAndTabs(kSessionTag, kSessionName,
+                                   sync_pb::SyncEnums_DeviceType_TYPE_PHONE,
+                                   &mock_batch);
+}
+
+// Tests that calling AssociateWindowsAndTabs() reflects the open tabs in a) the
+// SyncSessionTracker and b) the delegate.
+TEST_F(LocalSessionEventHandlerImplTest, AssociateWindowsAndTabs) {
+  AddWindow(kWindowId1);
+  AddTab(kWindowId1, kFoo1, kTabId1);
+  AddWindow(kWindowId2);
+  AddTab(kWindowId2, kBar1, kTabId2);
+  AddTab(kWindowId2, kBar2, kTabId3)->Navigate(kBaz1);
+
+  EXPECT_CALL(mock_delegate_, CreateLocalSessionWriteBatch()).Times(0);
+  EXPECT_CALL(mock_delegate_, OnPageFaviconUpdated(_)).Times(0);
+  EXPECT_CALL(mock_delegate_, OnFaviconVisited(GURL(kBar2), _)).Times(0);
+
+  EXPECT_CALL(mock_delegate_, OnFaviconVisited(GURL(kFoo1), _));
+  EXPECT_CALL(mock_delegate_, OnFaviconVisited(GURL(kBar1), _));
+  EXPECT_CALL(mock_delegate_, OnFaviconVisited(GURL(kBaz1), _));
+
+  StrictMock<MockWriteBatch> mock_batch;
+  EXPECT_CALL(mock_batch, DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/2,
+                                                 /*num_tabs=*/3)));
+  EXPECT_CALL(mock_batch, DoAdd(MatchesTab(kSessionTag, kWindowId1, kTabId1,
+                                           std::vector<std::string>{kFoo1})));
+  EXPECT_CALL(mock_batch, DoAdd(MatchesTab(kSessionTag, kWindowId2, kTabId2,
+                                           std::vector<std::string>{kBar1})));
+  EXPECT_CALL(mock_batch,
+              DoAdd(MatchesTab(kSessionTag, kWindowId2, kTabId3,
+                               std::vector<std::string>{kBar2, kBaz1})));
+
+  handler_.AssociateWindowsAndTabs(kSessionTag, kSessionName,
+                                   sync_pb::SyncEnums_DeviceType_TYPE_PHONE,
+                                   &mock_batch);
+}
+
+TEST_F(LocalSessionEventHandlerImplTest, PropagateNewNavigation) {
+  AddWindow(kWindowId1);
+  TestSyncedTabDelegate* tab = AddTab(kWindowId1, kFoo1, kTabId1);
+
+  NiceMock<MockWriteBatch> initial_mock_batch;
+  handler_.AssociateWindowsAndTabs(kSessionTag, kSessionName,
+                                   sync_pb::SyncEnums_DeviceType_TYPE_PHONE,
+                                   &initial_mock_batch);
+  window_getter_.router()->StartRoutingTo(&handler_);
+
+  auto update_mock_batch = std::make_unique<StrictMock<MockWriteBatch>>();
+  // Note that the header is reported again, although it hasn't changed. This is
+  // OK because sync will avoid updating an entity with identical content.
+  EXPECT_CALL(*update_mock_batch,
+              DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/1,
+                                     /*num_tabs=*/1)));
+  EXPECT_CALL(*update_mock_batch,
+              DoUpdate(MatchesTab(kSessionTag, kWindowId1, kTabId1,
+                                  std::vector<std::string>{kFoo1, kBar1})));
+  EXPECT_CALL(*update_mock_batch, Commit());
+
+  EXPECT_CALL(mock_delegate_, CreateLocalSessionWriteBatch())
+      .WillOnce(Return(ByMove(std::move(update_mock_batch))));
+
+  tab->Navigate(kBar1);
+}
+
+TEST_F(LocalSessionEventHandlerImplTest, PropagateNewTab) {
+  AddWindow(kWindowId1);
+  AddTab(kWindowId1, kFoo1, kTabId1);
+
+  NiceMock<MockWriteBatch> initial_mock_batch;
+  handler_.AssociateWindowsAndTabs(kSessionTag, kSessionName,
+                                   sync_pb::SyncEnums_DeviceType_TYPE_PHONE,
+                                   &initial_mock_batch);
+  window_getter_.router()->StartRoutingTo(&handler_);
+
+  // Tab creation triggers an update event due to the tab parented notification,
+  // so the event handler issues two commits as well (one for tab creation, one
+  // for tab update). During the first update, however, the tab is not syncable
+  // and is hence skipped.
+  auto tab_create_mock_batch = std::make_unique<StrictMock<MockWriteBatch>>();
+  EXPECT_CALL(*tab_create_mock_batch,
+              DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/1,
+                                     /*num_tabs=*/1)));
+  EXPECT_CALL(*tab_create_mock_batch, Commit());
+
+  auto navigation_mock_batch = std::make_unique<StrictMock<MockWriteBatch>>();
+  EXPECT_CALL(*navigation_mock_batch,
+              DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/1,
+                                     /*num_tabs=*/2)));
+  EXPECT_CALL(*navigation_mock_batch,
+              DoAdd(MatchesTab(kSessionTag, kWindowId1, kTabId2,
+                               std::vector<std::string>{kBar1})));
+  EXPECT_CALL(*navigation_mock_batch, Commit());
+
+  EXPECT_CALL(mock_delegate_, CreateLocalSessionWriteBatch())
+      .WillOnce(Return(ByMove(std::move(tab_create_mock_batch))))
+      .WillOnce(Return(ByMove(std::move(navigation_mock_batch))));
+
+  AddTab(kWindowId1, kBar1, kTabId2);
+}
+
+TEST_F(LocalSessionEventHandlerImplTest, PropagateNewWindow) {
+  AddWindow(kWindowId1);
+  AddTab(kWindowId1, kFoo1, kTabId1);
+  AddTab(kWindowId1, kBar1, kTabId2);
+
+  NiceMock<MockWriteBatch> initial_mock_batch;
+  handler_.AssociateWindowsAndTabs(kSessionTag, kSessionName,
+                                   sync_pb::SyncEnums_DeviceType_TYPE_PHONE,
+                                   &initial_mock_batch);
+  window_getter_.router()->StartRoutingTo(&handler_);
+
+  // Window creation triggers an update event due to the tab parented
+  // notification, so the event handler issues two commits as well (one for
+  // window creation, one for tab update). During the first update, however,
+  // the window is not syncable and is hence skipped.
+  auto tab_create_mock_batch = std::make_unique<StrictMock<MockWriteBatch>>();
+  EXPECT_CALL(*tab_create_mock_batch,
+              DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/1,
+                                     /*num_tabs=*/2)));
+  EXPECT_CALL(*tab_create_mock_batch, Commit());
+
+  auto navigation_mock_batch = std::make_unique<StrictMock<MockWriteBatch>>();
+  EXPECT_CALL(*navigation_mock_batch,
+              DoUpdate(MatchesHeader(kSessionTag, /*num_windows=*/2,
+                                     /*num_tabs=*/3)));
+  EXPECT_CALL(*navigation_mock_batch,
+              DoAdd(MatchesTab(kSessionTag, kWindowId2, kTabId3,
+                               std::vector<std::string>{kBaz1})));
+  EXPECT_CALL(*navigation_mock_batch, Commit());
+
+  EXPECT_CALL(mock_delegate_, CreateLocalSessionWriteBatch())
+      .WillOnce(Return(ByMove(std::move(tab_create_mock_batch))))
+      .WillOnce(Return(ByMove(std::move(navigation_mock_batch))));
+
+  AddWindow(kWindowId2);
+  AddTab(kWindowId2, kBaz1, kTabId3);
+}
+
+}  // namespace
+}  // namespace sync_sessions
diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
index 03c4554..144fe07 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <utility>
 
+#include "base/bind_helpers.h"
 #include "base/format_macros.h"
 #include "base/logging.h"
 #include "base/metrics/field_trial.h"
@@ -20,12 +21,8 @@
 #include "components/sync/model/sync_merge_result.h"
 #include "components/sync/model/time.h"
 #include "components/sync_sessions/sync_sessions_client.h"
-#include "components/sync_sessions/synced_tab_delegate.h"
-#include "components/sync_sessions/synced_window_delegate.h"
-#include "components/sync_sessions/synced_window_delegates_getter.h"
 #include "components/sync_sessions/tab_node_pool.h"
 
-using sessions::SerializedNavigationEntry;
 using syncer::DeviceInfo;
 using syncer::LocalDeviceInfoProvider;
 using syncer::SyncChange;
@@ -39,9 +36,6 @@
 // TODO(zea): pull this from the server.
 const int kMaxSyncFavicons = 200;
 
-// The maximum number of navigations in each direction we care to sync.
-const int kMaxSyncNavigationCount = 6;
-
 // Default number of days without activity after which a session is considered
 // stale and becomes a candidate for garbage collection.
 const int kDefaultStaleSessionThresholdDays = 14;  // 2 weeks.
@@ -67,7 +61,7 @@
     const std::string& local_tag,
     int tab_node_id) {
   sync_pb::SessionSpecifics specifics;
-  specifics.mutable_tab()->CopyFrom(session_tab.ToSyncData());
+  session_tab.ToSyncData().Swap(specifics.mutable_tab());
   specifics.set_session_tag(local_tag);
   specifics.set_tab_node_id(tab_node_id);
   return specifics;
@@ -85,17 +79,55 @@
   }
 }
 
-// Ensure that the tab id is not invalid.
-bool ShouldSyncTabId(SessionID::id_type tab_id) {
-  if (tab_id == kInvalidTabID)
-    return false;
-  return true;
-}
+class SyncChangeListWriteBatch
+    : public LocalSessionEventHandlerImpl::WriteBatch {
+ public:
+  SyncChangeListWriteBatch(
+      const std::string& machine_tag,
+      const std::string& session_name,
+      base::OnceCallback<void(const syncer::SyncChangeList&)> commit_cb)
+      : machine_tag_(machine_tag),
+        session_name_(session_name),
+        commit_cb_(std::move(commit_cb)) {}
 
-bool IsWindowSyncable(const SyncedWindowDelegate& window_delegate) {
-  return window_delegate.ShouldSync() && window_delegate.GetTabCount() &&
-         window_delegate.HasWindow();
-}
+  syncer::SyncChangeList* sync_change_list() { return &changes_; }
+
+  // WriteBatch implementation.
+  void Delete(int tab_node_id) override {
+    changes_.push_back(syncer::SyncChange(
+        FROM_HERE, SyncChange::ACTION_DELETE,
+        SyncData::CreateLocalDelete(TabNodeIdToTag(machine_tag_, tab_node_id),
+                                    syncer::SESSIONS)));
+  }
+
+  void Add(std::unique_ptr<sync_pb::SessionSpecifics> specifics) override {
+    sync_pb::EntitySpecifics entity_specifics;
+    specifics->Swap(entity_specifics.mutable_session());
+    changes_.push_back(
+        syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_ADD,
+                           syncer::SyncData::CreateLocalData(
+                               TagFromSpecifics(entity_specifics.session()),
+                               session_name_, entity_specifics)));
+  }
+
+  void Update(std::unique_ptr<sync_pb::SessionSpecifics> specifics) override {
+    sync_pb::EntitySpecifics entity_specifics;
+    specifics->Swap(entity_specifics.mutable_session());
+    changes_.push_back(
+        syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE,
+                           syncer::SyncData::CreateLocalData(
+                               TagFromSpecifics(entity_specifics.session()),
+                               session_name_, entity_specifics)));
+  }
+
+  void Commit() override { std::move(commit_cb_).Run(changes_); }
+
+ private:
+  const std::string machine_tag_;
+  const std::string session_name_;
+  base::OnceCallback<void(const syncer::SyncChangeList&)> commit_cb_;
+  syncer::SyncChangeList changes_;
+};
 
 }  // namespace
 
@@ -118,6 +150,9 @@
           &favicon_cache_,
           base::BindRepeating(&SessionsSyncManager::DeleteForeignSessionFromUI,
                               base::Unretained(this))),
+      local_session_event_handler_(/*delegate=*/this,
+                                   sessions_client,
+                                   &session_tracker_),
       local_tab_pool_out_of_sync_(true),
       sync_prefs_(sync_prefs),
       local_device_(local_device),
@@ -125,8 +160,7 @@
       local_session_header_node_id_(TabNodePool::kInvalidTabNodeID),
       stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
       local_event_router_(router),
-      sessions_updated_callback_(sessions_updated_callback),
-      task_tracker_(std::make_unique<TaskTracker>()) {}
+      sessions_updated_callback_(sessions_updated_callback) {}
 
 SessionsSyncManager::~SessionsSyncManager() {}
 
@@ -182,376 +216,43 @@
 
   session_tracker_.SetLocalSessionTag(current_machine_tag());
 
-  syncer::SyncChangeList new_changes;
+  // TODO(crbug.com/681921): Revisit the somewhat ugly use below of
+  // SyncChangeListWriteBatch. Ideally InitFromSyncModel() could use the
+  // WriteBatch API as well.
+  SyncChangeListWriteBatch batch(current_machine_tag(), current_session_name_,
+                                 /*commit_cb=*/base::DoNothing());
 
   // First, we iterate over sync data to update our session_tracker_.
-  if (!InitFromSyncModel(initial_sync_data, &new_changes)) {
+  if (!InitFromSyncModel(initial_sync_data, batch.sync_change_list())) {
     // The sync db didn't have a header node for us. Create one.
-    sync_pb::EntitySpecifics specifics;
-    sync_pb::SessionSpecifics* base_specifics = specifics.mutable_session();
-    base_specifics->set_session_tag(current_machine_tag());
-    sync_pb::SessionHeader* header_s = base_specifics->mutable_header();
+    auto specifics = std::make_unique<sync_pb::SessionSpecifics>();
+    specifics->set_session_tag(current_machine_tag());
+    sync_pb::SessionHeader* header_s = specifics->mutable_header();
     header_s->set_client_name(current_session_name_);
     header_s->set_device_type(current_device_type_);
-    syncer::SyncData data = syncer::SyncData::CreateLocalData(
-        current_machine_tag(), current_session_name_, specifics);
-    new_changes.push_back(
-        syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_ADD, data));
+    batch.Add(std::move(specifics));
   }
 
 #if defined(OS_ANDROID)
   std::string sync_machine_tag(
       BuildMachineTag(local_device_->GetLocalSyncCacheGUID()));
   if (current_machine_tag().compare(sync_machine_tag) != 0)
-    DeleteForeignSessionInternal(sync_machine_tag, &new_changes);
+    DeleteForeignSessionInternal(sync_machine_tag, batch.sync_change_list());
 #endif
 
   // Check if anything has changed on the local client side.
-  AssociateWindows(RELOAD_TABS, ScanForTabbedWindow(), &new_changes);
+  local_session_event_handler_.AssociateWindowsAndTabs(
+      current_machine_tag_, current_session_name_, current_device_type_,
+      &batch);
   local_tab_pool_out_of_sync_ = false;
 
-  merge_result.set_error(
-      sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes));
+  merge_result.set_error(sync_processor_->ProcessSyncChanges(
+      FROM_HERE, *batch.sync_change_list()));
 
-  local_event_router_->StartRoutingTo(this);
+  local_event_router_->StartRoutingTo(&local_session_event_handler_);
   return merge_result;
 }
 
-void SessionsSyncManager::AssociateWindows(
-    ReloadTabsOption option,
-    bool has_tabbed_window,
-    syncer::SyncChangeList* change_output) {
-  // Note that |current_session| is a pointer owned by |session_tracker_|.
-  // |session_tracker_| will continue to update |current_session| under
-  // the hood so care must be taken accessing it. In particular, invoking
-  // ResetSessionTracking(..) will invalidate all the tab data within
-  // the session, hence why copies of the SyncedSession must be made ahead of
-  // time.
-  SyncedSession* current_session =
-      session_tracker_.GetSession(current_machine_tag());
-  current_session->session_name = current_session_name_;
-  current_session->device_type = current_device_type_;
-  current_session->session_tag = current_machine_tag();
-
-  SyncedWindowDelegatesGetter::SyncedWindowDelegateMap windows =
-      synced_window_delegates_getter()->GetSyncedWindowDelegates();
-
-  // Without native data, we need be careful not to obliterate any old
-  // information, while at the same time handling updated tab ids. See
-  // https://crbug.com/639009 for more info.
-  if (has_tabbed_window) {
-    // Just reset the session tracking. No need to worry about the previous
-    // session; the current tabbed windows are now the source of truth.
-    session_tracker_.ResetSessionTracking(current_machine_tag());
-    current_session->modified_time = base::Time::Now();
-  } else {
-    DVLOG(1) << "Found no tabbed windows. Reloading "
-             << current_session->windows.size()
-             << " windows from previous session.";
-
-    // A copy of the specifics must be made because |current_session| will be
-    // updated in place and therefore can't be relied on as the source of truth.
-    sync_pb::SessionSpecifics specifics;
-    specifics.set_session_tag(current_machine_tag());
-    specifics.mutable_header()->CopyFrom(
-        current_session->ToSessionHeaderProto());
-    UpdateTrackerWithSpecifics(specifics, base::Time::Now(), &session_tracker_);
-
-    // The tab entities stored in sync have outdated SessionId values. Go
-    // through and update them to the new SessionIds.
-    for (auto& win_iter : current_session->windows) {
-      for (auto& tab : win_iter.second->wrapped_window.tabs) {
-        int sync_id = TabNodePool::kInvalidTabNodeID;
-        if (!session_tracker_.GetTabNodeFromLocalTabId(tab->tab_id.id(),
-                                                       &sync_id) ||
-            sync_id == TabNodePool::kInvalidTabNodeID) {
-          continue;
-        }
-        DVLOG(1) << "Rewriting tab node " << sync_id << " with tab id "
-                 << tab->tab_id.id();
-        AppendChangeForExistingTab(sync_id, *tab, change_output);
-      }
-    }
-  }
-
-  // Each sync id should only ever be used once. Previously there existed a race
-  // condition which could cause them to be duplicated, see
-  // https://crbug.com/639009 for more information. This counts the number of
-  // times each id is used so that the second window/tab loop can act on every
-  // tab using duplicate ids. Lastly, it is important to note that this
-  // duplication scan is only checking the in-memory tab state. On Android, if
-  // we have no tabbed window, we may also have sync data with conflicting sync
-  // ids, but to keep this logic simple and less error prone, we do not attempt
-  // to do anything clever.
-  std::map<int, size_t> sync_id_count;
-  int duplicate_count = 0;
-  for (auto& window_iter_pair : windows) {
-    const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
-    if (IsWindowSyncable(*window_delegate)) {
-      for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
-        SyncedTabDelegate* synced_tab = window_delegate->GetTabAt(j);
-        if (synced_tab &&
-            synced_tab->GetSyncId() != TabNodePool::kInvalidTabNodeID) {
-          auto iter = sync_id_count.find(synced_tab->GetSyncId());
-          if (iter == sync_id_count.end()) {
-            sync_id_count.insert(iter,
-                                 std::make_pair(synced_tab->GetSyncId(), 1));
-          } else {
-            // If an id is used more than twice, this count will be a bit odd,
-            // but for our purposes, it will be sufficient.
-            duplicate_count++;
-            iter->second++;
-          }
-        }
-      }
-    }
-  }
-  if (duplicate_count > 0) {
-    UMA_HISTOGRAM_COUNTS_100("Sync.SesssionsDuplicateSyncId", duplicate_count);
-  }
-
-  for (auto& window_iter_pair : windows) {
-    const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
-    if (option == RELOAD_TABS) {
-      UMA_HISTOGRAM_COUNTS("Sync.SessionTabs", window_delegate->GetTabCount());
-    }
-
-    // Make sure the window has tabs and a viewable window. The viewable
-    // window check is necessary because, for example, when a browser is
-    // closed the destructor is not necessarily run immediately. This means
-    // its possible for us to get a handle to a browser that is about to be
-    // removed. If the tab count is 0 or the window is null, the browser is
-    // about to be deleted, so we ignore it.
-    if (IsWindowSyncable(*window_delegate)) {
-      SessionID::id_type window_id = window_delegate->GetSessionId();
-      DVLOG(1) << "Associating window " << window_id << " with "
-               << window_delegate->GetTabCount() << " tabs.";
-
-      bool found_tabs = false;
-      for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
-        SessionID::id_type tab_id = window_delegate->GetTabIdAt(j);
-        SyncedTabDelegate* synced_tab = window_delegate->GetTabAt(j);
-
-        // GetTabAt can return a null tab; in that case just skip it. Similarly,
-        // if for some reason the tab id is invalid, skip it.
-        if (!synced_tab || !ShouldSyncTabId(tab_id))
-          continue;
-
-        if (synced_tab->GetSyncId() != TabNodePool::kInvalidTabNodeID) {
-          auto duplicate_iter = sync_id_count.find(synced_tab->GetSyncId());
-          DCHECK(duplicate_iter != sync_id_count.end());
-          if (duplicate_iter->second > 1) {
-            // Strip the id before processing it. This is going to mean it'll be
-            // treated the same as a new tab. If it's also a placeholder, we'll
-            // have no data about it, sync it cannot be synced until it is
-            // loaded. It is too difficult to try to guess which of the multiple
-            // tabs using the same id actually corresponds to the existing sync
-            // data.
-            synced_tab->SetSyncId(TabNodePool::kInvalidTabNodeID);
-          }
-        }
-
-        // Placeholder tabs are those without WebContents, either because they
-        // were never loaded into memory or they were evicted from memory
-        // (typically only on Android devices). They only have a tab id,
-        // window id, and a saved synced id (corresponding to the tab node
-        // id). Note that only placeholders have this sync id, as it's
-        // necessary to properly reassociate the tab with the entity that was
-        // backing it.
-        if (synced_tab->IsPlaceholderTab()) {
-          // For tabs without WebContents update the |tab_id| and |window_id|,
-          // as it could have changed after a session restore.
-          if (synced_tab->GetSyncId() > TabNodePool::kInvalidTabNodeID) {
-            AssociateRestoredPlaceholderTab(*synced_tab, tab_id, window_id,
-                                            change_output);
-          } else {
-            DVLOG(1) << "Placeholder tab " << tab_id << " has no sync id.";
-          }
-        } else if (RELOAD_TABS == option) {
-          AssociateTab(synced_tab, has_tabbed_window, change_output);
-        }
-
-        // If the tab was syncable, it would have been added to the tracker
-        // either by the above Associate[RestoredPlaceholder]Tab call or by
-        // the OnLocalTabModified method invoking AssociateTab directly.
-        // Therefore, we can key whether this window has valid tabs based on
-        // the tab's presence in the tracker.
-        const sessions::SessionTab* tab = nullptr;
-        if (session_tracker_.LookupSessionTab(current_machine_tag(), tab_id,
-                                              &tab)) {
-          found_tabs = true;
-
-          // Update this window's representation in the synced session tracker.
-          // This is a no-op if called multiple times.
-          session_tracker_.PutWindowInSession(current_machine_tag(), window_id);
-
-          // Put the tab in the window (must happen after the window is added
-          // to the session).
-          session_tracker_.PutTabInWindow(current_machine_tag(), window_id,
-                                          tab_id);
-        }
-      }
-      if (found_tabs) {
-        SyncedSessionWindow* synced_session_window =
-            current_session->windows[window_id].get();
-        if (window_delegate->IsTypeTabbed()) {
-          synced_session_window->window_type =
-              sync_pb::SessionWindow_BrowserType_TYPE_TABBED;
-        } else if (window_delegate->IsTypePopup()) {
-          synced_session_window->window_type =
-              sync_pb::SessionWindow_BrowserType_TYPE_POPUP;
-        } else {
-          // This is a custom tab within an app. These will not be restored on
-          // startup if not present.
-          synced_session_window->window_type =
-              sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB;
-        }
-      }
-    }
-  }
-  std::set<int> deleted_tab_node_ids;
-  session_tracker_.CleanupLocalTabs(&deleted_tab_node_ids);
-  AppendDeletionsForTabNodes(deleted_tab_node_ids, current_machine_tag(),
-                             change_output);
-
-  // Always update the header.  Sync takes care of dropping this update
-  // if the entity specifics are identical (i.e windows, client name did
-  // not change).
-  sync_pb::EntitySpecifics entity;
-  entity.mutable_session()->set_session_tag(current_machine_tag());
-  entity.mutable_session()->mutable_header()->CopyFrom(
-      current_session->ToSessionHeaderProto());
-  syncer::SyncData data = syncer::SyncData::CreateLocalData(
-      current_machine_tag(), current_session_name_, entity);
-  change_output->push_back(
-      syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data));
-}
-
-void SessionsSyncManager::AssociateTab(SyncedTabDelegate* const tab_delegate,
-                                       bool has_tabbed_window,
-                                       syncer::SyncChangeList* change_output) {
-  DCHECK(!tab_delegate->IsPlaceholderTab());
-
-  if (tab_delegate->IsBeingDestroyed()) {
-    task_tracker_->CleanTabTasks(tab_delegate->GetSessionId());
-    // Do nothing else. By not proactively adding the tab to the session, it
-    // will be removed if necessary during subsequent cleanup.
-    return;
-  }
-
-  // Ensure the task tracker has up to date task ids for this tab.
-  UpdateTaskTracker(tab_delegate);
-
-  if (!tab_delegate->ShouldSync(sessions_client_))
-    return;
-
-  SessionID::id_type tab_id = tab_delegate->GetSessionId();
-  DVLOG(1) << "Syncing tab " << tab_id << " from window "
-           << tab_delegate->GetWindowId();
-
-  int tab_node_id = TabNodePool::kInvalidTabNodeID;
-  bool existing_tab_node = true;
-  if (session_tracker_.IsLocalTabNodeAssociated(tab_delegate->GetSyncId())) {
-    tab_node_id = tab_delegate->GetSyncId();
-    session_tracker_.ReassociateLocalTab(tab_node_id, tab_id);
-  } else if (has_tabbed_window) {
-    existing_tab_node =
-        session_tracker_.GetTabNodeFromLocalTabId(tab_id, &tab_node_id);
-    CHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id)
-        << "https://crbug.com/639009";
-    tab_delegate->SetSyncId(tab_node_id);
-  } else {
-    // Only allowed to allocate sync ids when we have native data, which is only
-    // true when we have a tabbed window. Without a sync id we cannot sync this
-    // data, the tracker cannot even really track it. So don't do any more work.
-    // This effectively breaks syncing custom tabs when the native browser isn't
-    // fully loaded. Ideally this is fixed by saving tab data and sync data
-    // atomically, see https://crbug.com/681921.
-    return;
-  }
-
-  sessions::SessionTab* session_tab =
-      session_tracker_.GetTab(current_machine_tag(), tab_id);
-
-  // Get the previously synced url.
-  int old_index = session_tab->normalized_navigation_index();
-  GURL old_url;
-  if (session_tab->navigations.size() > static_cast<size_t>(old_index))
-    old_url = session_tab->navigations[old_index].virtual_url();
-
-  // Update the tracker's session representation.
-  SetSessionTabFromDelegate(*tab_delegate, base::Time::Now(), session_tab);
-  session_tracker_.GetSession(current_machine_tag())->modified_time =
-      base::Time::Now();
-
-  // Write to the sync model itself.
-  sync_pb::EntitySpecifics specifics;
-  specifics.mutable_session()->CopyFrom(
-      SessionTabToSpecifics(*session_tab, current_machine_tag(), tab_node_id));
-  WriteTasksIntoSpecifics(specifics.mutable_session()->mutable_tab());
-  syncer::SyncData data = syncer::SyncData::CreateLocalData(
-      TabNodeIdToTag(current_machine_tag(), tab_node_id), current_session_name_,
-      specifics);
-  change_output->push_back(
-      syncer::SyncChange(FROM_HERE,
-                         existing_tab_node ? syncer::SyncChange::ACTION_UPDATE
-                                           : syncer::SyncChange::ACTION_ADD,
-                         data));
-
-  int current_index = tab_delegate->GetCurrentEntryIndex();
-  const GURL new_url = tab_delegate->GetVirtualURLAtIndex(current_index);
-  if (new_url != old_url) {
-    favicon_cache_.OnFaviconVisited(
-        new_url, tab_delegate->GetFaviconURLAtIndex(current_index));
-  }
-}
-
-void SessionsSyncManager::UpdateTaskTracker(
-    SyncedTabDelegate* const tab_delegate) {
-  TabTasks* tab_tasks = task_tracker_->GetTabTasks(
-      tab_delegate->GetSessionId(), tab_delegate->GetSourceTabID());
-
-  // Iterate through all navigations in the tab to ensure they all have a task
-  // id set (it's possible some haven't been seen before, such as when a tab
-  // is restored).
-  for (int i = 0; i < tab_delegate->GetEntryCount(); ++i) {
-    sessions::SerializedNavigationEntry serialized_entry;
-    tab_delegate->GetSerializedNavigationAtIndex(i, &serialized_entry);
-
-    int nav_id = serialized_entry.unique_id();
-    int64_t global_id = serialized_entry.timestamp().ToInternalValue();
-    tab_tasks->UpdateWithNavigation(
-        nav_id, tab_delegate->GetTransitionAtIndex(i), global_id);
-  }
-}
-
-void SessionsSyncManager::WriteTasksIntoSpecifics(
-    sync_pb::SessionTab* tab_specifics) {
-  TabTasks* tab_tasks =
-      task_tracker_->GetTabTasks(tab_specifics->tab_id(), kInvalidTabID);
-  for (int i = 0; i < tab_specifics->navigation_size(); i++) {
-    // Excluding blocked navigations, which are appended at tail.
-    if (tab_specifics->navigation(i).blocked_state() ==
-        sync_pb::TabNavigation::STATE_BLOCKED) {
-      break;
-    }
-
-    std::vector<int64_t> task_ids = tab_tasks->GetTaskIdsForNavigation(
-        tab_specifics->navigation(i).unique_id());
-    if (task_ids.empty())
-      continue;
-
-    tab_specifics->mutable_navigation(i)->set_task_id(task_ids.back());
-    // Pop the task id of navigation self.
-    task_ids.pop_back();
-    tab_specifics->mutable_navigation(i)->clear_ancestor_task_id();
-    for (auto ancestor_task_id : task_ids) {
-      tab_specifics->mutable_navigation(i)->add_ancestor_task_id(
-          ancestor_task_id);
-    }
-  }
-}
-
 bool SessionsSyncManager::RebuildAssociations() {
   syncer::SyncDataList data(sync_processor_->GetAllSyncData(syncer::SESSIONS));
   std::unique_ptr<syncer::SyncErrorFactory> error_handler(
@@ -565,40 +266,6 @@
   return !merge_result.error().IsSet();
 }
 
-void SessionsSyncManager::OnLocalTabModified(SyncedTabDelegate* modified_tab) {
-  sessions::SerializedNavigationEntry current;
-  modified_tab->GetSerializedNavigationAtIndex(
-      modified_tab->GetCurrentEntryIndex(), &current);
-  global_id_mapper_.TrackNavigationIds(current.timestamp(),
-                                       current.unique_id());
-
-  if (local_tab_pool_out_of_sync_) {
-    // If our tab pool is corrupt, pay the price of a full re-association to
-    // fix things up.  This takes care of the new tab modification as well.
-    bool rebuild_association_succeeded = RebuildAssociations();
-    DCHECK(!rebuild_association_succeeded || !local_tab_pool_out_of_sync_);
-    return;
-  }
-
-  bool found_tabbed_window = ScanForTabbedWindow();
-  syncer::SyncChangeList changes;
-  AssociateTab(modified_tab, found_tabbed_window, &changes);
-  // Note, we always associate windows because it's possible a tab became
-  // "interesting" by going to a valid URL, in which case it needs to be added
-  // to the window's tab information. Similarly, if a tab became
-  // "uninteresting", we remove it from the window's tab information.
-  AssociateWindows(DONT_RELOAD_TABS, found_tabbed_window, &changes);
-  sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
-}
-
-void SessionsSyncManager::OnFaviconsChanged(const std::set<GURL>& page_urls,
-                                            const GURL& /* icon_url */) {
-  for (const GURL& page_url : page_urls) {
-    if (page_url.is_valid())
-      favicon_cache_.OnPageFaviconUpdated(page_url, base::Time::Now());
-  }
-}
-
 void SessionsSyncManager::StopSyncing(syncer::ModelType type) {
   local_event_router_->Stop();
   if (sync_processor_.get() && lost_navigations_recorder_.get()) {
@@ -631,15 +298,15 @@
       current_machine_tag(), current_session_name_, header_entity);
   list.push_back(data);
 
-  for (auto& win_iter : session->windows) {
-    for (auto& tab : win_iter.second->wrapped_window.tabs) {
+  for (const auto& win_iter : session->windows) {
+    for (const auto& tab : win_iter.second->wrapped_window.tabs) {
       // TODO(zea): replace with with the correct tab node id once there's a
       // sync specific wrapper for SessionTab. This method is only used in
       // tests though, so it's fine for now. https://crbug.com/662597
       int tab_node_id = 0;
       sync_pb::EntitySpecifics entity;
-      entity.mutable_session()->CopyFrom(
-          SessionTabToSpecifics(*tab, current_machine_tag(), tab_node_id));
+      SessionTabToSpecifics(*tab, current_machine_tag(), tab_node_id)
+          .Swap(entity.mutable_session());
       syncer::SyncData data = syncer::SyncData::CreateLocalData(
           TabNodeIdToTag(current_machine_tag(), tab_node_id),
           current_session_name_, entity);
@@ -928,112 +595,22 @@
   return session_tracker_.DeleteForeignSession(foreign_session_tag);
 }
 
-void SessionsSyncManager::AssociateRestoredPlaceholderTab(
-    const SyncedTabDelegate& tab_delegate,
-    SessionID::id_type new_tab_id,
-    SessionID::id_type new_window_id,
-    syncer::SyncChangeList* change_output) {
-  DCHECK_NE(tab_delegate.GetSyncId(), TabNodePool::kInvalidTabNodeID);
-
-  // It's possible the placeholder tab is associated with a tab node that's
-  // since been deleted. If that's the case, there's no way to reassociate it,
-  // so just return now without adding the tab to the session tracker.
-  if (!session_tracker_.IsLocalTabNodeAssociated(tab_delegate.GetSyncId())) {
-    DVLOG(1) << "Restored placeholder tab's node " << tab_delegate.GetSyncId()
-             << " deleted.";
-    return;
-  }
-
-  // Update tracker with the new association (and inform it of the tab node
-  // in the process).
-  session_tracker_.ReassociateLocalTab(tab_delegate.GetSyncId(), new_tab_id);
-
-  // Update the window id on the SessionTab itself.
-  sessions::SessionTab* local_tab =
-      session_tracker_.GetTab(current_machine_tag(), new_tab_id);
-  local_tab->window_id.set_id(new_window_id);
-
-  AppendChangeForExistingTab(tab_delegate.GetSyncId(), *local_tab,
-                             change_output);
+std::unique_ptr<LocalSessionEventHandlerImpl::WriteBatch>
+SessionsSyncManager::CreateLocalSessionWriteBatch() {
+  return std::make_unique<SyncChangeListWriteBatch>(
+      current_machine_tag(), current_session_name_,
+      /*commit_cb=*/
+      base::BindOnce(&SessionsSyncManager::ProcessLocalSessionSyncChanges,
+                     base::AsWeakPtr(this)));
 }
 
-void SessionsSyncManager::AppendChangeForExistingTab(
-    int sync_id,
-    const sessions::SessionTab& tab,
-    syncer::SyncChangeList* change_output) {
-  // Rewrite the specifics based on the reassociated SessionTab to preserve
-  // the new tab and window ids.
-  sync_pb::EntitySpecifics entity;
-  entity.mutable_session()->CopyFrom(
-      SessionTabToSpecifics(tab, current_machine_tag(), sync_id));
-  syncer::SyncData data = syncer::SyncData::CreateLocalData(
-      TabNodeIdToTag(current_machine_tag(), sync_id), current_session_name_,
-      entity);
-  change_output->push_back(
-      syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data));
+void SessionsSyncManager::OnPageFaviconUpdated(const GURL& page_url) {
+  favicon_cache_.OnPageFaviconUpdated(page_url, base::Time::Now());
 }
 
-// static
-void SessionsSyncManager::SetSessionTabFromDelegate(
-    const SyncedTabDelegate& tab_delegate,
-    base::Time mtime,
-    sessions::SessionTab* session_tab) {
-  DCHECK(session_tab);
-  session_tab->window_id.set_id(tab_delegate.GetWindowId());
-  session_tab->tab_id.set_id(tab_delegate.GetSessionId());
-  session_tab->tab_visual_index = 0;
-  // Use -1 to indicate that the index hasn't been set properly yet.
-  session_tab->current_navigation_index = -1;
-  const SyncedWindowDelegate* window_delegate =
-      synced_window_delegates_getter()->FindById(tab_delegate.GetWindowId());
-  session_tab->pinned =
-      window_delegate ? window_delegate->IsTabPinned(&tab_delegate) : false;
-  session_tab->extension_app_id = tab_delegate.GetExtensionAppId();
-  session_tab->user_agent_override.clear();
-  session_tab->timestamp = mtime;
-  const int current_index = tab_delegate.GetCurrentEntryIndex();
-  const int min_index = std::max(0, current_index - kMaxSyncNavigationCount);
-  const int max_index = std::min(current_index + kMaxSyncNavigationCount,
-                                 tab_delegate.GetEntryCount());
-  bool is_supervised = tab_delegate.ProfileIsSupervised();
-  session_tab->navigations.clear();
-
-  for (int i = min_index; i < max_index; ++i) {
-    if (!tab_delegate.GetVirtualURLAtIndex(i).is_valid())
-      continue;
-    sessions::SerializedNavigationEntry serialized_entry;
-    tab_delegate.GetSerializedNavigationAtIndex(i, &serialized_entry);
-
-    // Set current_navigation_index to the index in navigations.
-    if (i == current_index)
-      session_tab->current_navigation_index = session_tab->navigations.size();
-
-    session_tab->navigations.push_back(serialized_entry);
-    if (is_supervised) {
-      session_tab->navigations.back().set_blocked_state(
-          SerializedNavigationEntry::STATE_ALLOWED);
-    }
-  }
-
-  // If the current navigation is invalid, set the index to the end of the
-  // navigation array.
-  if (session_tab->current_navigation_index < 0) {
-    session_tab->current_navigation_index = session_tab->navigations.size() - 1;
-  }
-
-  if (is_supervised) {
-    int offset = session_tab->navigations.size();
-    const std::vector<std::unique_ptr<const SerializedNavigationEntry>>&
-        blocked_navigations = *tab_delegate.GetBlockedNavigations();
-    for (size_t i = 0; i < blocked_navigations.size(); ++i) {
-      session_tab->navigations.push_back(*blocked_navigations[i]);
-      session_tab->navigations.back().set_index(offset + i);
-      session_tab->navigations.back().set_blocked_state(
-          SerializedNavigationEntry::STATE_BLOCKED);
-      // TODO(bauerb): Add categories
-    }
-  }
-  session_tab->session_storage_persistent_id.clear();
+void SessionsSyncManager::OnFaviconVisited(const GURL& page_url,
+                                           const GURL& favicon_url) {
+  favicon_cache_.OnFaviconVisited(page_url, favicon_url);
 }
 
 FaviconCache* SessionsSyncManager::GetFaviconCache() {
@@ -1041,18 +618,13 @@
 }
 
 SessionsGlobalIdMapper* SessionsSyncManager::GetGlobalIdMapper() {
-  return &global_id_mapper_;
+  return local_session_event_handler_.GetGlobalIdMapper();
 }
 
 OpenTabsUIDelegate* SessionsSyncManager::GetOpenTabsUIDelegate() {
   return &open_tabs_ui_delegate_;
 }
 
-SyncedWindowDelegatesGetter*
-SessionsSyncManager::synced_window_delegates_getter() const {
-  return sessions_client_->GetSyncedWindowDelegatesGetter();
-}
-
 void SessionsSyncManager::DoGarbageCollection() {
   std::vector<const SyncedSession*> sessions;
   if (!session_tracker_.LookupAllForeignSessions(&sessions,
@@ -1084,24 +656,17 @@
                                       TagFromSpecifics(specifics));
 }
 
-bool SessionsSyncManager::ScanForTabbedWindow() {
-  for (auto& window_iter_pair :
-       synced_window_delegates_getter()->GetSyncedWindowDelegates()) {
-    if (window_iter_pair.second->IsTypeTabbed()) {
-      const SyncedWindowDelegate* window_delegate = window_iter_pair.second;
-      if (IsWindowSyncable(*window_delegate)) {
-        // When only custom tab windows are open, often we'll have a seemingly
-        // okay type tabbed window, but GetTabAt will return null for each
-        // index. This case is exactly what this method needs to protect
-        // against.
-        for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
-          if (window_delegate->GetTabAt(j))
-            return true;
-        }
-      }
-    }
+void SessionsSyncManager::ProcessLocalSessionSyncChanges(
+    const syncer::SyncChangeList& change_list) {
+  if (local_tab_pool_out_of_sync_) {
+    // If our tab pool is corrupt, pay the price of a full re-association to
+    // fix things up.  This takes care of the new tab modification as well.
+    bool rebuild_association_succeeded = RebuildAssociations();
+    DCHECK(!rebuild_association_succeeded || !local_tab_pool_out_of_sync_);
+    return;
   }
-  return false;
+
+  sync_processor_->ProcessSyncChanges(FROM_HERE, change_list);
 }
 
 }  // namespace sync_sessions
diff --git a/components/sync_sessions/sessions_sync_manager.h b/components/sync_sessions/sessions_sync_manager.h
index 99a1210..94929cf 100644
--- a/components/sync_sessions/sessions_sync_manager.h
+++ b/components/sync_sessions/sessions_sync_manager.h
@@ -25,13 +25,12 @@
 #include "components/sync/device_info/device_info.h"
 #include "components/sync/model/syncable_service.h"
 #include "components/sync_sessions/favicon_cache.h"
+#include "components/sync_sessions/local_session_event_handler_impl.h"
 #include "components/sync_sessions/local_session_event_router.h"
 #include "components/sync_sessions/lost_navigations_recorder.h"
 #include "components/sync_sessions/open_tabs_ui_delegate_impl.h"
-#include "components/sync_sessions/sessions_global_id_mapper.h"
 #include "components/sync_sessions/synced_session.h"
 #include "components/sync_sessions/synced_session_tracker.h"
-#include "components/sync_sessions/task_tracker.h"
 
 namespace syncer {
 class LocalDeviceInfoProvider;
@@ -50,14 +49,10 @@
 
 namespace sync_sessions {
 
-class SessionsGlobalIdMapper;
-class SyncedTabDelegate;
-class SyncedWindowDelegatesGetter;
-
 // Contains all logic for associating the Chrome sessions model and
 // the sync sessions model.
 class SessionsSyncManager : public syncer::SyncableService,
-                            public LocalSessionEventHandler {
+                            public LocalSessionEventHandlerImpl::Delegate {
  public:
   SessionsSyncManager(SyncSessionsClient* sessions_client,
                       syncer::SyncPrefs* sync_prefs,
@@ -78,10 +73,13 @@
       const base::Location& from_here,
       const syncer::SyncChangeList& change_list) override;
 
-  // LocalSessionEventHandler implementation.
-  void OnLocalTabModified(SyncedTabDelegate* modified_tab) override;
-  void OnFaviconsChanged(const std::set<GURL>& page_urls,
-                         const GURL& icon_url) override;
+  // LocalSessionEventHandlerImpl::Delegate implementation.
+  std::unique_ptr<LocalSessionEventHandlerImpl::WriteBatch>
+  CreateLocalSessionWriteBatch() override;
+  void OnPageFaviconUpdated(const GURL& page_url) override;
+  void OnFaviconVisited(const GURL& page_url, const GURL& favicon_url) override;
+
+  FaviconCache* GetFaviconCache();
 
   // Returns the tag used to uniquely identify this machine's session in the
   // sync model.
@@ -90,8 +88,6 @@
     return current_machine_tag_;
   }
 
-  FaviconCache* GetFaviconCache();
-
   // Triggers garbage collection of stale sessions (as defined by
   // |stale_session_threshold_days_|). This is called every time we see new
   // sessions data downloaded (sync cycles complete).
@@ -104,19 +100,12 @@
  private:
   friend class extensions::ExtensionSessionsTest;
   friend class SessionsSyncManagerTest;
-  FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, SetSessionTabFromDelegate);
-  FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
-                           SetSessionTabFromDelegateNavigationIndex);
-  FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
-                           SetSessionTabFromDelegateCurrentInvalid);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, BlockedNavigations);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, DeleteForeignSession);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
                            ProcessForeignDeleteTabsWithShadowing);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
                            ProcessForeignDeleteTabsWithReusedNodeIds);
-  FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
-                           SaveUnassociatedNodesForReassociation);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, MergeDeletesBadHash);
   FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
                            MergeLocalSessionExistingTabs);
@@ -156,67 +145,6 @@
   // Same as above but it also notifies the processor.
   void DeleteForeignSessionFromUI(const std::string& tag);
 
-  // Resync local window information. Updates the local sessions header node
-  // with the status of open windows and the order of tabs they contain. Should
-  // only be called for changes that affect a window, not a change within a
-  // single tab.
-  //
-  // RELOAD_TABS will additionally cause a resync of all tabs (same as calling
-  // AssociateTabs with a vector of all tabs).
-  //
-  // Returns: false if the local session's sync nodes were deleted and
-  // reassociation is necessary, true otherwise.
-  //
-  // |change_output| *must* be provided as a link to the SyncChange pipeline
-  // that exists in the caller's context. This function will append necessary
-  // changes for processing later.
-  enum ReloadTabsOption { RELOAD_TABS, DONT_RELOAD_TABS };
-  void AssociateWindows(ReloadTabsOption option,
-                        bool has_tabbed_window,
-                        syncer::SyncChangeList* change_output);
-
-  // Loads and reassociates the local tabs referenced in |tabs|.
-  // |change_output| *must* be provided as a link to the SyncChange pipeline
-  // that exists in the caller's context. This function will append necessary
-  // changes for processing later. Will only assign a new sync id if there is
-  // a tabbed window, which results in failure for tabs without sync ids yet.
-  void AssociateTab(SyncedTabDelegate* const tab,
-                    bool has_tabbed_window,
-                    syncer::SyncChangeList* change_output);
-
-  // Set |session_tab| from |tab_delegate| and |mtime|.
-  void SetSessionTabFromDelegate(const SyncedTabDelegate& tab_delegate,
-                                 base::Time mtime,
-                                 sessions::SessionTab* session_tab);
-
-  // Populates |specifics| based on the data in |tab_delegate|.
-  void LocalTabDelegateToSpecifics(const SyncedTabDelegate& tab_delegate,
-                                   sync_pb::SessionSpecifics* specifics);
-
-  // Updates task tracker with the navigations of |tab_delegate|.
-  void UpdateTaskTracker(SyncedTabDelegate* const tab_delegate);
-
-  // Update |tab_specifics| with the corresponding task ids.
-  void WriteTasksIntoSpecifics(sync_pb::SessionTab* tab_specifics);
-
-  // It's possible that when we associate windows, tabs aren't all loaded
-  // into memory yet (e.g on android) and we don't have a WebContents. In this
-  // case we can't do a full association, but we still want to update tab IDs
-  // as they may have changed after a session was restored.  This method
-  // compares new_tab_id and new_window_id against the previously persisted tab
-  // ID and window ID (from our TabNodePool) and updates them if either differs.
-  void AssociateRestoredPlaceholderTab(
-      const SyncedTabDelegate& tab_delegate,
-      SessionID::id_type new_tab_id,
-      SessionID::id_type new_window_id,
-      syncer::SyncChangeList* change_output);
-
-  // Appends an ACTION_UPDATE for a sync tab entity onto |change_output| to
-  // reflect the contents of |tab|, given the tab node id |sync_id|.
-  void AppendChangeForExistingTab(int sync_id,
-                                  const sessions::SessionTab& tab,
-                                  syncer::SyncChangeList* change_output);
-
   // Stops and re-starts syncing to rebuild association mappings. Returns true
   // when re-starting succeeds.
   // See |local_tab_pool_out_of_sync_|.
@@ -232,21 +160,16 @@
   static std::string TagHashFromSpecifics(
       const sync_pb::SessionSpecifics& specifics);
 
-  SyncedWindowDelegatesGetter* synced_window_delegates_getter() const;
-
-  // On Android, it's possible to not have any tabbed windows when only custom
-  // tabs are currently open. This means that there is tab data that will be
-  // restored later, but we cannot access it. This method is an elaborate way to
-  // check if we're currently in that state or not.
-  bool ScanForTabbedWindow();
+  void ProcessLocalSessionSyncChanges(
+      const syncer::SyncChangeList& change_list);
 
   // The client of this sync sessions datatype.
   SyncSessionsClient* const sessions_client_;
 
   SyncedSessionTracker session_tracker_;
   FaviconCache favicon_cache_;
-  SessionsGlobalIdMapper global_id_mapper_;
   OpenTabsUIDelegateImpl open_tabs_ui_delegate_;
+  LocalSessionEventHandlerImpl local_session_event_handler_;
 
   // Tracks whether our local representation of which sync nodes map to what
   // tabs (belonging to the current local session) is inconsistent.  This can
@@ -288,10 +211,6 @@
   // Callback to inform interested observer that new sessions data has arrived.
   base::RepeatingClosure sessions_updated_callback_;
 
-  // Tracks Chrome Tasks, which associates navigations, with tab and navigation
-  // changes of current session.
-  std::unique_ptr<TaskTracker> task_tracker_;
-
   DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
 };
 
diff --git a/components/sync_sessions/sessions_sync_manager_unittest.cc b/components/sync_sessions/sessions_sync_manager_unittest.cc
index 54dc8c2..b1161a8 100644
--- a/components/sync_sessions/sessions_sync_manager_unittest.cc
+++ b/components/sync_sessions/sessions_sync_manager_unittest.cc
@@ -6,12 +6,9 @@
 
 #include <stdint.h>
 
-#include <utility>
-
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "build/build_config.h"
-#include "components/sessions/core/serialized_navigation_entry_test_helper.h"
 #include "components/sync/device_info/local_device_info_provider_mock.h"
 #include "components/sync/driver/fake_sync_client.h"
 #include "components/sync/driver/sync_api_component_factory.h"
@@ -19,14 +16,10 @@
 #include "components/sync_sessions/mock_sync_sessions_client.h"
 #include "components/sync_sessions/session_sync_test_helper.h"
 #include "components/sync_sessions/sync_sessions_client.h"
-#include "components/sync_sessions/synced_tab_delegate.h"
-#include "components/sync_sessions/synced_window_delegate.h"
-#include "components/sync_sessions/synced_window_delegates_getter.h"
+#include "components/sync_sessions/test_synced_window_delegates_getter.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using sessions::SerializedNavigationEntry;
-using sessions::SerializedNavigationEntryTestHelper;
 using syncer::DeviceInfo;
 using syncer::LocalDeviceInfoProvider;
 using syncer::LocalDeviceInfoProviderMock;
@@ -41,7 +34,6 @@
 
 namespace {
 
-const char kTitle[] = "title";
 const char kFoo1[] = "http://foo1/";
 const char kFoo2[] = "http://foo2/";
 const char kBar1[] = "http://bar1/";
@@ -53,14 +45,6 @@
 const int kTabIds1[] = {5, 10, 13, 17};
 const int kTabIds2[] = {7, 15, 18, 20};
 
-const base::Time kTime0 = base::Time::FromInternalValue(100);
-const base::Time kTime1 = base::Time::FromInternalValue(110);
-const base::Time kTime2 = base::Time::FromInternalValue(120);
-const base::Time kTime3 = base::Time::FromInternalValue(130);
-const base::Time kTime4 = base::Time::FromInternalValue(140);
-const base::Time kTime5 = base::Time::FromInternalValue(150);
-const base::Time kTime6 = base::Time::FromInternalValue(190);
-
 std::string TabNodeIdToTag(const std::string& machine_tag, int tab_node_id) {
   return base::StringPrintf("%s %d", machine_tag.c_str(), tab_node_id);
 }
@@ -138,279 +122,6 @@
   bool notified_of_update_;
 };
 
-// A SyncedTabDelegate fake for testing. It simulates a normal
-// SyncedTabDelegate with a proper WebContents. For a SyncedTabDelegate without
-// a WebContents, see PlaceholderTabDelegate below.
-class TestSyncedTabDelegate : public SyncedTabDelegate {
- public:
-  TestSyncedTabDelegate() {}
-  ~TestSyncedTabDelegate() override {}
-
-  // SyncedTabDelegate overrides.
-  bool IsInitialBlankNavigation() const override {
-    // This differs from NavigationControllerImpl, which has an initial blank
-    // NavigationEntry.
-    return GetEntryCount() == 0;
-  }
-  int GetCurrentEntryIndex() const override { return current_entry_index_; }
-  GURL GetVirtualURLAtIndex(int i) const override {
-    if (static_cast<size_t>(i) >= entries_.size())
-      return GURL();
-    return entries_[i]->virtual_url();
-  }
-  GURL GetFaviconURLAtIndex(int i) const override { return GURL(); }
-  ui::PageTransition GetTransitionAtIndex(int i) const override {
-    if (static_cast<size_t>(i) >= entries_.size())
-      return ui::PAGE_TRANSITION_LINK;
-    return entries_[i]->transition_type();
-  }
-  void GetSerializedNavigationAtIndex(
-      int i,
-      sessions::SerializedNavigationEntry* serialized_entry) const override {
-    if (static_cast<size_t>(i) >= entries_.size())
-      return;
-    *serialized_entry = *entries_[i];
-  }
-  int GetEntryCount() const override { return entries_.size(); }
-  SessionID::id_type GetWindowId() const override { return window_id_.id(); }
-  SessionID::id_type GetSessionId() const override { return tab_id_.id(); }
-  bool IsBeingDestroyed() const override { return false; }
-  std::string GetExtensionAppId() const override { return std::string(); }
-  bool ProfileIsSupervised() const override { return is_supervised_; }
-  void set_is_supervised(bool is_supervised) { is_supervised_ = is_supervised; }
-  const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
-  GetBlockedNavigations() const override {
-    return &blocked_navigations_;
-  }
-  bool IsPlaceholderTab() const override { return false; }
-  int GetSyncId() const override { return sync_id_; }
-  void SetSyncId(int sync_id) override { sync_id_ = sync_id; }
-  bool ShouldSync(SyncSessionsClient* sessions_client) override {
-    // This is just a simple filter that isn't meant to fully reproduce
-    // the TabContentsTabDelegate's ShouldSync logic.
-    // Verify all URL's are valid (which will ignore an initial blank page) and
-    // that there is at least one http:// url.
-    int http_count = 0;
-    for (auto& entry : entries_) {
-      if (!entry->virtual_url().is_valid())
-        return false;
-      if (entry->virtual_url().SchemeIsHTTPOrHTTPS())
-        http_count++;
-    }
-    return http_count > 0;
-  }
-
-  SessionID::id_type GetSourceTabID() const override { return kInvalidTabID; }
-
-  void AppendEntry(std::unique_ptr<sessions::SerializedNavigationEntry> entry) {
-    entries_.push_back(std::move(entry));
-  }
-
-  void set_current_entry_index(int i) { current_entry_index_ = i; }
-
-  void SetWindowId(SessionID::id_type window_id) {
-    window_id_.set_id(window_id);
-  }
-
-  void SetSessionId(SessionID::id_type id) { tab_id_.set_id(id); }
-
-  void set_blocked_navigations(
-      const std::vector<std::unique_ptr<sessions::SerializedNavigationEntry>>&
-          navs) {
-    for (auto& entry : navs) {
-      blocked_navigations_.push_back(
-          std::make_unique<sessions::SerializedNavigationEntry>(*entry));
-    }
-  }
-
-  void reset() {
-    current_entry_index_ = 0;
-    sync_id_ = TabNodePool::kInvalidTabNodeID;
-    entries_.clear();
-  }
-
- private:
-  int current_entry_index_ = -1;
-  bool is_supervised_ = false;
-  int sync_id_ = kInvalidTabID;
-  SessionID tab_id_;
-  SessionID window_id_;
-  std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
-      blocked_navigations_;
-  std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
-      entries_;
-};
-
-// A placeholder delegate. These delegates have no WebContents, simulating a tab
-// that has been restored without bringing its state fully into memory (for
-// example on Android), or where the tab's contents have been evicted from
-// memory. See SyncedTabDelegate::IsPlaceHolderTab for more info.
-class PlaceholderTabDelegate : public SyncedTabDelegate {
- public:
-  PlaceholderTabDelegate(SessionID::id_type session_id, int sync_id)
-      : session_id_(session_id), sync_id_(sync_id) {}
-  ~PlaceholderTabDelegate() override {}
-
-  // SyncedTabDelegate overrides.
-  SessionID::id_type GetSessionId() const override { return session_id_; }
-  int GetSyncId() const override { return sync_id_; }
-  void SetSyncId(int sync_id) override { sync_id_ = sync_id; }
-  bool IsPlaceholderTab() const override { return true; }
-
-  // Everything else is invalid to invoke as it depends on a valid WebContents.
-  SessionID::id_type GetWindowId() const override {
-    NOTREACHED();
-    return 0;
-  }
-  bool IsBeingDestroyed() const override {
-    NOTREACHED();
-    return false;
-  }
-  std::string GetExtensionAppId() const override {
-    NOTREACHED();
-    return "";
-  }
-  bool IsInitialBlankNavigation() const override {
-    NOTREACHED();
-    return false;
-  }
-  int GetCurrentEntryIndex() const override {
-    NOTREACHED();
-    return 0;
-  }
-  int GetEntryCount() const override {
-    NOTREACHED();
-    return 0;
-  }
-  GURL GetVirtualURLAtIndex(int i) const override {
-    NOTREACHED();
-    return GURL();
-  }
-  GURL GetFaviconURLAtIndex(int i) const override {
-    NOTREACHED();
-    return GURL();
-  }
-  ui::PageTransition GetTransitionAtIndex(int i) const override {
-    NOTREACHED();
-    return ui::PageTransition();
-  }
-  void GetSerializedNavigationAtIndex(
-      int i,
-      sessions::SerializedNavigationEntry* serialized_entry) const override {
-    NOTREACHED();
-  }
-  bool ProfileIsSupervised() const override {
-    NOTREACHED();
-    return false;
-  }
-  const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
-  GetBlockedNavigations() const override {
-    NOTREACHED();
-    return nullptr;
-  }
-  bool ShouldSync(SyncSessionsClient* sessions_client) override {
-    NOTREACHED();
-    return false;
-  }
-
-  SessionID::id_type GetSourceTabID() const override { return kInvalidTabID; }
-
- private:
-  SessionID::id_type session_id_;
-  int sync_id_ = kInvalidTabID;
-};
-
-class TestSyncedWindowDelegate : public SyncedWindowDelegate {
- public:
-  TestSyncedWindowDelegate() {}
-  ~TestSyncedWindowDelegate() override {}
-
-  bool HasWindow() const override { return true; }
-
-  SessionID::id_type GetSessionId() const override { return window_id_.id(); }
-
-  int GetTabCount() const override { return tab_delegates_.size(); }
-
-  int GetActiveIndex() const override { return 0; }
-
-  bool IsApp() const override { return false; }
-
-  bool IsTypeTabbed() const override {
-    return window_type_ == sync_pb::SessionWindow_BrowserType_TYPE_TABBED;
-  }
-
-  bool IsTypePopup() const override {
-    return window_type_ == sync_pb::SessionWindow_BrowserType_TYPE_POPUP;
-  }
-
-  bool IsTabPinned(const SyncedTabDelegate* tab) const override {
-    return false;
-  }
-
-  void OverrideWindowTypeToCustomTab() {
-    window_type_ = sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB;
-  }
-
-  SyncedTabDelegate* GetTabAt(int index) const override {
-    if (tab_delegates_.find(index) != tab_delegates_.end())
-      return tab_delegates_.find(index)->second;
-
-    return nullptr;
-  }
-
-  void OverrideWindowId(SessionID::id_type id) { window_id_.set_id(id); }
-
-  void OverrideTabAt(int index, SyncedTabDelegate* delegate) {
-    tab_delegates_[index] = delegate;
-  }
-
-  SessionID::id_type GetTabIdAt(int index) const override {
-    SyncedTabDelegate* delegate = GetTabAt(index);
-    if (!delegate)
-      return kInvalidTabID;
-    return delegate->GetSessionId();
-  }
-
-  bool IsSessionRestoreInProgress() const override { return false; }
-
-  bool ShouldSync() const override { return true; }
-
- private:
-  std::map<int, SyncedTabDelegate*> tab_delegates_;
-  SessionID window_id_;
-  sync_pb::SessionWindow_BrowserType window_type_ =
-      sync_pb::SessionWindow_BrowserType_TYPE_TABBED;
-  std::map<int, SyncedTabDelegate*> tab_overrides_;
-  std::map<int, SessionID::id_type> tab_id_overrides_;
-};
-
-class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter {
- public:
-  TestSyncedWindowDelegatesGetter() {}
-  ~TestSyncedWindowDelegatesGetter() override {}
-
-  SyncedWindowDelegateMap GetSyncedWindowDelegates() override {
-    return delegates_;
-  }
-
-  const SyncedWindowDelegate* FindById(SessionID::id_type id) override {
-    for (auto window_iter_pair : delegates_) {
-      if (window_iter_pair.second->GetSessionId() == id)
-        return window_iter_pair.second;
-    }
-    return nullptr;
-  }
-
-  void AddSyncedWindowDelegate(const SyncedWindowDelegate* delegate) {
-    delegates_[delegate->GetSessionId()] = delegate;
-  }
-
-  void ClearSyncedWindowDelegates() { delegates_.clear(); }
-
- private:
-  SyncedWindowDelegateMap delegates_;
-};
-
 class TestSyncChangeProcessor : public syncer::SyncChangeProcessor {
  public:
   explicit TestSyncChangeProcessor(SyncChangeList* output) : output_(output) {}
@@ -460,23 +171,6 @@
   base::ObserverList<syncer::LocalChangeObserver> local_change_observers_;
 };
 
-class DummyRouter : public LocalSessionEventRouter {
- public:
-  ~DummyRouter() override {}
-  void StartRoutingTo(LocalSessionEventHandler* handler) override {
-    handler_ = handler;
-  }
-  void Stop() override { handler_ = nullptr; }
-
-  void NotifyNav(SyncedTabDelegate* tab) {
-    if (handler_)
-      handler_->OnLocalTabModified(tab);
-  }
-
- private:
-  LocalSessionEventHandler* handler_ = nullptr;
-};
-
 }  // namespace
 
 class SessionsSyncManagerTest : public testing::Test {
@@ -491,10 +185,9 @@
     sync_client_ = std::make_unique<syncer::FakeSyncClient>();
     sync_prefs_ =
         std::make_unique<syncer::SyncPrefs>(sync_client_->GetPrefService());
-    router_ = std::make_unique<DummyRouter>();
     manager_ = std::make_unique<SessionsSyncManager>(
         &mock_sync_sessions_client_, sync_prefs_.get(), local_device_.get(),
-        router_.get(),
+        window_getter_.router(),
         base::Bind(&SessionNotificationObserver::NotifyOfUpdate,
                    base::Unretained(&observer_)));
   }
@@ -519,7 +212,6 @@
   LocalDeviceInfoProvider* local_device() { return local_device_.get(); }
   SessionNotificationObserver* observer() { return &observer_; }
   syncer::SyncPrefs* sync_prefs() { return sync_prefs_.get(); }
-  SyncedWindowDelegatesGetter* window_getter() { return &window_getter_; }
 
   void InitWithSyncDataTakeOutput(const SyncDataList& initial_data,
                                   SyncChangeList* output) {
@@ -645,92 +337,6 @@
         SessionsSyncManager::TagHashFromSpecifics(entity.session()));
   }
 
-  // Creates a new tab within the window specified by |window_id|, and points it
-  // at |url|. Returns the newly created TestSyncedTabDelegate (not owned).
-  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
-                                const std::string& url,
-                                base::Time time) {
-    tabs_.push_back(std::make_unique<TestSyncedTabDelegate>());
-    for (auto& window : windows_) {
-      if (window->GetSessionId() == window_id) {
-        int tab_index = window->GetTabCount();
-        window->OverrideTabAt(tab_index, tabs_.back().get());
-      }
-    }
-
-    // Simulate the browser firing a tab parented notification, ahead of the
-    // actual navigation.
-    router_->NotifyNav(tabs_.back().get());
-
-    // Now do the actual navigation.
-    NavigateTab(tabs_.back().get(), url, time);
-    return tabs_.back().get();
-  }
-  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
-                                const std::string& url) {
-    return AddTab(window_id, url, base::Time::Now());
-  }
-
-  void NavigateTab(TestSyncedTabDelegate* delegate,
-                   const std::string& url,
-                   base::Time time,
-                   ui::PageTransition transition) {
-    sync_pb::TabNavigation tab_navigation;
-    tab_navigation.set_virtual_url(url);
-    tab_navigation.set_title(kTitle);
-    tab_navigation.set_global_id(time.ToInternalValue());
-    tab_navigation.set_unique_id(time.ToInternalValue());
-    tab_navigation.set_http_status_code(200);
-
-    auto entry = std::make_unique<sessions::SerializedNavigationEntry>(
-        sessions::SerializedNavigationEntry::FromSyncData(0, tab_navigation));
-    SerializedNavigationEntryTestHelper::SetTimestamp(time, entry.get());
-    SerializedNavigationEntryTestHelper::SetTransitionType(transition,
-                                                           entry.get());
-
-    delegate->AppendEntry(std::move(entry));
-    delegate->set_current_entry_index(delegate->GetCurrentEntryIndex() + 1);
-    router_->NotifyNav(delegate);
-  }
-  void NavigateTab(TestSyncedTabDelegate* delegate,
-                   const std::string& url,
-                   base::Time time) {
-    NavigateTab(delegate, url, time, ui::PAGE_TRANSITION_TYPED);
-  }
-  void NavigateTab(TestSyncedTabDelegate* delegate, const std::string& url) {
-    NavigateTab(delegate, url, base::Time::Now());
-  }
-  void NavigateTab(TestSyncedTabDelegate* delegate,
-                   const std::string& url,
-                   ui::PageTransition transition) {
-    NavigateTab(delegate, url, base::Time::Now(), transition);
-  }
-
-  void ReloadTab(TestSyncedTabDelegate* delegate, base::Time time) {
-    sessions::SerializedNavigationEntry old_entry;
-    delegate->GetSerializedNavigationAtIndex(delegate->GetCurrentEntryIndex(),
-                                             &old_entry);
-
-    auto new_entry =
-        std::make_unique<sessions::SerializedNavigationEntry>(old_entry);
-    SerializedNavigationEntryTestHelper::SetTimestamp(time, new_entry.get());
-
-    delegate->reset();
-    delegate->AppendEntry(std::move(new_entry));
-    router_->NotifyNav(delegate);
-  }
-
-  void ResetWindows() {
-    window_getter_.ClearSyncedWindowDelegates();
-    windows_.clear();
-  }
-
-  TestSyncedWindowDelegate* AddWindow() {
-    windows_.push_back(std::make_unique<TestSyncedWindowDelegate>());
-    window_getter_.AddSyncedWindowDelegate(windows_.back().get());
-    return windows_.back().get();
-  }
-
   syncer::SyncDataList GetDataFromChanges(
       const syncer::SyncChangeList& changes) {
     syncer::SyncDataList data_list;
@@ -759,172 +365,33 @@
     return out;
   }
 
+  void ResetWindows() { return window_getter_.ResetWindows(); }
+
+  TestSyncedWindowDelegate* AddWindow(
+      sync_pb::SessionWindow_BrowserType type =
+          sync_pb::SessionWindow_BrowserType_TYPE_TABBED) {
+    return window_getter_.AddWindow(type);
+  }
+
+  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
+                                const std::string& url) {
+    TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id);
+    tab->Navigate(url);
+    return tab;
+  }
+
  private:
   std::unique_ptr<syncer::FakeSyncClient> sync_client_;
   testing::NiceMock<MockSyncSessionsClient> mock_sync_sessions_client_;
   std::unique_ptr<syncer::SyncPrefs> sync_prefs_;
   SessionNotificationObserver observer_;
-  std::unique_ptr<DummyRouter> router_;
   std::unique_ptr<SessionsSyncManager> manager_;
   SessionSyncTestHelper helper_;
   TestSyncChangeProcessor* test_processor_ = nullptr;
   TestSyncedWindowDelegatesGetter window_getter_;
-  std::vector<std::unique_ptr<TestSyncedWindowDelegate>> windows_;
-  std::vector<std::unique_ptr<TestSyncedTabDelegate>> tabs_;
   std::unique_ptr<LocalDeviceInfoProviderMock> local_device_;
 };
 
-// entries and make sure that setting a SessionTab from it preserves
-// those entries (and clobbers any existing data).
-TEST_F(SessionsSyncManagerTest, SetSessionTabFromDelegate) {
-  // Create a tab with three valid entries.
-  TestSyncedTabDelegate* tab =
-      AddTab(AddWindow()->GetSessionId(), kFoo1, kTime1);
-  NavigateTab(tab, kBar1, kTime2);
-  NavigateTab(tab, kBaz1, kTime3);
-
-  sessions::SessionTab session_tab;
-  session_tab.window_id.set_id(1);
-  session_tab.tab_id.set_id(1);
-  session_tab.tab_visual_index = 1;
-  session_tab.current_navigation_index = 1;
-  session_tab.pinned = true;
-  session_tab.extension_app_id = "app id";
-  session_tab.user_agent_override = "override";
-  session_tab.timestamp = kTime5;
-  session_tab.navigations.push_back(
-      SerializedNavigationEntryTestHelper::CreateNavigation(
-          "http://www.example.com", "Example"));
-  session_tab.session_storage_persistent_id = "persistent id";
-  manager()->SetSessionTabFromDelegate(*tab, kTime4, &session_tab);
-
-  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
-  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
-  EXPECT_EQ(0, session_tab.tab_visual_index);
-  EXPECT_EQ(tab->GetCurrentEntryIndex(), session_tab.current_navigation_index);
-  EXPECT_FALSE(session_tab.pinned);
-  EXPECT_TRUE(session_tab.extension_app_id.empty());
-  EXPECT_TRUE(session_tab.user_agent_override.empty());
-  EXPECT_EQ(kTime4, session_tab.timestamp);
-  ASSERT_EQ(3u, session_tab.navigations.size());
-  EXPECT_EQ(GURL(kFoo1), session_tab.navigations[0].virtual_url());
-  EXPECT_EQ(GURL(kBar1), session_tab.navigations[1].virtual_url());
-  EXPECT_EQ(GURL(kBaz1), session_tab.navigations[2].virtual_url());
-  EXPECT_EQ(kTime1, session_tab.navigations[0].timestamp());
-  EXPECT_EQ(kTime2, session_tab.navigations[1].timestamp());
-  EXPECT_EQ(kTime3, session_tab.navigations[2].timestamp());
-  EXPECT_EQ(200, session_tab.navigations[0].http_status_code());
-  EXPECT_EQ(200, session_tab.navigations[1].http_status_code());
-  EXPECT_EQ(200, session_tab.navigations[2].http_status_code());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
-            session_tab.navigations[0].blocked_state());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
-            session_tab.navigations[1].blocked_state());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_INVALID,
-            session_tab.navigations[2].blocked_state());
-  EXPECT_TRUE(session_tab.session_storage_persistent_id.empty());
-}
-
-// Ensure the current_navigation_index gets set properly when the navigation
-// stack gets trucated to +/- 6 entries.
-TEST_F(SessionsSyncManagerTest, SetSessionTabFromDelegateNavigationIndex) {
-  TestSyncedTabDelegate* tab = AddTab(AddWindow()->GetSessionId(), kFoo1);
-  const int kNavs = 10;
-  for (int i = 1; i < kNavs; ++i) {
-    NavigateTab(tab, base::StringPrintf("http://foo%i", i));
-  }
-  tab->set_current_entry_index(kNavs - 2);
-
-  sessions::SessionTab session_tab;
-  manager()->SetSessionTabFromDelegate(*tab, kTime6, &session_tab);
-
-  EXPECT_EQ(6, session_tab.current_navigation_index);
-  ASSERT_EQ(8u, session_tab.navigations.size());
-  EXPECT_EQ(GURL("http://foo2"), session_tab.navigations[0].virtual_url());
-  EXPECT_EQ(GURL("http://foo3"), session_tab.navigations[1].virtual_url());
-  EXPECT_EQ(GURL("http://foo4"), session_tab.navigations[2].virtual_url());
-}
-
-// Ensure the current_navigation_index gets set to the end of the navigation
-// stack if the current navigation is invalid.
-TEST_F(SessionsSyncManagerTest, SetSessionTabFromDelegateCurrentInvalid) {
-  TestSyncedTabDelegate* tab =
-      AddTab(AddWindow()->GetSessionId(), kFoo1, kTime0);
-  NavigateTab(tab, std::string(""), kTime1);
-  NavigateTab(tab, kBar1, kTime2);
-  NavigateTab(tab, kBar2, kTime3);
-  tab->set_current_entry_index(1);
-
-  sessions::SessionTab session_tab;
-  manager()->SetSessionTabFromDelegate(*tab, kTime6, &session_tab);
-
-  EXPECT_EQ(2, session_tab.current_navigation_index);
-  ASSERT_EQ(3u, session_tab.navigations.size());
-}
-
-// Tests that for supervised users blocked navigations are recorded and marked
-// as such, while regular navigations are marked as allowed.
-TEST_F(SessionsSyncManagerTest, BlockedNavigations) {
-  TestSyncedTabDelegate* tab =
-      AddTab(AddWindow()->GetSessionId(), kFoo1, kTime1);
-
-  auto entry2 = std::make_unique<sessions::SerializedNavigationEntry>();
-  GURL url2("http://blocked.com/foo");
-  SerializedNavigationEntryTestHelper::SetVirtualURL(GURL(url2), entry2.get());
-  SerializedNavigationEntryTestHelper::SetTimestamp(kTime2, entry2.get());
-
-  auto entry3 = std::make_unique<sessions::SerializedNavigationEntry>();
-  GURL url3("http://evil.com");
-  SerializedNavigationEntryTestHelper::SetVirtualURL(GURL(url3), entry3.get());
-  SerializedNavigationEntryTestHelper::SetTimestamp(kTime3, entry3.get());
-
-  std::vector<std::unique_ptr<sessions::SerializedNavigationEntry>>
-      blocked_navigations;
-  blocked_navigations.push_back(std::move(entry2));
-  blocked_navigations.push_back(std::move(entry3));
-
-  tab->set_is_supervised(true);
-  tab->set_blocked_navigations(blocked_navigations);
-
-  sessions::SessionTab session_tab;
-  session_tab.window_id.set_id(1);
-  session_tab.tab_id.set_id(1);
-  session_tab.tab_visual_index = 1;
-  session_tab.current_navigation_index = 1;
-  session_tab.pinned = true;
-  session_tab.extension_app_id = "app id";
-  session_tab.user_agent_override = "override";
-  session_tab.timestamp = kTime5;
-  session_tab.navigations.push_back(
-      SerializedNavigationEntryTestHelper::CreateNavigation(
-          "http://www.example.com", "Example"));
-  session_tab.session_storage_persistent_id = "persistent id";
-  manager()->SetSessionTabFromDelegate(*tab, kTime4, &session_tab);
-
-  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
-  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
-  EXPECT_EQ(0, session_tab.tab_visual_index);
-  EXPECT_EQ(0, session_tab.current_navigation_index);
-  EXPECT_FALSE(session_tab.pinned);
-  EXPECT_TRUE(session_tab.extension_app_id.empty());
-  EXPECT_TRUE(session_tab.user_agent_override.empty());
-  EXPECT_EQ(kTime4, session_tab.timestamp);
-  ASSERT_EQ(3u, session_tab.navigations.size());
-  EXPECT_EQ(GURL(kFoo1), session_tab.navigations[0].virtual_url());
-  EXPECT_EQ(url2, session_tab.navigations[1].virtual_url());
-  EXPECT_EQ(url3, session_tab.navigations[2].virtual_url());
-  EXPECT_EQ(kTime1, session_tab.navigations[0].timestamp());
-  EXPECT_EQ(kTime2, session_tab.navigations[1].timestamp());
-  EXPECT_EQ(kTime3, session_tab.navigations[2].timestamp());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_ALLOWED,
-            session_tab.navigations[0].blocked_state());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_BLOCKED,
-            session_tab.navigations[1].blocked_state());
-  EXPECT_EQ(SerializedNavigationEntry::STATE_BLOCKED,
-            session_tab.navigations[2].blocked_state());
-  EXPECT_TRUE(session_tab.session_storage_persistent_id.empty());
-}
-
 // Tests that the local session header objects is created properly in
 // presence of no other session activity, once and only once.
 TEST_F(SessionsSyncManagerTest, MergeLocalSessionNoTabs) {
@@ -962,7 +429,7 @@
 
   // Set up one tab and start sync with it.
   TestSyncedTabDelegate* tab = AddTab(AddWindow()->GetSessionId(), kFoo1);
-  NavigateTab(tab, kFoo2);
+  tab->Navigate(kFoo2);
   InitWithSyncDataTakeOutput(in, &out);
 
   // There should be two entities, a header and a tab.
@@ -995,7 +462,7 @@
   // Now actually resurrect the native data, which will end up having different
   // native ids, but the tab has the same sync id as before.
   AddWindow()->OverrideTabAt(0, tab);
-  NavigateTab(tab, kBar1);
+  tab->Navigate(kBar1);
 
   ASSERT_TRUE(ChangeTypeMatches(
       out, {SyncChange::ACTION_UPDATE, SyncChange::ACTION_UPDATE}));
@@ -1012,7 +479,7 @@
   // Set up one tab and start sync with it.
   TestSyncedWindowDelegate* window = AddWindow();
   TestSyncedTabDelegate* tab = AddTab(window->GetSessionId(), kFoo1);
-  NavigateTab(tab, kFoo2);
+  tab->Navigate(kFoo2);
   InitWithSyncDataTakeOutput(in, &out);
 
   // There should be two entities, a header and a tab.
@@ -1022,13 +489,9 @@
 
   // Resync, using the previous sync data, but with only a custom tab open.
   manager()->StopSyncing(syncer::SESSIONS);
-  window->OverrideWindowTypeToCustomTab();
-  SessionID new_window_id;
-  window->OverrideWindowId(new_window_id.id());
-  std::unique_ptr<TestSyncedTabDelegate> custom_tab =
-      std::make_unique<TestSyncedTabDelegate>();
-  NavigateTab(custom_tab.get(), kBar1);
-  window->OverrideTabAt(0, custom_tab.get());
+  ResetWindows();
+  window = AddWindow(sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB);
+  TestSyncedTabDelegate* custom_tab = AddTab(window->GetSessionId(), kBar1);
   InitWithSyncDataTakeOutput(ConvertToRemote(in), &out);
 
   // The previous session should be preserved. The transient window cannot be
@@ -1044,7 +507,7 @@
   // Now re-create local data and modify it.
   TestSyncedWindowDelegate* alive_again = AddWindow();
   alive_again->OverrideTabAt(0, tab);
-  NavigateTab(tab, kBaz1);
+  tab->Navigate(kBaz1);
 
   // The local change should be created and tracked correctly. This doesn't
   // actually start syncing the custom tab yet, because the tab itself isn't
@@ -1056,7 +519,7 @@
   out.clear();
 
   // Now trigger OnLocalTabModified() for the custom tab again, it should sync.
-  NavigateTab(custom_tab.get(), kBar2);
+  custom_tab->Navigate(kBar2);
   ASSERT_TRUE(ChangeTypeMatches(
       out, {SyncChange::ACTION_ADD, SyncChange::ACTION_UPDATE}));
   VerifyLocalTabChange(out[0], 2, kBar2);
@@ -1091,10 +554,8 @@
   PlaceholderTabDelegate tab2(SessionID().id(), conflicting_sync_id);
   window->OverrideTabAt(0, &tab2);
 
-  TestSyncedWindowDelegate* window2 = AddWindow();
-  SessionID new_window_id;
-  window2->OverrideWindowId(new_window_id.id());
-  window2->OverrideWindowTypeToCustomTab();
+  TestSyncedWindowDelegate* window2 =
+      AddWindow(sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB);
   TestSyncedTabDelegate* tab3 = AddTab(window2->GetSessionId(), kBar1);
   tab3->SetSyncId(conflicting_sync_id);
   window2->OverrideTabAt(0, tab3);
@@ -1186,10 +647,10 @@
   TestSyncedWindowDelegate* window = AddWindow();
   SessionID::id_type window_id = window->GetSessionId();
   TestSyncedTabDelegate* tab = AddTab(window_id, kFoo1);
-  NavigateTab(tab, kBar1);  // Adds back entry.
-  NavigateTab(tab, kBaz1);  // Adds back entry.
+  tab->Navigate(kBar1);  // Adds back entry.
+  tab->Navigate(kBaz1);  // Adds back entry.
   TestSyncedTabDelegate* tab2 = AddTab(window_id, kFoo2);
-  NavigateTab(tab2, kBar2);  // Adds back entry.
+  tab2->Navigate(kBar2);  // Adds back entry.
 
   SyncChangeList out;
   InitWithSyncDataTakeOutput(SyncDataList(), &out);
@@ -1222,7 +683,7 @@
 TEST_F(SessionsSyncManagerTest, MergeWithLocalAndForeignTabs) {
   // Local.
   TestSyncedTabDelegate* tab = AddTab(AddWindow()->GetSessionId(), kFoo1);
-  NavigateTab(tab, kFoo2);
+  tab->Navigate(kFoo2);
 
   // Foreign.
   std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
@@ -1268,7 +729,7 @@
 TEST_F(SessionsSyncManagerTest, UpdatesAfterMixedMerge) {
   // Add local and foreign data.
   TestSyncedTabDelegate* tab = AddTab(AddWindow()->GetSessionId(), kFoo1);
-  NavigateTab(tab, kFoo2);
+  tab->Navigate(kFoo2);
   AddTab(AddWindow()->GetSessionId(), kBar1);
 
   SyncDataList foreign_data1;
@@ -1811,7 +1272,7 @@
   changes.clear();
 
   // Update the original tab. Ensure the same tab node is updated.
-  NavigateTab(tab, kFoo2);
+  tab->Navigate(kFoo2);
   FilterOutLocalHeaderChanges(&changes);
   ASSERT_TRUE(ChangeTypeMatches(changes, {SyncChange::ACTION_UPDATE}));
   VerifyLocalTabChange(changes[0], 2, kFoo2);
@@ -1907,7 +1368,7 @@
   out.clear();
 
   // Go to a sync-interesting URL.
-  NavigateTab(tab, kFoo1);
+  tab->Navigate(kFoo1);
 
   // The tab should be created, coupled with a header update.
   ASSERT_TRUE(ChangeTypeMatches(
@@ -1930,8 +1391,8 @@
   sync_pb::EntitySpecifics header(out[0].sync_data().GetSpecifics());
   out.clear();
 
-  NavigateTab(AddTab(window_id, kFoo1), kFoo2);
-  NavigateTab(AddTab(window_id, kBar1), kBar2);
+  AddTab(window_id, kFoo1)->Navigate(kFoo2);
+  AddTab(window_id, kBar1)->Navigate(kBar2);
   std::vector<std::string> urls = {kFoo1, kFoo2, kBar1, kBar2};
 
   // Change type breakdown:
@@ -2472,11 +1933,11 @@
   // Start with three tabs in a window.
   TestSyncedWindowDelegate* window = AddWindow();
   TestSyncedTabDelegate* tab1 = AddTab(window->GetSessionId(), kFoo1);
-  NavigateTab(tab1, kFoo2);
+  tab1->Navigate(kFoo2);
   TestSyncedTabDelegate* tab2 = AddTab(window->GetSessionId(), kBar1);
-  NavigateTab(tab2, kBar2);
+  tab2->Navigate(kBar2);
   TestSyncedTabDelegate* tab3 = AddTab(window->GetSessionId(), kBaz1);
-  NavigateTab(tab3, kBaz2);
+  tab3->Navigate(kBaz2);
 
   SyncDataList in;
   SyncChangeList out;
@@ -2522,7 +1983,6 @@
 // Ensure model association updates the window ID for tabs whose window's ID has
 // changed.
 TEST_F(SessionsSyncManagerTest, WindowIdUpdatedOnRestore) {
-  const int kNewWindowId = 1337;
   SyncDataList in;
   SyncChangeList out;
 
@@ -2539,20 +1999,21 @@
   in.push_back(CreateRemoteData(t0_entity));
   out.clear();
   manager()->StopSyncing(syncer::SESSIONS);
+  ResetWindows();
 
   // Override the tab with a placeholder tab delegate.
   PlaceholderTabDelegate t0_override(t0_entity.session().tab().tab_id(),
                                      t0_entity.session().tab_node_id());
 
-  // Set up the window override with the new window ID and placeholder tab.
+  // Set up the window with the new window ID and placeholder tab.
+  window = AddWindow();
   window->OverrideTabAt(0, &t0_override);
-  window->OverrideWindowId(kNewWindowId);
   InitWithSyncDataTakeOutput(in, &out);
 
   // There should be one change for t0's window ID update.
   ASSERT_EQ(1U, FilterOutLocalHeaderChanges(&out)->size());
   VerifyLocalTabChange(out[0], 1, kFoo1);
-  EXPECT_EQ(kNewWindowId,
+  EXPECT_EQ(window->GetSessionId(),
             out[0].sync_data().GetSpecifics().session().tab().window_id());
 }
 
@@ -2641,9 +2102,11 @@
   changes.clear();
 
   // Tab 1
-  NavigateTab(AddTab(window_id, kFoo1), kFoo2, ui::PAGE_TRANSITION_TYPED);
+  AddTab(window_id, kFoo1)
+      ->Navigate(kFoo2, base::Time::Now(), ui::PAGE_TRANSITION_TYPED);
   // Tab 2
-  NavigateTab(AddTab(window_id, kBar1), kBar2, ui::PAGE_TRANSITION_LINK);
+  AddTab(window_id, kBar1)
+      ->Navigate(kBar2, base::Time::Now(), ui::PAGE_TRANSITION_LINK);
 
   // We only test changes for tab add and tab update, and ignore header updates.
   FilterOutLocalHeaderChanges(&changes);
diff --git a/components/sync_sessions/test_synced_window_delegates_getter.cc b/components/sync_sessions/test_synced_window_delegates_getter.cc
new file mode 100644
index 0000000..367e0f93
--- /dev/null
+++ b/components/sync_sessions/test_synced_window_delegates_getter.cc
@@ -0,0 +1,396 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_sessions/test_synced_window_delegates_getter.h"
+
+#include <utility>
+
+#include "base/bind.h"
+#include "components/sessions/core/serialized_navigation_entry_test_helper.h"
+#include "components/sync_sessions/tab_node_pool.h"
+
+namespace sync_sessions {
+namespace {
+
+const char kTitle[] = "title";
+
+}  // namespace
+
+TestSyncedTabDelegate::TestSyncedTabDelegate(
+    SessionID::id_type window_id,
+    SessionID::id_type tab_id,
+    const base::RepeatingCallback<void(SyncedTabDelegate*)>& notify_cb)
+    : window_id_(window_id), tab_id_(tab_id), notify_cb_(notify_cb) {}
+
+TestSyncedTabDelegate::~TestSyncedTabDelegate() = default;
+
+void TestSyncedTabDelegate::Navigate(const std::string& url,
+                                     base::Time time,
+                                     ui::PageTransition transition) {
+  sync_pb::TabNavigation tab_navigation;
+  tab_navigation.set_virtual_url(url);
+  tab_navigation.set_title(kTitle);
+  tab_navigation.set_global_id(time.ToInternalValue());
+  tab_navigation.set_unique_id(time.ToInternalValue());
+  tab_navigation.set_http_status_code(200);
+
+  auto entry = std::make_unique<sessions::SerializedNavigationEntry>(
+      sessions::SerializedNavigationEntry::FromSyncData(0, tab_navigation));
+  sessions::SerializedNavigationEntryTestHelper::SetTimestamp(time,
+                                                              entry.get());
+  sessions::SerializedNavigationEntryTestHelper::SetTransitionType(transition,
+                                                                   entry.get());
+
+  entries_.push_back(std::move(entry));
+  set_current_entry_index(GetCurrentEntryIndex() + 1);
+  notify_cb_.Run(this);
+}
+
+void TestSyncedTabDelegate::set_current_entry_index(int i) {
+  current_entry_index_ = i;
+}
+
+void TestSyncedTabDelegate::set_blocked_navigations(
+    const std::vector<std::unique_ptr<sessions::SerializedNavigationEntry>>&
+        navs) {
+  for (auto& entry : navs) {
+    blocked_navigations_.push_back(
+        std::make_unique<sessions::SerializedNavigationEntry>(*entry));
+  }
+}
+
+bool TestSyncedTabDelegate::IsInitialBlankNavigation() const {
+  // This differs from NavigationControllerImpl, which has an initial blank
+  // NavigationEntry.
+  return GetEntryCount() == 0;
+}
+
+int TestSyncedTabDelegate::GetCurrentEntryIndex() const {
+  return current_entry_index_;
+}
+
+GURL TestSyncedTabDelegate::GetVirtualURLAtIndex(int i) const {
+  if (static_cast<size_t>(i) >= entries_.size())
+    return GURL();
+  return entries_[i]->virtual_url();
+}
+
+GURL TestSyncedTabDelegate::GetFaviconURLAtIndex(int i) const {
+  return GURL();
+}
+
+ui::PageTransition TestSyncedTabDelegate::GetTransitionAtIndex(int i) const {
+  if (static_cast<size_t>(i) >= entries_.size())
+    return ui::PAGE_TRANSITION_LINK;
+  return entries_[i]->transition_type();
+}
+
+void TestSyncedTabDelegate::GetSerializedNavigationAtIndex(
+    int i,
+    sessions::SerializedNavigationEntry* serialized_entry) const {
+  if (static_cast<size_t>(i) >= entries_.size())
+    return;
+  *serialized_entry = *entries_[i];
+}
+
+int TestSyncedTabDelegate::GetEntryCount() const {
+  return entries_.size();
+}
+
+SessionID::id_type TestSyncedTabDelegate::GetWindowId() const {
+  return window_id_;
+}
+
+SessionID::id_type TestSyncedTabDelegate::GetSessionId() const {
+  return tab_id_;
+}
+
+bool TestSyncedTabDelegate::IsBeingDestroyed() const {
+  return false;
+}
+
+std::string TestSyncedTabDelegate::GetExtensionAppId() const {
+  return std::string();
+}
+
+bool TestSyncedTabDelegate::ProfileIsSupervised() const {
+  return is_supervised_;
+}
+
+void TestSyncedTabDelegate::set_is_supervised(bool is_supervised) {
+  is_supervised_ = is_supervised;
+}
+
+const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
+TestSyncedTabDelegate::GetBlockedNavigations() const {
+  return &blocked_navigations_;
+}
+
+bool TestSyncedTabDelegate::IsPlaceholderTab() const {
+  return false;
+}
+
+int TestSyncedTabDelegate::GetSyncId() const {
+  return sync_id_;
+}
+
+void TestSyncedTabDelegate::SetSyncId(int sync_id) {
+  sync_id_ = sync_id;
+}
+
+bool TestSyncedTabDelegate::ShouldSync(SyncSessionsClient* sessions_client) {
+  // This is just a simple filter that isn't meant to fully reproduce
+  // the TabContentsTabDelegate's ShouldSync logic.
+  // Verify all URL's are valid (which will ignore an initial blank page) and
+  // that there is at least one http:// url.
+  int http_count = 0;
+  for (auto& entry : entries_) {
+    if (!entry->virtual_url().is_valid())
+      return false;
+    if (entry->virtual_url().SchemeIsHTTPOrHTTPS())
+      http_count++;
+  }
+  return http_count > 0;
+}
+
+SessionID::id_type TestSyncedTabDelegate::GetSourceTabID() const {
+  return kInvalidTabID;
+}
+
+PlaceholderTabDelegate::PlaceholderTabDelegate(SessionID::id_type tab_id,
+                                               int sync_id)
+    : tab_id_(tab_id), sync_id_(sync_id) {}
+
+PlaceholderTabDelegate::~PlaceholderTabDelegate() = default;
+
+SessionID::id_type PlaceholderTabDelegate::GetSessionId() const {
+  return tab_id_;
+}
+
+int PlaceholderTabDelegate::GetSyncId() const {
+  return sync_id_;
+}
+
+void PlaceholderTabDelegate::SetSyncId(int sync_id) {
+  sync_id_ = sync_id;
+}
+
+bool PlaceholderTabDelegate::IsPlaceholderTab() const {
+  return true;
+}
+
+SessionID::id_type PlaceholderTabDelegate::GetWindowId() const {
+  NOTREACHED();
+  return 0;
+}
+
+bool PlaceholderTabDelegate::IsBeingDestroyed() const {
+  NOTREACHED();
+  return false;
+}
+
+std::string PlaceholderTabDelegate::GetExtensionAppId() const {
+  NOTREACHED();
+  return "";
+}
+
+bool PlaceholderTabDelegate::IsInitialBlankNavigation() const {
+  NOTREACHED();
+  return false;
+}
+
+int PlaceholderTabDelegate::GetCurrentEntryIndex() const {
+  NOTREACHED();
+  return 0;
+}
+
+int PlaceholderTabDelegate::GetEntryCount() const {
+  NOTREACHED();
+  return 0;
+}
+
+GURL PlaceholderTabDelegate::GetVirtualURLAtIndex(int i) const {
+  NOTREACHED();
+  return GURL();
+}
+
+GURL PlaceholderTabDelegate::GetFaviconURLAtIndex(int i) const {
+  NOTREACHED();
+  return GURL();
+}
+
+ui::PageTransition PlaceholderTabDelegate::GetTransitionAtIndex(int i) const {
+  NOTREACHED();
+  return ui::PageTransition();
+}
+
+void PlaceholderTabDelegate::GetSerializedNavigationAtIndex(
+    int i,
+    sessions::SerializedNavigationEntry* serialized_entry) const {
+  NOTREACHED();
+}
+
+bool PlaceholderTabDelegate::ProfileIsSupervised() const {
+  NOTREACHED();
+  return false;
+}
+
+const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
+PlaceholderTabDelegate::GetBlockedNavigations() const {
+  NOTREACHED();
+  return nullptr;
+}
+
+bool PlaceholderTabDelegate::ShouldSync(SyncSessionsClient* sessions_client) {
+  NOTREACHED();
+  return false;
+}
+
+SessionID::id_type PlaceholderTabDelegate::GetSourceTabID() const {
+  return kInvalidTabID;
+}
+
+TestSyncedWindowDelegate::TestSyncedWindowDelegate(
+    SessionID::id_type window_id,
+    sync_pb::SessionWindow_BrowserType type)
+    : window_id_(window_id), window_type_(type) {}
+
+TestSyncedWindowDelegate::~TestSyncedWindowDelegate() = default;
+
+void TestSyncedWindowDelegate::OverrideTabAt(int index,
+                                             SyncedTabDelegate* delegate) {
+  tab_delegates_[index] = delegate;
+}
+
+bool TestSyncedWindowDelegate::HasWindow() const {
+  return true;
+}
+
+SessionID::id_type TestSyncedWindowDelegate::GetSessionId() const {
+  return window_id_;
+}
+
+int TestSyncedWindowDelegate::GetTabCount() const {
+  return tab_delegates_.size();
+}
+
+int TestSyncedWindowDelegate::GetActiveIndex() const {
+  return 0;
+}
+
+bool TestSyncedWindowDelegate::IsApp() const {
+  return false;
+}
+
+bool TestSyncedWindowDelegate::IsTypeTabbed() const {
+  return window_type_ == sync_pb::SessionWindow_BrowserType_TYPE_TABBED;
+}
+
+bool TestSyncedWindowDelegate::IsTypePopup() const {
+  return window_type_ == sync_pb::SessionWindow_BrowserType_TYPE_POPUP;
+}
+
+bool TestSyncedWindowDelegate::IsTabPinned(const SyncedTabDelegate* tab) const {
+  return false;
+}
+
+SyncedTabDelegate* TestSyncedWindowDelegate::GetTabAt(int index) const {
+  if (tab_delegates_.find(index) != tab_delegates_.end())
+    return tab_delegates_.find(index)->second;
+
+  return nullptr;
+}
+
+SessionID::id_type TestSyncedWindowDelegate::GetTabIdAt(int index) const {
+  SyncedTabDelegate* delegate = GetTabAt(index);
+  if (!delegate)
+    return kInvalidTabID;
+  return delegate->GetSessionId();
+}
+
+bool TestSyncedWindowDelegate::IsSessionRestoreInProgress() const {
+  return false;
+}
+
+bool TestSyncedWindowDelegate::ShouldSync() const {
+  return true;
+}
+
+TestSyncedWindowDelegatesGetter::TestSyncedWindowDelegatesGetter() = default;
+
+TestSyncedWindowDelegatesGetter::~TestSyncedWindowDelegatesGetter() = default;
+
+void TestSyncedWindowDelegatesGetter::ResetWindows() {
+  delegates_.clear();
+  windows_.clear();
+}
+
+TestSyncedWindowDelegate* TestSyncedWindowDelegatesGetter::AddWindow(
+    sync_pb::SessionWindow_BrowserType type,
+    SessionID::id_type window_id) {
+  windows_.push_back(
+      std::make_unique<TestSyncedWindowDelegate>(window_id, type));
+  CHECK_EQ(window_id, windows_.back()->GetSessionId());
+  delegates_[window_id] = windows_.back().get();
+  return windows_.back().get();
+}
+
+TestSyncedTabDelegate* TestSyncedWindowDelegatesGetter::AddTab(
+    SessionID::id_type window_id,
+    SessionID::id_type tab_id) {
+  tabs_.push_back(std::make_unique<TestSyncedTabDelegate>(
+      window_id, tab_id,
+      base::BindRepeating(&DummyRouter::NotifyNav,
+                          base::Unretained(&router_))));
+  for (auto& window : windows_) {
+    if (window->GetSessionId() == window_id) {
+      int tab_index = window->GetTabCount();
+      window->OverrideTabAt(tab_index, tabs_.back().get());
+    }
+  }
+
+  // Simulate the browser firing a tab parented notification, ahead of actual
+  // navigations.
+  router_.NotifyNav(tabs_.back().get());
+  return tabs_.back().get();
+}
+
+LocalSessionEventRouter* TestSyncedWindowDelegatesGetter::router() {
+  return &router_;
+}
+
+SyncedWindowDelegatesGetter::SyncedWindowDelegateMap
+TestSyncedWindowDelegatesGetter::GetSyncedWindowDelegates() {
+  return delegates_;
+}
+
+const SyncedWindowDelegate* TestSyncedWindowDelegatesGetter::FindById(
+    SessionID::id_type id) {
+  for (auto window_iter_pair : delegates_) {
+    if (window_iter_pair.second->GetSessionId() == id)
+      return window_iter_pair.second;
+  }
+  return nullptr;
+}
+
+TestSyncedWindowDelegatesGetter::DummyRouter::DummyRouter() = default;
+
+TestSyncedWindowDelegatesGetter::DummyRouter::~DummyRouter() = default;
+
+void TestSyncedWindowDelegatesGetter::DummyRouter::StartRoutingTo(
+    LocalSessionEventHandler* handler) {
+  handler_ = handler;
+}
+
+void TestSyncedWindowDelegatesGetter::DummyRouter::Stop() {
+  handler_ = nullptr;
+}
+
+void TestSyncedWindowDelegatesGetter::DummyRouter::NotifyNav(
+    SyncedTabDelegate* tab) {
+  if (handler_)
+    handler_->OnLocalTabModified(tab);
+}
+
+}  // namespace sync_sessions
diff --git a/components/sync_sessions/test_synced_window_delegates_getter.h b/components/sync_sessions/test_synced_window_delegates_getter.h
new file mode 100644
index 0000000..7026b38e
--- /dev/null
+++ b/components/sync_sessions/test_synced_window_delegates_getter.h
@@ -0,0 +1,199 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SYNC_SESSIONS_TEST_SYNCED_WINDOW_DELEGATES_GETTER_H_
+#define COMPONENTS_SYNC_SESSIONS_TEST_SYNCED_WINDOW_DELEGATES_GETTER_H_
+
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "base/time/time.h"
+#include "components/sync/protocol/session_specifics.pb.h"
+#include "components/sync_sessions/local_session_event_router.h"
+#include "components/sync_sessions/synced_tab_delegate.h"
+#include "components/sync_sessions/synced_window_delegate.h"
+#include "components/sync_sessions/synced_window_delegates_getter.h"
+
+namespace sync_sessions {
+
+// A SyncedTabDelegate fake for testing. It simulates a normal
+// SyncedTabDelegate with a proper WebContents. For a SyncedTabDelegate without
+// a WebContents, see PlaceholderTabDelegate below.
+class TestSyncedTabDelegate : public SyncedTabDelegate {
+ public:
+  TestSyncedTabDelegate(
+      SessionID::id_type window_id,
+      SessionID::id_type tab_id,
+      const base::RepeatingCallback<void(SyncedTabDelegate*)>& notify_cb);
+  ~TestSyncedTabDelegate() override;
+
+  void Navigate(const std::string& url,
+                base::Time time = base::Time::Now(),
+                ui::PageTransition transition = ui::PAGE_TRANSITION_TYPED);
+  void set_current_entry_index(int i);
+  void set_blocked_navigations(
+      const std::vector<std::unique_ptr<sessions::SerializedNavigationEntry>>&
+          navs);
+
+  // SyncedTabDelegate overrides.
+  bool IsInitialBlankNavigation() const override;
+  int GetCurrentEntryIndex() const override;
+  GURL GetVirtualURLAtIndex(int i) const override;
+  GURL GetFaviconURLAtIndex(int i) const override;
+  ui::PageTransition GetTransitionAtIndex(int i) const override;
+  void GetSerializedNavigationAtIndex(
+      int i,
+      sessions::SerializedNavigationEntry* serialized_entry) const override;
+  int GetEntryCount() const override;
+  SessionID::id_type GetWindowId() const override;
+  SessionID::id_type GetSessionId() const override;
+  bool IsBeingDestroyed() const override;
+  std::string GetExtensionAppId() const override;
+  bool ProfileIsSupervised() const override;
+  void set_is_supervised(bool is_supervised);
+  const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
+  GetBlockedNavigations() const override;
+  bool IsPlaceholderTab() const override;
+  int GetSyncId() const override;
+  void SetSyncId(int sync_id) override;
+  bool ShouldSync(SyncSessionsClient* sessions_client) override;
+  SessionID::id_type GetSourceTabID() const override;
+
+ private:
+  const SessionID::id_type window_id_;
+  const SessionID::id_type tab_id_;
+  const base::RepeatingCallback<void(SyncedTabDelegate*)> notify_cb_;
+
+  int current_entry_index_ = -1;
+  bool is_supervised_ = false;
+  int sync_id_ = kInvalidTabID;
+  std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
+      blocked_navigations_;
+  std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
+      entries_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestSyncedTabDelegate);
+};
+
+// A placeholder delegate. These delegates have no WebContents, simulating a tab
+// that has been restored without bringing its state fully into memory (for
+// example on Android), or where the tab's contents have been evicted from
+// memory. See SyncedTabDelegate::IsPlaceHolderTab for more info.
+class PlaceholderTabDelegate : public SyncedTabDelegate {
+ public:
+  PlaceholderTabDelegate(SessionID::id_type tab_id, int sync_id);
+  ~PlaceholderTabDelegate() override;
+
+  // SyncedTabDelegate overrides.
+  SessionID::id_type GetSessionId() const override;
+  int GetSyncId() const override;
+  void SetSyncId(int sync_id) override;
+  bool IsPlaceholderTab() const override;
+  // Everything else is invalid to invoke as it depends on a valid WebContents.
+  SessionID::id_type GetWindowId() const override;
+  bool IsBeingDestroyed() const override;
+  std::string GetExtensionAppId() const override;
+  bool IsInitialBlankNavigation() const override;
+  int GetCurrentEntryIndex() const override;
+  int GetEntryCount() const override;
+  GURL GetVirtualURLAtIndex(int i) const override;
+  GURL GetFaviconURLAtIndex(int i) const override;
+  ui::PageTransition GetTransitionAtIndex(int i) const override;
+  void GetSerializedNavigationAtIndex(
+      int i,
+      sessions::SerializedNavigationEntry* serialized_entry) const override;
+  bool ProfileIsSupervised() const override;
+  const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
+  GetBlockedNavigations() const override;
+  bool ShouldSync(SyncSessionsClient* sessions_client) override;
+  SessionID::id_type GetSourceTabID() const override;
+
+ private:
+  const SessionID::id_type tab_id_;
+  int sync_id_ = kInvalidTabID;
+
+  DISALLOW_COPY_AND_ASSIGN(PlaceholderTabDelegate);
+};
+
+class TestSyncedWindowDelegate : public SyncedWindowDelegate {
+ public:
+  explicit TestSyncedWindowDelegate(SessionID::id_type window_id,
+                                    sync_pb::SessionWindow_BrowserType type);
+  ~TestSyncedWindowDelegate() override;
+
+  // |delegate| must not be nullptr and must outlive this object.
+  void OverrideTabAt(int index, SyncedTabDelegate* delegate);
+
+  // SyncedWindowDelegate overrides.
+  bool HasWindow() const override;
+  SessionID::id_type GetSessionId() const override;
+  int GetTabCount() const override;
+  int GetActiveIndex() const override;
+  bool IsApp() const override;
+  bool IsTypeTabbed() const override;
+  bool IsTypePopup() const override;
+  bool IsTabPinned(const SyncedTabDelegate* tab) const override;
+  SyncedTabDelegate* GetTabAt(int index) const override;
+  SessionID::id_type GetTabIdAt(int index) const override;
+  bool IsSessionRestoreInProgress() const override;
+  bool ShouldSync() const override;
+
+ private:
+  const SessionID::id_type window_id_;
+  const sync_pb::SessionWindow_BrowserType window_type_;
+
+  std::map<int, SyncedTabDelegate*> tab_delegates_;
+  std::map<int, SyncedTabDelegate*> tab_overrides_;
+  std::map<int, SessionID::id_type> tab_id_overrides_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestSyncedWindowDelegate);
+};
+
+class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter {
+ public:
+  TestSyncedWindowDelegatesGetter();
+  ~TestSyncedWindowDelegatesGetter() override;
+
+  void ResetWindows();
+  TestSyncedWindowDelegate* AddWindow(
+      sync_pb::SessionWindow_BrowserType type,
+      SessionID::id_type window_id = SessionID().id());
+  // Creates a new tab within the window specified by |window_id|. The newly
+  // created tab's ID can be specified optionally. Returns the newly created
+  // TestSyncedTabDelegate (not owned).
+  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
+                                SessionID::id_type tab_id = SessionID().id());
+  LocalSessionEventRouter* router();
+
+  // SyncedWindowDelegatesGetter overrides.
+  SyncedWindowDelegateMap GetSyncedWindowDelegates() override;
+  const SyncedWindowDelegate* FindById(SessionID::id_type id) override;
+
+ private:
+  class DummyRouter : public LocalSessionEventRouter {
+   public:
+    DummyRouter();
+    ~DummyRouter() override;
+    void StartRoutingTo(LocalSessionEventHandler* handler) override;
+    void Stop() override;
+    void NotifyNav(SyncedTabDelegate* tab);
+
+   private:
+    LocalSessionEventHandler* handler_ = nullptr;
+  };
+
+  SyncedWindowDelegateMap delegates_;
+  std::vector<std::unique_ptr<TestSyncedWindowDelegate>> windows_;
+  std::vector<std::unique_ptr<TestSyncedTabDelegate>> tabs_;
+  DummyRouter router_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestSyncedWindowDelegatesGetter);
+};
+
+}  // namespace sync_sessions
+
+#endif  // COMPONENTS_SYNC_SESSIONS_TEST_SYNCED_WINDOW_DELEGATES_GETTER_H_
diff --git a/components/update_client/component.cc b/components/update_client/component.cc
index dfe50d2..776ead6 100644
--- a/components/update_client/component.cc
+++ b/components/update_client/component.cc
@@ -180,6 +180,10 @@
   return update_context_.session_id;
 }
 
+bool Component::is_foreground() const {
+  return update_context_.is_foreground;
+}
+
 void Component::Handle(CallbackHandleComplete callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(state_);
@@ -268,8 +272,8 @@
 }
 
 bool Component::CanDoBackgroundDownload() const {
-  // On demand component updates are always downloaded in foreground.
-  return !on_demand_ && crx_component_.allows_background_download &&
+  // Foreground component updates are always downloaded in foreground.
+  return !is_foreground() && crx_component_.allows_background_download &&
          update_context_.config->EnabledBackgroundDownloader();
 }
 
diff --git a/components/update_client/component.h b/components/update_client/component.h
index d44e39a..c7112400 100644
--- a/components/update_client/component.h
+++ b/components/update_client/component.h
@@ -97,13 +97,7 @@
     update_check_error_ = update_check_error;
   }
 
-  // Returns the time when processing of an update for this component has
-  // begun, once the update has been discovered. Returns a null TimeTicks object
-  // if the handling of an update has not happened.
-  // base::TimeTicks update_begin() const { return update_begin_; }
-
-  bool on_demand() const { return on_demand_; }
-  void set_on_demand(bool on_demand) { on_demand_ = on_demand; }
+  bool is_foreground() const;
 
   const std::vector<std::string>& events() const { return events_; }
 
@@ -407,9 +401,6 @@
   // True if the update check response for this component includes an update.
   bool is_update_available_ = false;
 
-  // True if the current update check cycle is on-demand.
-  bool on_demand_ = false;
-
   // The error reported by the update checker.
   int update_check_error_ = 0;
 
diff --git a/components/update_client/protocol_builder.cc b/components/update_client/protocol_builder.cc
index 6d4bbeb..3065582 100644
--- a/components/update_client/protocol_builder.cc
+++ b/components/update_client/protocol_builder.cc
@@ -300,6 +300,26 @@
   return request;
 }
 
+std::map<std::string, std::string> BuildUpdateCheckExtraRequestHeaders(
+    scoped_refptr<Configurator> config,
+    const std::vector<std::string>& ids,
+    bool is_foreground) {
+  // This number of extension ids result in an HTTP header length of about 1KB.
+  constexpr size_t maxExtensionCount = 30;
+  const std::vector<std::string>& app_ids =
+      ids.size() <= maxExtensionCount
+          ? ids
+          : std::vector<std::string>(ids.cbegin(),
+                                     ids.cbegin() + maxExtensionCount);
+  return std::map<std::string, std::string>{
+      {"X-GoogleUpdate-Updater",
+       base::StringPrintf("%s-%s", config->GetProdId().c_str(),
+                          config->GetBrowserVersion().GetString().c_str())},
+      {"X-GoogleUpdate-Interactivity", is_foreground ? "fg" : "bg"},
+      {"X-GoogleUpdate-AppId", base::JoinString(app_ids, ",")},
+  };
+}
+
 std::string BuildUpdateCheckRequest(
     const Configurator& config,
     const std::string& session_id,
@@ -328,7 +348,7 @@
     if (!crx_component.install_source.empty())
       base::StringAppendF(&app, " installsource=\"%s\"",
                           crx_component.install_source.c_str());
-    else if (component.on_demand())
+    else if (component.is_foreground())
       base::StringAppendF(&app, " installsource=\"ondemand\"");
     for (const auto& attr : installer_attributes) {
       base::StringAppendF(&app, " %s=\"%s\"", attr.first.c_str(),
@@ -419,24 +439,4 @@
                               config.GetDownloadPreference(), app, "", nullptr);
 }
 
-std::map<std::string, std::string> BuildUpdateCheckExtraRequestHeaders(
-    scoped_refptr<Configurator> config,
-    const std::vector<std::string>& ids,
-    bool is_foreground) {
-  // This number of extension ids result in an HTTP header length of about 1KB.
-  constexpr size_t maxExtensionCount = 30;
-  const std::vector<std::string>& app_ids =
-      ids.size() <= maxExtensionCount
-          ? ids
-          : std::vector<std::string>(ids.cbegin(),
-                                     ids.cbegin() + maxExtensionCount);
-  return std::map<std::string, std::string>{
-      {"X-GoogleUpdate-Updater",
-       base::StringPrintf("%s-%s", config->GetProdId().c_str(),
-                          config->GetBrowserVersion().GetString().c_str())},
-      {"X-GoogleUpdate-Interactivity", is_foreground ? "fg" : "bg"},
-      {"X-GoogleUpdate-AppId", base::JoinString(app_ids, ",")},
-  };
-}
-
 }  // namespace update_client
diff --git a/components/update_client/protocol_builder.h b/components/update_client/protocol_builder.h
index 340693e..fb8782be 100644
--- a/components/update_client/protocol_builder.h
+++ b/components/update_client/protocol_builder.h
@@ -19,6 +19,14 @@
 class Configurator;
 class PersistedData;
 
+// Creates the values for the DDOS extra request headers sent with the update
+// check. These headers include "X-GoogleUpdate-Updater",
+// "X-GoogleUpdate-AppId", and  "X-GoogleUpdate-Interactivity".
+std::map<std::string, std::string> BuildUpdateCheckExtraRequestHeaders(
+    scoped_refptr<Configurator> config,
+    const std::vector<std::string>& ids_checked,
+    bool is_foreground);
+
 // Builds an update check request for |components|. |additional_attributes| is
 // serialized as part of the <request> element of the request to customize it
 // with data that is not platform or component specific. For each |item|, a
@@ -115,14 +123,6 @@
     const std::string& additional_attributes,
     const std::unique_ptr<UpdaterState::Attributes>& updater_state_attributes);
 
-// Creates the values for the DDOS extra request headers sent with the update
-// check. These headers include "X-GoogleUpdate-Updater",
-// "X-GoogleUpdate-AppId", and  "X-GoogleUpdate-Interactivity".
-std::map<std::string, std::string> BuildUpdateCheckExtraRequestHeaders(
-    scoped_refptr<Configurator> config,
-    const std::vector<std::string>& ids,
-    bool is_foreground);
-
 }  // namespace update_client
 
 #endif  // COMPONENTS_UPDATE_CLIENT_PROTOCOL_BUILDER_H_
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc
index 051c7e4..86121756d 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include <algorithm>
 #include <memory>
 #include <string>
 #include <utility>
@@ -60,7 +61,6 @@
                        const IdToComponentPtrMap& components,
                        const std::string& additional_attributes,
                        bool enabled_component_updates,
-                       bool is_foreground,
                        UpdateCheckCallback update_check_callback) override;
 
  private:
@@ -68,8 +68,7 @@
   void CheckForUpdatesHelper(const std::string& session_id,
                              const IdToComponentPtrMap& components,
                              const std::string& additional_attributes,
-                             bool enabled_component_updates,
-                             bool is_foreground);
+                             bool enabled_component_updates);
   void OnRequestSenderComplete(const IdToComponentPtrMap& components,
                                int error,
                                const std::string& response,
@@ -107,7 +106,6 @@
     const IdToComponentPtrMap& components,
     const std::string& additional_attributes,
     bool enabled_component_updates,
-    bool is_foreground,
     UpdateCheckCallback update_check_callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
@@ -121,7 +119,7 @@
       base::BindOnce(&UpdateCheckerImpl::CheckForUpdatesHelper,
                      base::Unretained(this), session_id,
                      base::ConstRef(components), additional_attributes,
-                     enabled_component_updates, is_foreground));
+                     enabled_component_updates));
 }
 
 // This function runs on the blocking pool task runner.
@@ -142,14 +140,24 @@
     const std::string& session_id,
     const IdToComponentPtrMap& components,
     const std::string& additional_attributes,
-    bool enabled_component_updates,
-    bool is_foreground) {
+    bool enabled_component_updates) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   auto urls(config_->UpdateUrl());
   if (IsEncryptionRequired(components))
     RemoveUnsecureUrls(&urls);
 
+  // Components in this update check are either all foreground, or all
+  // background since this member is inherited from the component's update
+  // context. Pick the state of the first component to use in the update check.
+  DCHECK(!components.empty());
+  const bool is_foreground = components.at(ids_checked_[0])->is_foreground();
+  DCHECK(
+      std::all_of(components.cbegin(), components.cend(),
+                  [is_foreground](IdToComponentPtrMap::const_reference& elem) {
+                    return is_foreground == elem.second->is_foreground();
+                  }));
+
   request_sender_ = std::make_unique<RequestSender>(config_);
   request_sender_->Send(
       urls,
diff --git a/components/update_client/update_checker.h b/components/update_client/update_checker.h
index 24e224a..4d65933 100644
--- a/components/update_client/update_checker.h
+++ b/components/update_client/update_checker.h
@@ -44,7 +44,6 @@
                                const IdToComponentPtrMap& components,
                                const std::string& additional_attributes,
                                bool enabled_component_updates,
-                               bool is_foreground,
                                UpdateCheckCallback update_check_callback) = 0;
 
   static std::unique_ptr<UpdateChecker> Create(
diff --git a/components/update_client/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc
index 7618672..bfb9748 100644
--- a/components/update_client/update_checker_unittest.cc
+++ b/components/update_client/update_checker_unittest.cc
@@ -228,11 +228,13 @@
   return component;
 }
 
+// This test is parameterized for |is_foreground|.
 TEST_P(UpdateCheckerTest, UpdateCheckSuccess) {
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
   update_checker_ = UpdateChecker::Create(config_, metadata_.get());
+  update_context_->is_foreground = GetParam();
 
   IdToComponentPtrMap components;
   components[kUpdateItemId] = MakeComponent();
@@ -240,10 +242,9 @@
   auto& component = components[kUpdateItemId];
   component->crx_component_.installer_attributes["ap"] = "some_ap";
 
-  const bool is_foreground = GetParam();
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, is_foreground,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -262,7 +263,9 @@
   EXPECT_NE(string::npos,
             request.find(std::string("<app appid=\"") + kUpdateItemId +
                          "\" version=\"0.9\" "
-                         "brand=\"TEST\" ap=\"some_ap\" enabled=\"1\">"
+                         "brand=\"TEST\"" +
+                         (GetParam() ? " installsource=\"ondemand\"" : "") +
+                         " ap=\"some_ap\" enabled=\"1\">"
                          "<updatecheck/><ping r=\"-2\" "));
   EXPECT_NE(string::npos,
             request.find("<packages><package fp=\"fp1\"/></packages></app>"));
@@ -297,12 +300,12 @@
 #endif  // GOOGLE_CHROME_BUILD
 #endif  // OS_WINDOWS
 
-  // Check the interactivity header value.
+  // Check the DDOS protection header values.
   const auto extra_request_headers = post_interceptor_->GetRequests()[0].second;
   EXPECT_TRUE(extra_request_headers.HasHeader("X-GoogleUpdate-Interactivity"));
   std::string header;
   extra_request_headers.GetHeader("X-GoogleUpdate-Interactivity", &header);
-  EXPECT_STREQ(is_foreground ? "fg" : "bg", header.c_str());
+  EXPECT_STREQ(GetParam() ? "fg" : "bg", header.c_str());
   extra_request_headers.GetHeader("X-GoogleUpdate-Updater", &header);
   EXPECT_STREQ("fake_prodid-30.0", header.c_str());
   extra_request_headers.GetHeader("X-GoogleUpdate-AppId", &header);
@@ -325,7 +328,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
 
@@ -352,7 +355,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
 
@@ -381,7 +384,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -408,7 +411,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
 
@@ -436,7 +439,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
 
@@ -477,7 +480,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -503,7 +506,7 @@
   activity_data_service_->SetDaysSinceLastRollCall(kUpdateItemId, 5);
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -511,7 +514,7 @@
   update_checker_ = UpdateChecker::Create(config_, metadata_.get());
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -543,7 +546,7 @@
   activity_data_service_->SetDaysSinceLastActive(kUpdateItemId, 10);
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -555,7 +558,7 @@
   update_checker_ = UpdateChecker::Create(config_, metadata_.get());
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -566,7 +569,7 @@
   update_checker_ = UpdateChecker::Create(config_, metadata_.get());
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "extra=\"params\"", true, true,
+      components, "extra=\"params\"", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -598,7 +601,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -606,12 +609,12 @@
   EXPECT_EQ(string::npos,
             post_interceptor_->GetRequestBody(0).find("installsource="));
 
-  component->set_on_demand(true);
+  update_context_->is_foreground = true;
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -619,13 +622,13 @@
   EXPECT_NE(string::npos, post_interceptor_->GetRequestBody(1).find(
                               "installsource=\"ondemand\""));
 
-  component->set_on_demand(false);
+  update_context_->is_foreground = false;
   crx_component.install_source = "webstore";
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -633,13 +636,13 @@
   EXPECT_NE(string::npos, post_interceptor_->GetRequestBody(2).find(
                               "installsource=\"webstore\""));
 
-  component->set_on_demand(true);
+  update_context_->is_foreground = true;
   crx_component.install_source = "sideload";
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -661,7 +664,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -676,7 +679,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -690,7 +693,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -705,7 +708,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -720,7 +723,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -739,7 +742,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -776,7 +779,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -796,7 +799,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", false, true,
+      components, "", false,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -816,7 +819,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -836,7 +839,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
@@ -860,7 +863,7 @@
 
   update_checker_->CheckForUpdates(
       update_context_->session_id, std::vector<std::string>{kUpdateItemId},
-      components, "", true, true,
+      components, "", true,
       base::BindOnce(&UpdateCheckerTest::UpdateCheckComplete,
                      base::Unretained(this)));
   RunThreads();
diff --git a/components/update_client/update_client.cc b/components/update_client/update_client.cc
index c6035ed..15e16d30 100644
--- a/components/update_client/update_client.cc
+++ b/components/update_client/update_client.cc
@@ -98,20 +98,23 @@
 
   // Partially applies |callback| to OnTaskComplete, so this argument is
   // available when the task completes, along with the task itself.
-  // Install tasks are run concurrently and never queued up.
+  // Install tasks are run concurrently and never queued up. They are always
+  // considered foreground tasks.
+  constexpr bool kIsForeground = true;
   RunTask(std::make_unique<TaskUpdate>(
-      update_engine_.get(), true, ids, std::move(crx_data_callback),
+      update_engine_.get(), kIsForeground, ids, std::move(crx_data_callback),
       base::BindOnce(&UpdateClientImpl::OnTaskComplete, this,
                      std::move(callback))));
 }
 
 void UpdateClientImpl::Update(const std::vector<std::string>& ids,
                               CrxDataCallback crx_data_callback,
+                              bool is_foreground,
                               Callback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   auto task = std::make_unique<TaskUpdate>(
-      update_engine_.get(), false, ids, std::move(crx_data_callback),
+      update_engine_.get(), is_foreground, ids, std::move(crx_data_callback),
       base::BindOnce(&UpdateClientImpl::OnTaskComplete, this,
                      std::move(callback)));
 
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index 3b883b8..95c7b7ea 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -349,9 +349,11 @@
   // is intended to be used for background updates of several CRXs. Overlapping
   // calls to this function result in a queuing behavior, and the execution
   // of each call is serialized. In addition, updates are always queued up when
-  // installs are running.
+  // installs are running. The |is_foreground| parameter must be set to true if
+  // the invocation of this function is a result of a user initiated update.
   virtual void Update(const std::vector<std::string>& ids,
                       CrxDataCallback crx_data_callback,
+                      bool is_foreground,
                       Callback callback) = 0;
 
   // Sends an uninstall ping for the CRX identified by |id| and |version|. The
diff --git a/components/update_client/update_client_internal.h b/components/update_client/update_client_internal.h
index d0127e66..185dbf4 100644
--- a/components/update_client/update_client_internal.h
+++ b/components/update_client/update_client_internal.h
@@ -42,6 +42,7 @@
                Callback callback) override;
   void Update(const std::vector<std::string>& ids,
               CrxDataCallback crx_data_callback,
+              bool is_foreground,
               Callback callback) override;
   bool GetCrxUpdateState(const std::string& id,
                          CrxUpdateItem* update_item) const override;
diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
index e4215b2..9fe26c6 100644
--- a/components/update_client/update_client_unittest.cc
+++ b/components/update_client/update_client_unittest.cc
@@ -247,7 +247,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
       EXPECT_TRUE(enabled_component_updates);
@@ -258,7 +257,7 @@
 
       auto& component = components.at(id);
 
-      EXPECT_FALSE(component->on_demand());
+      EXPECT_TRUE(component->is_foreground());
 
       ProtocolParser::Result result;
       result.extension_id = id;
@@ -309,7 +308,7 @@
 
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), true,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -362,7 +361,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -410,7 +408,7 @@
         auto& component = components.at(id);
         component->SetParseResult(result);
 
-        EXPECT_FALSE(component->on_demand());
+        EXPECT_FALSE(component->is_foreground());
       }
 
       {
@@ -425,7 +423,7 @@
         auto& component = components.at(id);
         component->SetParseResult(result);
 
-        EXPECT_FALSE(component->on_demand());
+        EXPECT_FALSE(component->is_foreground());
       }
 
       base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -524,7 +522,7 @@
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf",
                                         "abagagagagagagagagagagagagagagag"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -576,7 +574,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -638,7 +635,7 @@
         auto& component = components.at(id);
         component->SetParseResult(result);
 
-        EXPECT_FALSE(component->on_demand());
+        EXPECT_FALSE(component->is_foreground());
       }
 
       {
@@ -662,7 +659,7 @@
         auto& component = components.at(id);
         component->SetParseResult(result);
 
-        EXPECT_FALSE(component->on_demand());
+        EXPECT_FALSE(component->is_foreground());
       }
 
       base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -795,7 +792,7 @@
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf",
                                         "ihfokbkgjpifnbbojhneepfflplebdkc"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -849,7 +846,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -1062,7 +1058,7 @@
                                         "ihfokbkgjpifnbbojhneepfflplebdkc"};
 
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -1121,7 +1117,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
 
@@ -1353,6 +1348,7 @@
   {
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -1361,6 +1357,7 @@
   {
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -1453,7 +1450,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -1587,7 +1583,7 @@
 
   std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -1646,7 +1642,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
 
@@ -1894,6 +1889,7 @@
   {
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -1902,6 +1898,7 @@
   {
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -1953,7 +1950,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
       EXPECT_TRUE(enabled_component_updates);
@@ -1964,7 +1960,7 @@
 
       auto& component = components.at(id);
 
-      EXPECT_FALSE(component->on_demand());
+      EXPECT_FALSE(component->is_foreground());
 
       ProtocolParser::Result result;
       result.extension_id = id;
@@ -2019,10 +2015,10 @@
 
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -2067,7 +2063,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -2115,7 +2110,7 @@
       component->SetParseResult(result);
 
       // Verify that calling Install sets ondemand.
-      EXPECT_TRUE(component->on_demand());
+      EXPECT_TRUE(component->is_foreground());
 
       base::ThreadTaskRunnerHandle::Get()->PostTask(
           FROM_HERE, base::BindOnce(std::move(update_check_callback), 0, 0));
@@ -2263,7 +2258,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
       EXPECT_TRUE(enabled_component_updates);
@@ -2279,8 +2273,8 @@
       auto& component = components.at(id);
       component->SetParseResult(result);
 
-      // Verify that calling Install sets ondemand.
-      EXPECT_TRUE(component->on_demand());
+      // Verify that calling Install sets |is_foreground| for the component.
+      EXPECT_TRUE(component->is_foreground());
 
       base::ThreadTaskRunnerHandle::Get()->PostTask(
           FROM_HERE, base::BindOnce(std::move(update_check_callback), 0, 0));
@@ -2370,7 +2364,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       NOTREACHED();
     }
@@ -2406,7 +2399,7 @@
 
   const std::vector<std::string> empty_id_list;
   update_client->Update(
-      empty_id_list, base::BindOnce(&DataCallbackFake::Callback),
+      empty_id_list, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
   RunThreads();
 }
@@ -2432,7 +2425,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       NOTREACHED();
     }
@@ -2536,7 +2528,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
 
@@ -2627,6 +2618,7 @@
     // |retry_after_sec|, which causes subsequent calls to fail.
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -2637,6 +2629,7 @@
     // Error::ERROR_UPDATE_RETRY_LATER.
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -2657,6 +2650,7 @@
     // This call succeeds.
     base::RunLoop runloop;
     update_client->Update(ids, base::BindOnce(&DataCallbackFake::Callback),
+                          false,
                           base::BindOnce(&CompletionCallbackFake::Callback,
                                          runloop.QuitClosure()));
     runloop.Run();
@@ -2715,7 +2709,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -2921,7 +2914,7 @@
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf",
                                         "ihfokbkgjpifnbbojhneepfflplebdkc"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -2965,7 +2958,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       EXPECT_FALSE(session_id.empty());
       EXPECT_TRUE(enabled_component_updates);
@@ -3025,7 +3017,7 @@
 
   const std::vector<std::string> ids = {"jebgalgnebhfojomionfpkfelancnnkf"};
   update_client->Update(
-      ids, base::BindOnce(&DataCallbackFake::Callback),
+      ids, base::BindOnce(&DataCallbackFake::Callback), false,
       base::BindOnce(&CompletionCallbackFake::Callback, quit_closure()));
 
   RunThreads();
@@ -3050,7 +3042,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -3216,7 +3207,6 @@
                          const IdToComponentPtrMap& components,
                          const std::string& additional_attributes,
                          bool enabled_component_updates,
-                         bool is_foreground,
                          UpdateCheckCallback update_check_callback) override {
       /*
       Fake the following response:
@@ -3340,6 +3330,7 @@
             components->push_back(crx);
           },
           unpack_path),
+      false,
       base::BindOnce(
           [](base::OnceClosure quit_closure, Error error) {
             EXPECT_EQ(Error::NONE, error);
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index a32285c9..1a163776 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -116,7 +116,6 @@
     DCHECK(update_context->components.at(id));
 
     auto& component = *update_context->components.at(id);
-    component.set_on_demand(update_context->is_foreground);
     component.set_crx_component(crx_component);
     component.set_previous_version(crx_component.version);
     component.set_previous_fp(crx_component.fingerprint);
@@ -168,7 +167,7 @@
   update_context->update_checker->CheckForUpdates(
       update_context->session_id, update_context->ids,
       update_context->components, config_->ExtraRequestParams(),
-      update_context->enabled_component_updates, update_context->is_foreground,
+      update_context->enabled_component_updates,
       base::BindOnce(&UpdateEngine::UpdateCheckDone, base::Unretained(this),
                      it));
 }
diff --git a/components/update_client/update_engine.h b/components/update_client/update_engine.h
index 5ac3024c..f05cb4f 100644
--- a/components/update_client/update_engine.h
+++ b/components/update_client/update_engine.h
@@ -126,15 +126,19 @@
 
   scoped_refptr<Configurator> config;
 
-  // True if this update has been initiated by the user.
+  // True if the component is updated as a result of user interaction.
   bool is_foreground = false;
 
   // True if the component updates are enabled in this context.
   const bool enabled_component_updates;
 
-  // Contains the ids of all CRXs in this context.
+  // Contains the ids of all CRXs in this context in the order specified
+  // by the caller of |UpdateClient::Update| or |UpdateClient:Install|.
   const std::vector<std::string> ids;
 
+  // Contains the map of ids to components for all the CRX in this context.
+  IdToComponentPtrMap components;
+
   // Called before an update check, when update metadata is needed.
   UpdateEngine::CrxDataCallback crx_data_callback;
 
@@ -156,8 +160,6 @@
   size_t num_components_ready_to_check = 0;
   size_t num_components_checked = 0;
 
-  IdToComponentPtrMap components;
-
   base::queue<std::string> component_queue;
 
   // The time to wait before handling the update for a component.
diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn
index 8d3a744..1f71a2a 100644
--- a/components/viz/common/BUILD.gn
+++ b/components/viz/common/BUILD.gn
@@ -133,6 +133,8 @@
     "surfaces/local_surface_id.h",
     "surfaces/parent_local_surface_id_allocator.cc",
     "surfaces/parent_local_surface_id_allocator.h",
+    "surfaces/scoped_surface_id_allocator.cc",
+    "surfaces/scoped_surface_id_allocator.h",
     "surfaces/surface_id.cc",
     "surfaces/surface_id.h",
     "surfaces/surface_info.cc",
@@ -198,6 +200,7 @@
     "surfaces/child_local_surface_id_allocator_unittest.cc",
     "surfaces/local_surface_id_unittest.cc",
     "surfaces/parent_local_surface_id_allocator_unittest.cc",
+    "surfaces/scoped_surface_id_allocator_unittest.cc",
     "yuv_readback_unittest.cc",
   ]
 
diff --git a/components/viz/common/gpu/raster_context_provider.h b/components/viz/common/gpu/raster_context_provider.h
index 908c01e..e1d0f28 100644
--- a/components/viz/common/gpu/raster_context_provider.h
+++ b/components/viz/common/gpu/raster_context_provider.h
@@ -111,6 +111,8 @@
   // calling this.
   virtual const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const = 0;
 
+  // TODO(vmiura): Hide ContextGL() & GrContext() behind some kind of lock.
+
   // Get a GLES2 interface to the 3d context.  The context provider must have
   // been successfully bound to a thread before calling this.
   virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
diff --git a/components/viz/common/gpu/texture_allocation.cc b/components/viz/common/gpu/texture_allocation.cc
index 27778ed..ef19a49 100644
--- a/components/viz/common/gpu/texture_allocation.cc
+++ b/components/viz/common/gpu/texture_allocation.cc
@@ -98,14 +98,11 @@
   // ETC1 resources cannot be preallocated.
   if (format == ETC1)
     return;
-  ri->BindTexture(alloc.texture_target, alloc.texture_id);
-  ri->TexStorageForRaster(
-      alloc.texture_target, format, size.width(), size.height(),
-      alloc.overlay_candidate ? gpu::raster::kOverlay : gpu::raster::kNone);
+  ri->TexStorage2D(alloc.texture_id, 1, size.width(), size.height());
   if (alloc.overlay_candidate && color_space.IsValid()) {
-    ri->SetColorSpaceMetadataCHROMIUM(
-        alloc.texture_id, reinterpret_cast<GLColorSpace>(
-                              const_cast<gfx::ColorSpace*>(&color_space)));
+    ri->SetColorSpaceMetadata(alloc.texture_id,
+                              reinterpret_cast<GLColorSpace>(
+                                  const_cast<gfx::ColorSpace*>(&color_space)));
   }
 }
 
diff --git a/components/viz/common/surfaces/parent_local_surface_id_allocator.cc b/components/viz/common/surfaces/parent_local_surface_id_allocator.cc
index 3716021..b1b79a98 100644
--- a/components/viz/common/surfaces/parent_local_surface_id_allocator.cc
+++ b/components/viz/common/surfaces/parent_local_surface_id_allocator.cc
@@ -29,7 +29,8 @@
 }
 
 const LocalSurfaceId& ParentLocalSurfaceIdAllocator::GenerateId() {
-  ++last_known_local_surface_id_.parent_sequence_number_;
+  if (!is_allocation_suppressed_)
+    ++last_known_local_surface_id_.parent_sequence_number_;
   return last_known_local_surface_id_;
 }
 
diff --git a/components/viz/common/surfaces/parent_local_surface_id_allocator.h b/components/viz/common/surfaces/parent_local_surface_id_allocator.h
index a1b32a9..e4d443b 100644
--- a/components/viz/common/surfaces/parent_local_surface_id_allocator.h
+++ b/components/viz/common/surfaces/parent_local_surface_id_allocator.h
@@ -43,8 +43,13 @@
     return last_known_local_surface_id_;
   }
 
+  bool is_allocation_suppressed() const { return is_allocation_suppressed_; }
+
  private:
   LocalSurfaceId last_known_local_surface_id_;
+  bool is_allocation_suppressed_ = false;
+
+  friend class ScopedSurfaceIdAllocator;
 
   DISALLOW_COPY_AND_ASSIGN(ParentLocalSurfaceIdAllocator);
 };
diff --git a/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc b/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc
index 37f2acd..20489514 100644
--- a/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc
+++ b/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc
@@ -6,8 +6,9 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
-// ParentLocalSurfaceIdAllocator has 1 accessor which does not alter state:
+// ParentLocalSurfaceIdAllocator has 2 accessors which do not alter state:
 // - last_known_local_surface_id()
+// - is_allocation_suppressed()
 //
 // For every operation which changes state we can test:
 // - the operation completed as expected,
@@ -29,7 +30,8 @@
 }  // namespace
 
 // The default constructor should generate a nonce and initialize the sequence
-// number of the last known LocalSurfaceId to an invalid state.
+// number of the last known LocalSurfaceId to an invalid state. Allocation
+// should not be suppressed.
 TEST(ParentLocalSurfaceIdAllocatorTest,
      DefaultConstructorShouldNotSetLocalSurfaceIdComponents) {
   ParentLocalSurfaceIdAllocator default_constructed_parent_allocator;
@@ -40,6 +42,7 @@
   EXPECT_TRUE(ParentSequenceNumberIsNotSet(default_local_surface_id));
   EXPECT_TRUE(ChildSequenceNumberIsSet(default_local_surface_id));
   EXPECT_FALSE(NonceIsEmpty(default_local_surface_id));
+  EXPECT_FALSE(default_constructed_parent_allocator.is_allocation_suppressed());
 }
 
 // The move constructor should move the last-known LocalSurfaceId.
@@ -55,6 +58,7 @@
 
   EXPECT_EQ(premoved_local_surface_id,
             moved_to_parent_allocator.last_known_local_surface_id());
+  EXPECT_FALSE(moved_to_parent_allocator.is_allocation_suppressed());
 }
 
 // The move assignment operator should move the last-known LocalSurfaceId.
@@ -72,6 +76,7 @@
 
   EXPECT_EQ(premoved_local_surface_id,
             moved_to_parent_allocator.last_known_local_surface_id());
+  EXPECT_FALSE(moved_to_parent_allocator.is_allocation_suppressed());
 }
 
 // UpdateFromChild() on a parent allocator should accept the child's sequence
@@ -105,6 +110,7 @@
             child_allocated_local_surface_id.nonce());
   EXPECT_EQ(returned_local_surface_id,
             child_updated_parent_allocator.last_known_local_surface_id());
+  EXPECT_FALSE(child_updated_parent_allocator.is_allocation_suppressed());
 }
 
 // GenerateId() on a parent allocator should monotonically increment the parent
@@ -129,6 +135,7 @@
             postgenerateid_local_surface_id.nonce());
   EXPECT_EQ(returned_local_surface_id,
             generating_parent_allocator.last_known_local_surface_id());
+  EXPECT_FALSE(generating_parent_allocator.is_allocation_suppressed());
 }
 
 // This test verifies that calling reset with a LocalSurfaceId updates the
diff --git a/components/viz/common/surfaces/scoped_surface_id_allocator.cc b/components/viz/common/surfaces/scoped_surface_id_allocator.cc
new file mode 100644
index 0000000..7facc19
--- /dev/null
+++ b/components/viz/common/surfaces/scoped_surface_id_allocator.cc
@@ -0,0 +1,59 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
+
+#include <utility>
+
+#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
+
+namespace viz {
+
+ScopedSurfaceIdAllocator::ScopedSurfaceIdAllocator(
+    base::OnceCallback<void()> allocation_task)
+    : allocation_task_(std::move(allocation_task)) {}
+
+ScopedSurfaceIdAllocator::ScopedSurfaceIdAllocator(
+    ParentLocalSurfaceIdAllocator* allocator,
+    base::OnceCallback<void()> allocation_task)
+    : allocator_(allocator), allocation_task_(std::move(allocation_task)) {
+  // If you hit this DCHECK, it is because you are attempting to allow multiple
+  // suppressions to be in flight at the same time.
+  DCHECK(!allocator->is_allocation_suppressed_);
+  allocator->is_allocation_suppressed_ = true;
+}
+
+ScopedSurfaceIdAllocator::ScopedSurfaceIdAllocator(
+    ScopedSurfaceIdAllocator&& other)
+    : allocator_(std::move(other.allocator_)),
+      allocation_task_(std::move(other.allocation_task_)) {
+  other.allocator_ = nullptr;
+  DCHECK(other.allocation_task_.is_null());
+}
+
+ScopedSurfaceIdAllocator& ScopedSurfaceIdAllocator::operator=(
+    ScopedSurfaceIdAllocator&& other) {
+  ScopedSurfaceIdAllocator temp(std::move(other));
+  swap(*this, temp);
+  return *this;
+}
+
+ScopedSurfaceIdAllocator::~ScopedSurfaceIdAllocator() {
+  if (allocator_) {
+    DCHECK(allocator_->is_allocation_suppressed_);
+    allocator_->is_allocation_suppressed_ = false;
+  }
+
+  if (allocation_task_)
+    std::move(allocation_task_).Run();
+}
+
+void swap(ScopedSurfaceIdAllocator& first, ScopedSurfaceIdAllocator& second) {
+  using std::swap;  // to enable ADL
+
+  swap(first.allocator_, second.allocator_);
+  swap(first.allocation_task_, second.allocation_task_);
+}
+
+}  // namespace viz
diff --git a/components/viz/common/surfaces/scoped_surface_id_allocator.h b/components/viz/common/surfaces/scoped_surface_id_allocator.h
new file mode 100644
index 0000000..f49bb98f
--- /dev/null
+++ b/components/viz/common/surfaces/scoped_surface_id_allocator.h
@@ -0,0 +1,46 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_VIZ_COMMON_SURFACES_SCOPED_SURFACE_ID_ALLOCATOR_H_
+#define COMPONENTS_VIZ_COMMON_SURFACES_SCOPED_SURFACE_ID_ALLOCATOR_H_
+
+#include "base/callback.h"
+#include "components/viz/common/surfaces/local_surface_id.h"
+#include "components/viz/common/viz_common_export.h"
+
+namespace viz {
+class ParentLocalSurfaceIdAllocator;
+
+// While a ScopedSurfaceIdAllocator is alive, it suppresses allocation from the
+// ParentLocalSurfaceIdAllocator that was provided to it during construction.
+// When the destructor is called, the allocation_task is called. This allows for
+// one allocation event to happen during the lifetime of this object.
+//
+// The default constructor leave that parent allocator invalid and does no
+// suppression and doesn't call the allocation_task.
+class VIZ_COMMON_EXPORT ScopedSurfaceIdAllocator {
+ public:
+  explicit ScopedSurfaceIdAllocator(base::OnceCallback<void()> allocation_task);
+  explicit ScopedSurfaceIdAllocator(ParentLocalSurfaceIdAllocator* allocator,
+                                    base::OnceCallback<void()> allocation_task);
+
+  ScopedSurfaceIdAllocator(const ScopedSurfaceIdAllocator& other) = delete;
+  ScopedSurfaceIdAllocator& operator=(const ScopedSurfaceIdAllocator& other) =
+      delete;
+  ScopedSurfaceIdAllocator(ScopedSurfaceIdAllocator&& other);
+  ScopedSurfaceIdAllocator& operator=(ScopedSurfaceIdAllocator&& other);
+
+  ~ScopedSurfaceIdAllocator();
+
+  friend void swap(ScopedSurfaceIdAllocator& first,
+                   ScopedSurfaceIdAllocator& second);
+
+ private:
+  ParentLocalSurfaceIdAllocator* allocator_ = nullptr;
+  base::OnceCallback<void()> allocation_task_;
+};
+
+}  // namespace viz
+
+#endif  // COMPONENTS_VIZ_COMMON_SURFACES_SCOPED_SURFACE_ID_ALLOCATOR_H_
diff --git a/components/viz/common/surfaces/scoped_surface_id_allocator_unittest.cc b/components/viz/common/surfaces/scoped_surface_id_allocator_unittest.cc
new file mode 100644
index 0000000..5cdccd0
--- /dev/null
+++ b/components/viz/common/surfaces/scoped_surface_id_allocator_unittest.cc
@@ -0,0 +1,117 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
+
+#include "base/bind.h"
+#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+// ScopedSurfaceIdAllocator has no accessors which can be used to check
+// behavior. ParentLocalSurfaceIdAllocator has the accessors we need:
+// - is_allocation_suppressed()
+//
+// For every operation which changes state we can test:
+// - the operation completed as expected,
+// - the accessors did not change, and/or
+// - the accessors changed in the way we expected.
+
+namespace viz {
+
+// The single argument constructor takes a callback which should be called when
+// the ScopedSurfaceIdAllocator goes out of scope.
+TEST(ScopedSurfaceIdAllocatorTest,
+     SingleArgumentConstructorShouldCallCallback) {
+  bool callback_called = false;
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      [](bool* callback_called) { *callback_called = true; }, &callback_called);
+
+  {
+    ScopedSurfaceIdAllocator callback_allocator(std::move(allocation_task));
+
+    EXPECT_FALSE(callback_called);
+  }
+  EXPECT_TRUE(callback_called);
+}
+
+// The dual argument constructor takes a ParentLocalSurfaceIdAllocator* and a
+// callback. The parent allocator should be suppressed while the
+// ScopedSurfaceIdAllocator is alive. When it goes out of scope, the callback
+// should be called.
+TEST(ScopedSurfaceIdAllocatorTest,
+     DualArgumentConstructorShouldSuppressParentAndCallCallback) {
+  bool callback_called = false;
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      [](bool* callback_called) { *callback_called = true; }, &callback_called);
+  ParentLocalSurfaceIdAllocator parent_allocator;
+  EXPECT_FALSE(parent_allocator.is_allocation_suppressed());
+
+  {
+    ScopedSurfaceIdAllocator suppressing_allocator(&parent_allocator,
+                                                   std::move(allocation_task));
+
+    EXPECT_TRUE(parent_allocator.is_allocation_suppressed());
+    EXPECT_FALSE(callback_called);
+  }
+  EXPECT_TRUE(callback_called);
+}
+
+// The move constructor should transfer suppression and callback lifetime.
+TEST(ScopedSurfaceIdAllocatorTest, MoveConstructorShouldTransferLifetimes) {
+  bool callback_called = false;
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      [](bool* callback_called) { *callback_called = true; }, &callback_called);
+  ParentLocalSurfaceIdAllocator parent_allocator;
+  EXPECT_FALSE(parent_allocator.is_allocation_suppressed());
+  {
+    ScopedSurfaceIdAllocator moved_from_allocator(&parent_allocator,
+                                                  std::move(allocation_task));
+    EXPECT_TRUE(parent_allocator.is_allocation_suppressed());
+
+    {
+      ScopedSurfaceIdAllocator moved_to_allocator(
+          std::move(moved_from_allocator));
+
+      EXPECT_TRUE(parent_allocator.is_allocation_suppressed());
+      EXPECT_FALSE(callback_called);
+    }
+    EXPECT_FALSE(parent_allocator.is_allocation_suppressed());
+    EXPECT_TRUE(callback_called);
+  }
+}
+
+// The move assignment operator should transfer suppression and callback
+// lifetime.
+TEST(ScopedSurfaceIdAllocatorTest,
+     MoveAssignmentOperatorShouldTransferLifetimes) {
+  bool callback_called = false;
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      [](bool* callback_called) { *callback_called = true; }, &callback_called);
+  bool second_callback_called = false;
+  base::OnceCallback<void()> second_allocation_task = base::BindOnce(
+      [](bool* second_callback_called) { *second_callback_called = true; },
+      &second_callback_called);
+  ParentLocalSurfaceIdAllocator parent_allocator;
+  EXPECT_FALSE(parent_allocator.is_allocation_suppressed());
+  {
+    ScopedSurfaceIdAllocator moved_from_allocator(&parent_allocator,
+                                                  std::move(allocation_task));
+    EXPECT_TRUE(parent_allocator.is_allocation_suppressed());
+    {
+      ScopedSurfaceIdAllocator moved_to_allocator(
+          std::move(second_allocation_task));
+      EXPECT_FALSE(second_callback_called);
+
+      moved_to_allocator = std::move(moved_from_allocator);
+
+      EXPECT_TRUE(parent_allocator.is_allocation_suppressed());
+      EXPECT_FALSE(callback_called);
+      EXPECT_TRUE(second_callback_called);
+    }
+    EXPECT_FALSE(parent_allocator.is_allocation_suppressed());
+    EXPECT_TRUE(callback_called);
+  }
+}
+
+}  // namespace viz
diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc
index 9354bc5..4ceddaa 100644
--- a/components/viz/service/display/surface_aggregator.cc
+++ b/components/viz/service/display/surface_aggregator.cc
@@ -844,9 +844,6 @@
   if (!surface->HasActiveFrame())
     return gfx::Rect();
 
-  if (will_draw)
-    manager_->SurfaceWillBeDrawn(surface);
-
   const CompositorFrame& frame = surface->GetActiveFrame();
   int child_id = 0;
   // TODO(jbauman): hack for unit tests that don't set up rp
@@ -1061,6 +1058,9 @@
     surface->NotifyAggregatedDamage(damage_rect);
   }
 
+  if (will_draw)
+    surface->OnWillBeDrawn();
+
   CHECK(debug_weak_this.get());
   for (const auto& render_pass : frame.render_pass_list) {
     if (!render_pass->copy_requests.empty()) {
@@ -1101,11 +1101,7 @@
     if (!surface->HasActiveFrame())
       continue;
     const CompositorFrame& frame = surface->GetActiveFrame();
-    bool surface_has_copy_requests = false;
-    for (const auto& render_pass : frame.render_pass_list) {
-      surface_has_copy_requests |= !render_pass->copy_requests.empty();
-    }
-    if (!surface_has_copy_requests) {
+    if (!surface->HasCopyOutputRequests()) {
       // Children are not necessarily included in undrawn_surfaces (because
       // they weren't referenced directly from a drawn surface), but may have
       // copy requests, so make sure to check them as well.
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
index 82d3cfb2..13948ef 100644
--- a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
+++ b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
@@ -147,6 +147,15 @@
   surface_resource_holder_.ReceiveFromChild(resources);
 }
 
+bool CompositorFrameSinkSupport::HasCopyOutputRequests() {
+  return !copy_output_requests_.empty();
+}
+
+std::vector<std::unique_ptr<CopyOutputRequest>>
+CompositorFrameSinkSupport::TakeCopyOutputRequests() {
+  return std::move(copy_output_requests_);
+}
+
 void CompositorFrameSinkSupport::EvictLastActivatedSurface() {
   if (!last_activated_surface_id_.is_valid())
     return;
@@ -483,13 +492,10 @@
     std::unique_ptr<CopyOutputRequest> copy_request) {
   if (!last_activated_surface_id_.is_valid())
     return;
-  Surface* current_surface =
-      surface_manager_->GetSurfaceForId(last_activated_surface_id_);
-  current_surface->RequestCopyOfOutput(std::move(copy_request));
+  copy_output_requests_.push_back(std::move(copy_request));
   BeginFrameAck ack;
   ack.has_damage = true;
-  if (current_surface->HasActiveFrame())
-    surface_manager_->SurfaceModified(current_surface->surface_id(), ack);
+  surface_manager_->SurfaceModified(last_activated_surface_id_, ack);
 }
 
 HitTestAggregator* CompositorFrameSinkSupport::GetHitTestAggregator() {
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support.h b/components/viz/service/frame_sinks/compositor_frame_sink_support.h
index ff786b0..aae2a88 100644
--- a/components/viz/service/frame_sinks/compositor_frame_sink_support.h
+++ b/components/viz/service/frame_sinks/compositor_frame_sink_support.h
@@ -90,6 +90,9 @@
   void ReturnResources(const std::vector<ReturnedResource>& resources) override;
   void ReceiveFromChild(
       const std::vector<TransferableResource>& resources) override;
+  bool HasCopyOutputRequests() override;
+  std::vector<std::unique_ptr<CopyOutputRequest>> TakeCopyOutputRequests()
+      override;
 
   // mojom::CompositorFrameSink helpers.
   void SetNeedsBeginFrame(bool needs_begin_frame);
@@ -239,6 +242,11 @@
   // ownership of the bitmaps with these ids to avoid leaking them.
   std::set<SharedBitmapId> owned_bitmaps_;
 
+  // These are the CopyOutputRequests made on the frame sink (as opposed to
+  // being included as a part of a CompositorFrame). They stay here until a
+  // Surface takes them.
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_output_requests_;
+
   base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport);
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
index 252e1f2..19997ffe 100644
--- a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
+++ b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
@@ -47,6 +47,8 @@
 const base::UnguessableToken kArbitrarySourceId2 =
     base::UnguessableToken::Deserialize(0xdead, 0xbee0);
 
+void StubResultCallback(std::unique_ptr<CopyOutputResult> result) {}
+
 gpu::SyncToken GenTestSyncToken(int id) {
   gpu::SyncToken token;
   token.Set(gpu::CommandBufferNamespace::GPU_IO,
@@ -619,8 +621,9 @@
 }
 
 TEST_F(CompositorFrameSinkSupportTest, DuplicateCopyRequest) {
+  const SurfaceId surface_id(support_->frame_sink_id(), local_surface_id_);
+
   {
-    const SurfaceId surface_id(support_->frame_sink_id(), local_surface_id_);
     auto frame = CompositorFrameBuilder()
                      .AddDefaultRenderPass()
                      .SetReferencedSurfaces({surface_id})
@@ -637,6 +640,7 @@
   request->set_source(kArbitrarySourceId1);
 
   support_->RequestCopyOfSurface(std::move(request));
+  GetSurfaceForId(surface_id)->OnWillBeDrawn();
   EXPECT_FALSE(called1);
 
   bool called2 = false;
@@ -646,6 +650,7 @@
   request->set_source(kArbitrarySourceId2);
 
   support_->RequestCopyOfSurface(std::move(request));
+  GetSurfaceForId(surface_id)->OnWillBeDrawn();
   // Callbacks have different sources so neither should be called.
   EXPECT_FALSE(called1);
   EXPECT_FALSE(called2);
@@ -657,6 +662,7 @@
   request->set_source(kArbitrarySourceId1);
 
   support_->RequestCopyOfSurface(std::move(request));
+  GetSurfaceForId(surface_id)->OnWillBeDrawn();
   // Two callbacks are from source1, so the first should be called.
   EXPECT_TRUE(called1);
   EXPECT_FALSE(called2);
@@ -804,5 +810,181 @@
   EXPECT_EQ(frame_index + 1, surface2->GetActiveFrameIndex());
 }
 
+// If the first surface is the one reported being drawn by SurfaceAggregator,
+// move CopyOutputRequest to that surface.
+TEST_F(CompositorFrameSinkSupportTest,
+       FirstSurfaceIsDrawnAndReceivesCopyRequest) {
+  LocalSurfaceId local_surface_id1(1, kArbitraryToken);
+  LocalSurfaceId local_surface_id2(2, kArbitraryToken);
+  SurfaceId id1(support_->frame_sink_id(), local_surface_id1);
+  SurfaceId id2(support_->frame_sink_id(), local_surface_id2);
+
+  // Create the first surface.
+  support_->SubmitCompositorFrame(local_surface_id1,
+                                  MakeDefaultCompositorFrame());
+
+  // Create the second surface.
+  support_->SubmitCompositorFrame(local_surface_id2,
+                                  MakeDefaultCompositorFrame());
+
+  // Send a CopyOutputRequest.
+  auto request = std::make_unique<CopyOutputRequest>(
+      CopyOutputRequest::ResultFormat::RGBA_BITMAP,
+      base::BindOnce(StubResultCallback));
+  support_->RequestCopyOfSurface(std::move(request));
+
+  // Both surfaces should report that they have a CopyOutputRequest.
+  EXPECT_TRUE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_TRUE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Notify that the first surface will be drawn. Now only the first surface
+  // should report having CopyOutputRequests.
+  GetSurfaceForId(id1)->OnWillBeDrawn();
+  EXPECT_TRUE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_FALSE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Also try TakeCopyOutputRequests, to see if its output is consistent with
+  // HasCopyOutputRequests.
+  Surface::CopyRequestsMap requests_map;
+  GetSurfaceForId(id2)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+  GetSurfaceForId(id1)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_FALSE(requests_map.empty());
+}
+
+// If the second surface is the one reported being drawn by SurfaceAggregator,
+// move CopyOutputRequest to that surface.
+TEST_F(CompositorFrameSinkSupportTest,
+       SecondSurfaceIsDrawnAndReceivesCopyRequest) {
+  LocalSurfaceId local_surface_id1(1, kArbitraryToken);
+  LocalSurfaceId local_surface_id2(2, kArbitraryToken);
+  SurfaceId id1(support_->frame_sink_id(), local_surface_id1);
+  SurfaceId id2(support_->frame_sink_id(), local_surface_id2);
+
+  // Create the first surface.
+  support_->SubmitCompositorFrame(local_surface_id1,
+                                  MakeDefaultCompositorFrame());
+
+  // Send a CopyOutputRequest. Note that the second surface doesn't even exist
+  // yet.
+  auto request = std::make_unique<CopyOutputRequest>(
+      CopyOutputRequest::ResultFormat::RGBA_BITMAP,
+      base::BindOnce(StubResultCallback));
+  support_->RequestCopyOfSurface(std::move(request));
+
+  // Create the second surface.
+  support_->SubmitCompositorFrame(local_surface_id2,
+                                  MakeDefaultCompositorFrame());
+
+  // Both surfaces should report that they have a CopyOutputRequest.
+  EXPECT_TRUE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_TRUE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Notify that the second surface will be drawn. Now only the second surface
+  // should report having CopyOutputRequests.
+  GetSurfaceForId(id2)->OnWillBeDrawn();
+  EXPECT_FALSE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_TRUE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Also try TakeCopyOutputRequests, to see if its output is consistent with
+  // HasCopyOutputRequests.
+  Surface::CopyRequestsMap requests_map;
+  GetSurfaceForId(id1)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+  GetSurfaceForId(id2)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_FALSE(requests_map.empty());
+}
+
+// Move CopyOutputRequests to whatever surface wants it first (in this test, the
+// first surface).
+TEST_F(CompositorFrameSinkSupportTest, FirstSurfaceTakesCopyRequest) {
+  LocalSurfaceId local_surface_id1(1, kArbitraryToken);
+  LocalSurfaceId local_surface_id2(2, kArbitraryToken);
+  SurfaceId id1(support_->frame_sink_id(), local_surface_id1);
+  SurfaceId id2(support_->frame_sink_id(), local_surface_id2);
+
+  // Create the first surface.
+  support_->SubmitCompositorFrame(local_surface_id1,
+                                  MakeDefaultCompositorFrame());
+
+  // Create the second surface.
+  support_->SubmitCompositorFrame(local_surface_id2,
+                                  MakeDefaultCompositorFrame());
+
+  // Send a CopyOutputRequest.
+  auto request = std::make_unique<CopyOutputRequest>(
+      CopyOutputRequest::ResultFormat::RGBA_BITMAP,
+      base::BindOnce(StubResultCallback));
+  support_->RequestCopyOfSurface(std::move(request));
+
+  // Both surfaces should report that they have a CopyOutputRequest.
+  EXPECT_TRUE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_TRUE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Neither surface will be reported drawn. We call TakeCopyOutputRequests()
+  // on |id1| first so it takes it.
+  Surface::CopyRequestsMap requests_map;
+  GetSurfaceForId(id1)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_FALSE(requests_map.empty());
+
+  // Neither surface should report having CopyOutputRequests anymore.
+  EXPECT_FALSE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_FALSE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Also try TakeCopyOutputRequests, to see if its output is consistent with
+  // HasCopyOutputRequests.
+  requests_map.clear();
+  GetSurfaceForId(id2)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+  GetSurfaceForId(id1)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+}
+
+// Move CopyOutputRequests to whatever surface wants it first (in this test, the
+// second surface).
+TEST_F(CompositorFrameSinkSupportTest, SecondSurfaceTakesCopyRequest) {
+  LocalSurfaceId local_surface_id1(1, kArbitraryToken);
+  LocalSurfaceId local_surface_id2(2, kArbitraryToken);
+  SurfaceId id1(support_->frame_sink_id(), local_surface_id1);
+  SurfaceId id2(support_->frame_sink_id(), local_surface_id2);
+
+  // Create the first surface.
+  support_->SubmitCompositorFrame(local_surface_id1,
+                                  MakeDefaultCompositorFrame());
+
+  // Send a CopyOutputRequest. Note that the second surface doesn't even exist
+  // yet.
+  auto request = std::make_unique<CopyOutputRequest>(
+      CopyOutputRequest::ResultFormat::RGBA_BITMAP,
+      base::BindOnce(StubResultCallback));
+  support_->RequestCopyOfSurface(std::move(request));
+
+  // Create the second surface.
+  support_->SubmitCompositorFrame(local_surface_id2,
+                                  MakeDefaultCompositorFrame());
+
+  // Both surfaces should report that they have a CopyOutputRequest.
+  EXPECT_TRUE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_TRUE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Neither surface will be reported drawn. We call TakeCopyOutputRequests()
+  // on |id2| first so it takes it.
+  Surface::CopyRequestsMap requests_map;
+  GetSurfaceForId(id2)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_FALSE(requests_map.empty());
+
+  // Neither surface should report having CopyOutputRequests anymore.
+  EXPECT_FALSE(GetSurfaceForId(id1)->HasCopyOutputRequests());
+  EXPECT_FALSE(GetSurfaceForId(id2)->HasCopyOutputRequests());
+
+  // Also try TakeCopyOutputRequests, to see if its output is consistent with
+  // HasCopyOutputRequests.
+  requests_map.clear();
+  GetSurfaceForId(id2)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+  GetSurfaceForId(id1)->TakeCopyOutputRequests(&requests_map);
+  EXPECT_TRUE(requests_map.empty());
+}
+
 }  // namespace
 }  // namespace viz
diff --git a/components/viz/service/surfaces/surface.cc b/components/viz/service/surfaces/surface.cc
index 416b5fcd..2ea2ea7b 100644
--- a/components/viz/service/surfaces/surface.cc
+++ b/components/viz/service/surfaces/surface.cc
@@ -423,6 +423,8 @@
   if (!active_frame_data_)
     return;
 
+  TakeCopyOutputRequestsFromClient();
+
   for (const auto& render_pass : active_frame_data_->frame.render_pass_list) {
     for (auto& request : render_pass->copy_requests) {
       copy_requests->insert(
@@ -432,6 +434,18 @@
   }
 }
 
+bool Surface::HasCopyOutputRequests() {
+  if (!active_frame_data_)
+    return false;
+  if (surface_client_ && surface_client_->HasCopyOutputRequests())
+    return true;
+  for (const auto& render_pass : active_frame_data_->frame.render_pass_list) {
+    if (!render_pass->copy_requests.empty())
+      return true;
+  }
+  return false;
+}
+
 const CompositorFrame& Surface::GetActiveFrame() const {
   DCHECK(active_frame_data_);
   return active_frame_data_->frame;
@@ -528,4 +542,18 @@
   frame->metadata.latency_info.clear();
 }
 
+void Surface::OnWillBeDrawn() {
+  TakeCopyOutputRequestsFromClient();
+  surface_manager_->SurfaceWillBeDrawn(this);
+}
+
+void Surface::TakeCopyOutputRequestsFromClient() {
+  if (!surface_client_)
+    return;
+  for (std::unique_ptr<CopyOutputRequest>& request :
+       surface_client_->TakeCopyOutputRequests()) {
+    RequestCopyOfOutput(std::move(request));
+  }
+}
+
 }  // namespace viz
diff --git a/components/viz/service/surfaces/surface.h b/components/viz/service/surfaces/surface.h
index e65ccb4..13a37537 100644
--- a/components/viz/service/surfaces/surface.h
+++ b/components/viz/service/surfaces/surface.h
@@ -127,7 +127,6 @@
                   base::OnceClosure draw_callback,
                   const AggregatedDamageCallback& aggregated_damage_callback,
                   PresentedCallback presented_callback);
-  void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request);
 
   // Notifies the Surface that a blocking SurfaceId now has an active
   // frame.
@@ -146,6 +145,10 @@
   // ids.
   void TakeCopyOutputRequests(CopyRequestsMap* copy_requests);
 
+  // Returns whether there is a CopyOutputRequest inside the active frame or at
+  // the client level.
+  bool HasCopyOutputRequests();
+
   // Returns the most recent frame that is eligible to be rendered.
   // You must check whether HasActiveFrame() returns true before calling this
   // method.
@@ -193,6 +196,9 @@
   // SurfaceDeadlineClient implementation:
   void OnDeadline(base::TimeDelta duration) override;
 
+  // Called when this surface will be included in the next display frame.
+  void OnWillBeDrawn();
+
  private:
   struct SequenceNumbers {
     uint32_t parent_sequence_number = 0u;
@@ -247,6 +253,10 @@
       CompositorFrame* frame,
       std::vector<ui::LatencyInfo>* latency_info);
 
+  void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request);
+
+  void TakeCopyOutputRequestsFromClient();
+
   const SurfaceInfo surface_info_;
   SurfaceId previous_frame_surface_id_;
   SurfaceManager* const surface_manager_;
diff --git a/components/viz/service/surfaces/surface_client.h b/components/viz/service/surfaces/surface_client.h
index 599564f5..8d26045 100644
--- a/components/viz/service/surfaces/surface_client.h
+++ b/components/viz/service/surfaces/surface_client.h
@@ -46,6 +46,13 @@
   virtual void ReceiveFromChild(
       const std::vector<TransferableResource>& resources) = 0;
 
+  // Returns whether there are any CopyOutputRequests at the client level.
+  virtual bool HasCopyOutputRequests() = 0;
+
+  // Takes all the CopyOutputRequests made at the client level.
+  virtual std::vector<std::unique_ptr<CopyOutputRequest>>
+  TakeCopyOutputRequests() = 0;
+
  private:
   DISALLOW_COPY_AND_ASSIGN(SurfaceClient);
 };
diff --git a/components/viz/service/surfaces/surface_unittest.cc b/components/viz/service/surfaces/surface_unittest.cc
index e4aeb448..ea3d8b5 100644
--- a/components/viz/service/surfaces/surface_unittest.cc
+++ b/components/viz/service/surfaces/surface_unittest.cc
@@ -94,6 +94,7 @@
   support->RequestCopyOfSurface(std::make_unique<CopyOutputRequest>(
       CopyOutputRequest::ResultFormat::RGBA_BITMAP,
       base::BindOnce(&TestCopyResultCallback, &copy_called)));
+  surface->OnWillBeDrawn();
   EXPECT_TRUE(surface_manager->GetSurfaceForId(surface_id));
   EXPECT_FALSE(copy_called);
 
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 4ec2a3d..db266c7 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1151,8 +1151,6 @@
     "net/network_quality_observer_impl.h",
     "net/quota_policy_cookie_store.cc",
     "net/quota_policy_cookie_store.h",
-    "net/quota_policy_cookie_store_netlog_params.cc",
-    "net/quota_policy_cookie_store_netlog_params.h",
     "net/view_blob_internals_job_factory.cc",
     "net/view_blob_internals_job_factory.h",
     "network_service_client.cc",
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 2986bf0..4ce79a4 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -557,6 +557,19 @@
   return navigation_data_.get();
 }
 
+void NavigationHandleImpl::RegisterSubresourceOverride(
+    mojom::TransferrableURLLoaderPtr transferrable_loader) {
+  if (!transferrable_loader)
+    return;
+
+  NavigationRequest* request = frame_tree_node_->navigation_request();
+  if (!request)
+    request = frame_tree_node_->current_frame_host()->navigation_request();
+
+  if (request)
+    request->RegisterSubresourceOverride(std::move(transferrable_loader));
+}
+
 void NavigationHandleImpl::SetOnDeferCallbackForTesting(
     const base::Closure& on_defer_callback) {
   on_defer_callback_for_testing_ = on_defer_callback;
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index fa25942..90c11ed 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -168,6 +168,8 @@
                                 NavigationThrottle::ThrottleCheckResult result);
 
   NavigationData* GetNavigationData() override;
+  void RegisterSubresourceOverride(
+      mojom::TransferrableURLLoaderPtr transferrable_loader) override;
 
   // Used in tests.
   State state_for_testing() const { return state_; }
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index cc193622..2b5446b5 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -641,6 +641,14 @@
   state_ = NOT_STARTED;
 }
 
+void NavigationRequest::RegisterSubresourceOverride(
+    mojom::TransferrableURLLoaderPtr transferrable_loader) {
+  if (!subresource_overrides_)
+    subresource_overrides_.emplace();
+
+  subresource_overrides_->push_back(std::move(transferrable_loader));
+}
+
 void NavigationRequest::OnRequestRedirected(
     const net::RedirectInfo& redirect_info,
     const scoped_refptr<network::ResourceResponse>& response) {
@@ -1366,7 +1374,8 @@
   render_frame_host->CommitNavigation(
       response_.get(), std::move(url_loader_client_endpoints_),
       std::move(body_), common_params_, request_params_, is_view_source_,
-      std::move(subresource_loader_params_), devtools_navigation_token_);
+      std::move(subresource_loader_params_), std::move(subresource_overrides_),
+      devtools_navigation_token_);
 }
 
 NavigationRequest::ContentSecurityPolicyCheckResult
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h
index 3f6d454..8a315221 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -202,6 +202,9 @@
   // due to another navigation committing in the meantime.
   void ResetForCrossDocumentRestart();
 
+  void RegisterSubresourceOverride(
+      mojom::TransferrableURLLoaderPtr transferrable_loader);
+
  private:
   // This enum describes the result of a Content Security Policy (CSP) check for
   // the request.
@@ -391,6 +394,9 @@
   // See comment on accessor.
   base::UnguessableToken devtools_navigation_token_;
 
+  base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+      subresource_overrides_;
+
   base::WeakPtrFactory<NavigationRequest> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 7a282761..d073aa6 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3354,6 +3354,7 @@
   CommitNavigation(nullptr, network::mojom::URLLoaderClientEndpointsPtr(),
                    std::unique_ptr<StreamHandle>(), common_params,
                    RequestNavigationParams(), false, base::nullopt,
+                   base::nullopt /* subresource_overrides */,
                    base::UnguessableToken::Create() /* not traced */);
 }
 
@@ -3502,6 +3503,8 @@
     const RequestNavigationParams& request_params,
     bool is_view_source,
     base::Optional<SubresourceLoaderParams> subresource_loader_params,
+    base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+        subresource_overrides,
     const base::UnguessableToken& devtools_navigation_token) {
   TRACE_EVENT2("navigation", "RenderFrameHostImpl::CommitNavigation",
                "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
@@ -3646,6 +3649,7 @@
         head, body_url, common_params, request_params,
         std::move(url_loader_client_endpoints),
         std::move(subresource_loader_factories),
+        std::move(subresource_overrides),
         std::move(controller_service_worker_info), devtools_navigation_token);
 
     // If a network request was made, update the Previews state.
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index c6c75f1..1a5e957f 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -51,6 +51,7 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/common/javascript_dialog_type.h"
 #include "content/public/common/previews_state.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "media/mojo/interfaces/interface_factory.mojom.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/system/data_pipe.h"
@@ -564,6 +565,8 @@
       const RequestNavigationParams& request_params,
       bool is_view_source,
       base::Optional<SubresourceLoaderParams> subresource_loader_params,
+      base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+          subresource_overrides,
       const base::UnguessableToken& devtools_navigation_token);
 
   // Indicates that a navigation failed and that this RenderFrame should display
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index d1a4d2f..21461e2 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -724,11 +724,17 @@
     RenderWidgetHostViewBase::GetScreenInfo(screen_info);
 }
 
-void RenderWidgetHostViewGuest::ResizeDueToAutoResize(
+viz::ScopedSurfaceIdAllocator RenderWidgetHostViewGuest::ResizeDueToAutoResize(
     const gfx::Size& new_size,
     uint64_t sequence_number) {
-  if (guest_)
-    guest_->ResizeDueToAutoResize(new_size, sequence_number);
+  // TODO(cblume): This doesn't currently suppress allocation.
+  // It maintains existing behavior while using the suppression style.
+  // This will be addressed in a follow-up patch.
+  // See https://crbug.com/805073
+  base::OnceCallback<void()> allocation_task =
+      base::BindOnce(&BrowserPluginGuest::ResizeDueToAutoResize, guest_,
+                     new_size, sequence_number);
+  return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
 }
 
 bool RenderWidgetHostViewGuest::IsRenderWidgetHostViewGuest() {
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index b236858f..5fcfef4 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -154,8 +154,9 @@
 
   void GetScreenInfo(ScreenInfo* screen_info) const override;
 
-  void ResizeDueToAutoResize(const gfx::Size& new_size,
-                             uint64_t sequence_number) override;
+  viz::ScopedSurfaceIdAllocator ResizeDueToAutoResize(
+      const gfx::Size& new_size,
+      uint64_t sequence_number) override;
 
  private:
   friend class RenderWidgetHostView;
diff --git a/content/browser/loader/navigation_url_loader_network_service.cc b/content/browser/loader/navigation_url_loader_network_service.cc
index 8bda0ac..1041f99 100644
--- a/content/browser/loader/navigation_url_loader_network_service.cc
+++ b/content/browser/loader/navigation_url_loader_network_service.cc
@@ -672,8 +672,13 @@
       return;
 
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints;
+
+    // Currently only plugin handlers may intercept the response. Don't treat
+    // the response as download if it has been handled by plugins.
+    bool response_intercepted = false;
     if (url_loader_) {
       url_loader_client_endpoints = url_loader_->Unbind();
+      response_intercepted = url_loader_->response_intercepted();
     } else {
       url_loader_client_endpoints =
           network::mojom::URLLoaderClientEndpoints::New(
@@ -689,7 +694,8 @@
     bool is_stream;
     std::unique_ptr<NavigationData> cloned_navigation_data;
     if (IsRequestHandlerEnabled()) {
-      is_download = IsDownload(*response.get(), url_, url_chain_,
+      is_download = !response_intercepted &&
+                    IsDownload(*response.get(), url_, url_chain_,
                                initiator_origin_, suggested_filename_);
       is_stream = false;
     } else {
@@ -697,7 +703,7 @@
       net::URLRequest* url_request = rdh->GetURLRequest(global_request_id_);
       ResourceRequestInfoImpl* info =
           ResourceRequestInfoImpl::ForRequest(url_request);
-      is_download = info->IsDownload();
+      is_download = !response_intercepted && info->IsDownload();
       is_stream = info->is_stream();
       if (rdh->delegate()) {
         NavigationData* navigation_data =
diff --git a/content/browser/net/quota_policy_cookie_store.cc b/content/browser/net/quota_policy_cookie_store.cc
index 4522241f..9eaa19e 100644
--- a/content/browser/net/quota_policy_cookie_store.cc
+++ b/content/browser/net/quota_policy_cookie_store.cc
@@ -14,15 +14,12 @@
 #include "base/memory/ref_counted.h"
 #include "base/sequenced_task_runner.h"
 #include "base/task_scheduler/post_task.h"
-#include "content/browser/net/quota_policy_cookie_store_netlog_params.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/cookie_store_factory.h"
 #include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_constants.h"
 #include "net/cookies/cookie_util.h"
 #include "net/extras/sqlite/cookie_crypto_delegate.h"
-#include "net/log/net_log.h"
-#include "net/log/net_log_source_type.h"
 #include "storage/browser/quota/special_storage_policy.h"
 #include "url/gurl.h"
 
@@ -32,18 +29,36 @@
     const scoped_refptr<net::SQLitePersistentCookieStore>& cookie_store,
     storage::SpecialStoragePolicy* special_storage_policy)
     : special_storage_policy_(special_storage_policy),
-      persistent_store_(cookie_store) {}
-
-QuotaPolicyCookieStore::~QuotaPolicyCookieStore() {
-  Close();
+      persistent_store_(cookie_store) {
 }
 
-void QuotaPolicyCookieStore::Load(const LoadedCallback& loaded_callback,
-                                  const net::NetLogWithSource& net_log) {
-  net_log_ = net_log;
-  persistent_store_->Load(base::BindRepeating(&QuotaPolicyCookieStore::OnLoad,
-                                              this, loaded_callback),
-                          net_log);
+QuotaPolicyCookieStore::~QuotaPolicyCookieStore() {
+  if (!special_storage_policy_.get() ||
+      !special_storage_policy_->HasSessionOnlyOrigins()) {
+    return;
+  }
+
+  std::list<net::SQLitePersistentCookieStore::CookieOrigin>
+      session_only_cookies;
+  for (const auto& cookie : cookies_per_origin_) {
+    if (cookie.second == 0) {
+      continue;
+    }
+    const GURL url(net::cookie_util::CookieOriginToURL(cookie.first.first,
+                                                       cookie.first.second));
+    if (!url.is_valid() ||
+        !special_storage_policy_->ShouldDeleteCookieOnExit(url))
+      continue;
+
+    session_only_cookies.push_back(cookie.first);
+  }
+
+  persistent_store_->DeleteAllInList(session_only_cookies);
+}
+
+void QuotaPolicyCookieStore::Load(const LoadedCallback& loaded_callback) {
+  persistent_store_->Load(
+      base::Bind(&QuotaPolicyCookieStore::OnLoad, this, loaded_callback));
 }
 
 void QuotaPolicyCookieStore::LoadCookiesForKey(
@@ -87,43 +102,6 @@
   persistent_store_->Flush(std::move(callback));
 }
 
-void QuotaPolicyCookieStore::Close() {
-  if (special_storage_policy_.get() &&
-      special_storage_policy_->HasSessionOnlyOrigins()) {
-    std::list<net::SQLitePersistentCookieStore::CookieOrigin>
-        session_only_cookies;
-    for (const auto& cookie : cookies_per_origin_) {
-      if (cookie.second == 0) {
-        continue;
-      }
-      const GURL url(net::cookie_util::CookieOriginToURL(cookie.first.first,
-                                                         cookie.first.second));
-      if (!url.is_valid() ||
-          !special_storage_policy_->ShouldDeleteCookieOnExit(url))
-        continue;
-
-      net_log_.AddEvent(
-          net::NetLogEventType::COOKIE_STORE_ORIGIN_FILTERED,
-          base::BindRepeating(&QuotaPolicyCookieStoreOriginFiltered,
-                              cookie.first.first, cookie.first.second));
-      session_only_cookies.push_back(cookie.first);
-    }
-
-    persistent_store_->DeleteAllInList(session_only_cookies);
-  }
-
-  net_log_.AddEvent(
-      net::NetLogEventType::COOKIE_STORE_PERSISTENT_CLOSED,
-      net::NetLog::StringCallback("type", "QuotaPolicyCookieStore"));
-
-  persistent_store_->Close();
-
-  net_log_ = net::NetLogWithSource();
-
-  // Make this function a no-op if called twice.
-  special_storage_policy_ = nullptr;
-}
-
 void QuotaPolicyCookieStore::OnLoad(
     const LoadedCallback& loaded_callback,
     std::vector<std::unique_ptr<net::CanonicalCookie>> cookies) {
@@ -163,13 +141,12 @@
 }
 
 std::unique_ptr<net::CookieStore> CreateCookieStore(
-    const CookieStoreConfig& config,
-    net::NetLog* net_log) {
+    const CookieStoreConfig& config) {
   std::unique_ptr<net::CookieMonster> cookie_monster;
 
   if (config.path.empty()) {
     // Empty path means in-memory store.
-    cookie_monster.reset(new net::CookieMonster(nullptr, net_log));
+    cookie_monster.reset(new net::CookieMonster(nullptr));
   } else {
     scoped_refptr<base::SequencedTaskRunner> client_task_runner =
         config.client_task_runner;
@@ -192,11 +169,13 @@
             config.path, client_task_runner, background_task_runner,
             config.restore_old_session_cookies, config.crypto_delegate));
 
-    QuotaPolicyCookieStore* persistent_store = new QuotaPolicyCookieStore(
-        sqlite_store.get(), config.storage_policy.get());
+    QuotaPolicyCookieStore* persistent_store =
+        new QuotaPolicyCookieStore(
+            sqlite_store.get(),
+            config.storage_policy.get());
 
-    cookie_monster.reset(new net::CookieMonster(
-        persistent_store, config.channel_id_service, net_log));
+    cookie_monster.reset(new net::CookieMonster(persistent_store,
+                                                config.channel_id_service));
     if (config.persist_session_cookies)
       cookie_monster->SetPersistSessionCookies(true);
   }
diff --git a/content/browser/net/quota_policy_cookie_store.h b/content/browser/net/quota_policy_cookie_store.h
index b1cde9f4..f55b34a 100644
--- a/content/browser/net/quota_policy_cookie_store.h
+++ b/content/browser/net/quota_policy_cookie_store.h
@@ -17,7 +17,6 @@
 #include "content/common/content_export.h"
 #include "net/cookies/cookie_monster.h"
 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
-#include "net/log/net_log_with_source.h"
 
 namespace net {
 class CanonicalCookie;
@@ -43,8 +42,7 @@
       storage::SpecialStoragePolicy* special_storage_policy);
 
   // net::CookieMonster::PersistentCookieStore:
-  void Load(const LoadedCallback& loaded_callback,
-            const net::NetLogWithSource& net_log) override;
+  void Load(const LoadedCallback& loaded_callback) override;
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& callback) override;
   void AddCookie(const net::CanonicalCookie& cc) override;
@@ -53,7 +51,6 @@
   void SetForceKeepSessionState() override;
   void SetBeforeFlushCallback(base::RepeatingClosure callback) override;
   void Flush(base::OnceClosure callback) override;
-  void Close() override;
 
  private:
   typedef std::map<net::SQLitePersistentCookieStore::CookieOrigin, size_t>
@@ -73,8 +70,6 @@
   scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
   scoped_refptr<net::SQLitePersistentCookieStore> persistent_store_;
 
-  net::NetLogWithSource net_log_;
-
   DISALLOW_COPY_AND_ASSIGN(QuotaPolicyCookieStore);
 };
 
diff --git a/content/browser/net/quota_policy_cookie_store_netlog_params.cc b/content/browser/net/quota_policy_cookie_store_netlog_params.cc
deleted file mode 100644
index b05deea2..0000000
--- a/content/browser/net/quota_policy_cookie_store_netlog_params.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/net/quota_policy_cookie_store_netlog_params.h"
-
-namespace content {
-
-std::unique_ptr<base::Value> QuotaPolicyCookieStoreOriginFiltered(
-    const std::string& origin,
-    bool secure,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("origin", base::Value(origin));
-  dict->SetKey("secure", base::Value(secure));
-  return dict;
-}
-
-}  // namespace content
diff --git a/content/browser/net/quota_policy_cookie_store_netlog_params.h b/content/browser/net/quota_policy_cookie_store_netlog_params.h
deleted file mode 100644
index a86ebe6d..0000000
--- a/content/browser/net/quota_policy_cookie_store_netlog_params.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_NET_QUOTA_POLICY_COOKIE_STORE_NETLOG_PARAMS_H_
-#define CONTENT_BROWSER_NET_QUOTA_POLICY_COOKIE_STORE_NETLOG_PARAMS_H_
-
-#include <memory>
-
-#include "base/values.h"
-#include "content/common/content_export.h"
-#include "net/log/net_log_capture_mode.h"
-
-namespace content {
-
-CONTENT_EXPORT std::unique_ptr<base::Value>
-QuotaPolicyCookieStoreOriginFiltered(const std::string& origin,
-                                     bool secure,
-                                     net::NetLogCaptureMode capture_mode);
-
-}  // namespace content
-
-#endif  // CONTENT_BROWSER_NET_QUOTA_POLICY_COOKIE_STORE_NETLOG_PARAMS_H_
diff --git a/content/browser/net/quota_policy_cookie_store_unittest.cc b/content/browser/net/quota_policy_cookie_store_unittest.cc
index f8a8215..2185402 100644
--- a/content/browser/net/quota_policy_cookie_store_unittest.cc
+++ b/content/browser/net/quota_policy_cookie_store_unittest.cc
@@ -50,8 +50,7 @@
   void Load(CanonicalCookieVector* cookies) {
     EXPECT_FALSE(loaded_event_.IsSignaled());
     store_->Load(base::Bind(&QuotaPolicyCookieStoreTest::OnLoaded,
-                            base::Unretained(this)),
-                 net::NetLogWithSource());
+                            base::Unretained(this)));
     loaded_event_.Wait();
     cookies->swap(cookies_);
   }
@@ -94,11 +93,6 @@
                                            net::COOKIE_PRIORITY_DEFAULT));
   }
 
-  void CloseStore() {
-    store_->Close();
-    base::TaskScheduler::GetInstance()->FlushForTesting();
-  }
-
   void DestroyStore() {
     store_ = nullptr;
     // Ensure that |store_|'s destructor has run by flushing TaskScheduler.
@@ -212,53 +206,6 @@
   cookies.clear();
 }
 
-// Test if data is stored as expected in the QuotaPolicy database when
-// the store is flushed with Close() instead of destruction.
-TEST_F(QuotaPolicyCookieStoreTest, TestPolicy_Close) {
-  CanonicalCookieVector cookies;
-  CreateAndLoad(nullptr, &cookies);
-  ASSERT_EQ(0U, cookies.size());
-
-  base::Time t = base::Time::Now();
-  AddCookie("A", "B", "foo.com", "/", t);
-  t += base::TimeDelta::FromMicroseconds(10);
-  AddCookie("A", "B", "persistent.com", "/", t);
-  t += base::TimeDelta::FromMicroseconds(10);
-  AddCookie("A", "B", "nonpersistent.com", "/", t);
-
-  // Replace the store, which forces the current store to flush data to
-  // disk. Then, after reloading the store, confirm that the data was flushed by
-  // making sure it loads successfully.  This ensures that all pending commits
-  // are made to the store before allowing it to be closed.
-  DestroyStore();
-  // Specify storage policy that makes "nonpersistent.com" session only.
-  scoped_refptr<content::MockSpecialStoragePolicy> storage_policy =
-      new content::MockSpecialStoragePolicy();
-  storage_policy->AddSessionOnly(
-      net::cookie_util::CookieOriginToURL("nonpersistent.com", false));
-
-  // Reload and test for persistence.
-  cookies.clear();
-  CreateAndLoad(storage_policy.get(), &cookies);
-  EXPECT_EQ(3U, cookies.size());
-
-  t += base::TimeDelta::FromMicroseconds(10);
-  AddCookie("A", "B", "nonpersistent.com", "/second", t);
-
-  // Now close the store, and "nonpersistent.com" should be deleted according to
-  // policy.
-  CloseStore();
-  DestroyStore();
-  cookies.clear();
-  CreateAndLoad(nullptr, &cookies);
-
-  EXPECT_EQ(2U, cookies.size());
-  for (const auto& cookie : cookies) {
-    EXPECT_NE("nonpersistent.com", cookie->Domain());
-  }
-  cookies.clear();
-}
-
 TEST_F(QuotaPolicyCookieStoreTest, ForceKeepSessionState) {
   CanonicalCookieVector cookies;
   CreateAndLoad(nullptr, &cookies);
diff --git a/content/browser/network_service_client.cc b/content/browser/network_service_client.cc
index bcb2ec4..0afe203 100644
--- a/content/browser/network_service_client.cc
+++ b/content/browser/network_service_client.cc
@@ -268,10 +268,10 @@
 }
 
 void NetworkServiceClient::OnSSLCertificateError(
-    int32_t resource_type,
-    const GURL& url,
     uint32_t process_id,
     uint32_t routing_id,
+    int32_t resource_type,
+    const GURL& url,
     const net::SSLInfo& ssl_info,
     bool fatal,
     OnSSLCertificateErrorCallback response) {
diff --git a/content/browser/network_service_client.h b/content/browser/network_service_client.h
index 59665e92..18d9ca7 100644
--- a/content/browser/network_service_client.h
+++ b/content/browser/network_service_client.h
@@ -33,10 +33,10 @@
       const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
       network::mojom::NetworkServiceClient::OnCertificateRequestedCallback
           callback) override;
-  void OnSSLCertificateError(int32_t resource_type,
-                             const GURL& url,
-                             uint32_t process_id,
+  void OnSSLCertificateError(uint32_t process_id,
                              uint32_t routing_id,
+                             int32_t resource_type,
+                             const GURL& url,
                              const net::SSLInfo& ssl_info,
                              bool fatal,
                              OnSSLCertificateErrorCallback response) override;
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 55a4d12c..dcdae196 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -136,6 +136,19 @@
   return nullptr;
 }
 
+int PluginServiceImpl::CountPpapiPluginProcessesForProfile(
+    const base::FilePath& plugin_path,
+    const base::FilePath& profile_data_directory) {
+  int count = 0;
+  for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
+    if (iter->plugin_path() == plugin_path &&
+        iter->profile_data_directory() == profile_data_directory) {
+      ++count;
+    }
+  }
+  return count;
+}
+
 PpapiPluginProcessHost* PluginServiceImpl::FindPpapiBrokerProcess(
     const base::FilePath& broker_path) {
   for (PpapiBrokerProcessHostIterator iter; !iter.Done(); ++iter) {
@@ -180,6 +193,13 @@
                               FLASH_USAGE_ENUM_COUNT);
   }
 
+  // Avoid fork bomb.
+  if (origin_lock.has_value() && CountPpapiPluginProcessesForProfile(
+                                     plugin_path, profile_data_directory) >=
+                                     max_ppapi_processes_per_profile_) {
+    return nullptr;
+  }
+
   // This plugin isn't loaded by any plugin process, so create a new process.
   plugin_host = PpapiPluginProcessHost::CreatePluginHost(
       *info, profile_data_directory, origin_lock);
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index c1c4a6c5..8669885 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -117,9 +117,17 @@
   // Used to monitor plugin stability.
   void RegisterPluginCrash(const base::FilePath& plugin_path);
 
+  // For testing without creating many, many processes.
+  void SetMaxPpapiProcessesPerProfileForTesting(int number) {
+    max_ppapi_processes_per_profile_ = number;
+  }
+
  private:
   friend struct base::DefaultSingletonTraits<PluginServiceImpl>;
 
+  // Pulled out of the air, seems reasonable.
+  static constexpr int kDefaultMaxPpapiProcessesPerProfile = 15;
+
   // Helper for recording URLs to UKM.
   static void RecordBrokerUsage(int render_process_id, int render_frame_id);
 
@@ -142,6 +150,10 @@
   PpapiPluginProcessHost* FindPpapiBrokerProcess(
       const base::FilePath& broker_path);
 
+  int CountPpapiPluginProcessesForProfile(
+      const base::FilePath& plugin_path,
+      const base::FilePath& profile_data_directory);
+
   void RegisterPepperPlugins();
 
   // Loads the plugins synchronously in a thread pool.
@@ -149,6 +161,8 @@
 
   std::vector<PepperPluginInfo> ppapi_plugins_;
 
+  int max_ppapi_processes_per_profile_ = kDefaultMaxPpapiProcessesPerProfile;
+
   // Weak pointer; outlives us.
   PluginServiceFilter* filter_;
 
diff --git a/content/browser/plugin_service_impl_browsertest.cc b/content/browser/plugin_service_impl_browsertest.cc
index 56b67f81..1dfaa4d 100644
--- a/content/browser/plugin_service_impl_browsertest.cc
+++ b/content/browser/plugin_service_impl_browsertest.cc
@@ -5,9 +5,11 @@
 #include "content/browser/plugin_service_impl.h"
 
 #include <memory>
+#include <string>
 #include <utility>
 
 #include "base/optional.h"
+#include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "content/browser/ppapi_plugin_process_host.h"
@@ -86,6 +88,7 @@
                        base::Unretained(service), 0, plugin_path_, profile_dir_,
                        origin, base::Unretained(client)));
     client->WaitForQuit();
+    client->SetRunLoop(nullptr);
   }
 
   base::FilePath plugin_path_;
@@ -132,4 +135,40 @@
   EXPECT_EQ(client3a.plugin_pid(), client3b.plugin_pid());
 }
 
+IN_PROC_BROWSER_TEST_F(PluginServiceImplBrowserTest, NoForkBombs) {
+  RegisterFakePlugin();
+
+  PluginServiceImpl* service = PluginServiceImpl::GetInstance();
+  service->SetMaxPpapiProcessesPerProfileForTesting(4);
+
+  const char* kFakeURLTemplate = "https://foo.fake%d.com/";
+  TestPluginClient client;
+  for (int i = 0; i < 4; ++i) {
+    std::string url = base::StringPrintf(kFakeURLTemplate, i);
+    url::Origin origin = url::Origin::Create(GURL(url));
+    OpenChannelToFakePlugin(origin, &client);
+    EXPECT_NE(base::kNullProcessId, client.plugin_pid());
+  }
+
+  // After a while we stop handing out processes per-origin.
+  for (int i = 4; i < 8; ++i) {
+    std::string url = base::StringPrintf(kFakeURLTemplate, i);
+    url::Origin origin = url::Origin::Create(GURL(url));
+    OpenChannelToFakePlugin(origin, &client);
+    EXPECT_EQ(base::kNullProcessId, client.plugin_pid());
+  }
+
+  // But there's always room for the empty origin case.
+  OpenChannelToFakePlugin(base::nullopt, &client);
+  EXPECT_NE(base::kNullProcessId, client.plugin_pid());
+
+  // And re-using existing processes is always possible.
+  for (int i = 0; i < 4; ++i) {
+    std::string url = base::StringPrintf(kFakeURLTemplate, i);
+    url::Origin origin = url::Origin::Create(GURL(url));
+    OpenChannelToFakePlugin(origin, &client);
+    EXPECT_NE(base::kNullProcessId, client.plugin_pid());
+  }
+}
+
 }  // namespace content
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index dad7599..be7c85dd 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -114,6 +114,10 @@
   void OnFrameTokenChanged(uint32_t frame_token) override;
   void DidReceiveFirstFrameAfterNavigation() override;
 
+  base::WeakPtr<BrowserCompositorMac> GetWeakPtr() {
+    return weak_factory_.GetWeakPtr();
+  }
+
   // Returns nullptr if no compositor is attached.
   ui::Compositor* CompositorForTesting() const;
 
diff --git a/content/browser/renderer_host/input/non_blocking_event_browsertest.cc b/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
index 466a501..7369507 100644
--- a/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
+++ b/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
@@ -143,8 +143,12 @@
 
     // Expect that the compositor scrolled at least one pixel while the
     // main thread was in a busy loop.
-    while (observer.LastRenderFrameMetadata().root_scroll_offset.y() <= 0)
+    gfx::Vector2dF default_scroll_offset;
+    while (observer.LastRenderFrameMetadata()
+               .root_scroll_offset.value_or(default_scroll_offset)
+               .y() <= 0) {
       observer.WaitForMetadataChange();
+    }
   }
 
   void DoTouchScroll() {
@@ -172,8 +176,12 @@
 
     // Expect that the compositor scrolled at least one pixel while the
     // main thread was in a busy loop.
-    while (observer.LastRenderFrameMetadata().root_scroll_offset.y() <= 0)
+    gfx::Vector2dF default_scroll_offset;
+    while (observer.LastRenderFrameMetadata()
+               .root_scroll_offset.value_or(default_scroll_offset)
+               .y() <= 0) {
       observer.WaitForMetadataChange();
+    }
   }
 
  private:
diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc
index 5683304..e0a773e 100644
--- a/content/browser/renderer_host/input/touch_action_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -168,9 +168,11 @@
 
     // Expect that the compositor scrolled at least one pixel while the
     // main thread was in a busy loop.
+    gfx::Vector2dF default_scroll_offset;
     while (wait_until_scrolled &&
            frame_metadata_observer.LastRenderFrameMetadata()
-                   .root_scroll_offset.y() < (distance.y() / 2)) {
+                   .root_scroll_offset.value_or(default_scroll_offset)
+                   .y() < (distance.y() / 2)) {
       frame_metadata_observer.WaitForMetadataChange();
     }
 
diff --git a/content/browser/renderer_host/media/media_stream_track_metrics_host.cc b/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
index 441df83d..4d22fb1c 100644
--- a/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
+++ b/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
@@ -5,7 +5,6 @@
 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h"
 
 #include "base/metrics/histogram_macros.h"
-#include "content/common/media/media_stream_track_metrics_host_messages.h"
 
 // We use a histogram with a maximum bucket of 16 hours to infinity
 // for track durations.
@@ -17,9 +16,7 @@
 
 namespace content {
 
-MediaStreamTrackMetricsHost::MediaStreamTrackMetricsHost()
-    : BrowserMessageFilter(MediaStreamTrackMetricsHostMsgStart) {
-}
+MediaStreamTrackMetricsHost::MediaStreamTrackMetricsHost() {}
 
 MediaStreamTrackMetricsHost::~MediaStreamTrackMetricsHost() {
   // Our render process has exited. We won't receive any more IPC
@@ -33,22 +30,14 @@
   tracks_.clear();
 }
 
-bool MediaStreamTrackMetricsHost::OnMessageReceived(
-    const IPC::Message& message) {
-  bool handled = true;
-
-  IPC_BEGIN_MESSAGE_MAP(MediaStreamTrackMetricsHost, message)
-    IPC_MESSAGE_HANDLER(MediaStreamTrackMetricsHost_AddTrack, OnAddTrack)
-    IPC_MESSAGE_HANDLER(MediaStreamTrackMetricsHost_RemoveTrack, OnRemoveTrack)
-    IPC_MESSAGE_UNHANDLED(handled = false)
-  IPC_END_MESSAGE_MAP()
-
-  return handled;
+void MediaStreamTrackMetricsHost::BindRequest(
+    mojom::MediaStreamTrackMetricsHostRequest request) {
+  bindings_.AddBinding(this, std::move(request));
 }
 
-void MediaStreamTrackMetricsHost::OnAddTrack(uint64_t id,
-                                             bool is_audio,
-                                             bool is_remote) {
+void MediaStreamTrackMetricsHost::AddTrack(uint64_t id,
+                                           bool is_audio,
+                                           bool is_remote) {
   if (tracks_.find(id) != tracks_.end())
     return;
 
@@ -56,7 +45,7 @@
   tracks_[id] = info;
 }
 
-void MediaStreamTrackMetricsHost::OnRemoveTrack(uint64_t id) {
+void MediaStreamTrackMetricsHost::RemoveTrack(uint64_t id) {
   if (tracks_.find(id) == tracks_.end())
     return;
 
diff --git a/content/browser/renderer_host/media/media_stream_track_metrics_host.h b/content/browser/renderer_host/media/media_stream_track_metrics_host.h
index c800f3a5..aeed232 100644
--- a/content/browser/renderer_host/media/media_stream_track_metrics_host.h
+++ b/content/browser/renderer_host/media/media_stream_track_metrics_host.h
@@ -11,7 +11,8 @@
 #include <string>
 
 #include "base/time/time.h"
-#include "content/public/browser/browser_message_filter.h"
+#include "content/common/media/media_stream.mojom.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 
 namespace content {
 
@@ -27,20 +28,16 @@
 // If the renderer process goes away without sending messages that
 // tracks were removed, this class instead infers that the tracks were
 // removed.
-class MediaStreamTrackMetricsHost
-    : public BrowserMessageFilter {
+class MediaStreamTrackMetricsHost : public mojom::MediaStreamTrackMetricsHost {
  public:
   explicit MediaStreamTrackMetricsHost();
 
- protected:
   ~MediaStreamTrackMetricsHost() override;
-
-  // BrowserMessageFilter override.
-  bool OnMessageReceived(const IPC::Message& message) override;
+  void BindRequest(mojom::MediaStreamTrackMetricsHostRequest request);
 
  private:
-  void OnAddTrack(uint64_t id, bool is_audio, bool is_remote);
-  void OnRemoveTrack(uint64_t id);
+  void AddTrack(uint64_t id, bool is_audio, bool is_remote) override;
+  void RemoveTrack(uint64_t id) override;
 
   // Information for a track we're keeping in |tracks_|. |is_audio|
   // specifies whether it's an audio or video track, |is_remote|
@@ -58,6 +55,8 @@
   // Values are unique (per renderer) track IDs.
   typedef std::map<uint64_t, TrackInfo> TrackMap;
   TrackMap tracks_;
+
+  mojo::BindingSet<mojom::MediaStreamTrackMetricsHost> bindings_;
 };
 
 }  // namespace content
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8c34d8e7a..980a0d3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1760,7 +1760,6 @@
 #if BUILDFLAG(ENABLE_WEBRTC)
   peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
   AddFilter(peer_connection_tracker_host_.get());
-  AddFilter(new MediaStreamTrackMetricsHost());
 #endif
 #if BUILDFLAG(ENABLE_PLUGINS)
   AddFilter(new PepperRendererConnection(GetID()));
@@ -1924,6 +1923,12 @@
       base::CreateSequencedTaskRunnerWithTraits(
           {base::MayBlock(), base::TaskPriority::USER_VISIBLE}));
 
+#if BUILDFLAG(ENABLE_WEBRTC)
+  registry->AddInterface(base::BindRepeating(
+      &RenderProcessHostImpl::CreateMediaStreamTrackMetricsHost,
+      base::Unretained(this)));
+#endif
+
   registry->AddInterface(
       base::Bind(&metrics::CreateSingleSampleMetricsProvider));
 
@@ -4033,6 +4038,14 @@
 }
 
 #if BUILDFLAG(ENABLE_WEBRTC)
+void RenderProcessHostImpl::CreateMediaStreamTrackMetricsHost(
+    mojom::MediaStreamTrackMetricsHostRequest request) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  if (!media_stream_track_metrics_host_)
+    media_stream_track_metrics_host_.reset(new MediaStreamTrackMetricsHost());
+  media_stream_track_metrics_host_->BindRequest(std::move(request));
+}
+
 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) {
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 51c2ff4..8510da6 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -86,6 +86,7 @@
 class StoragePartitionImpl;
 
 #if BUILDFLAG(ENABLE_WEBRTC)
+class MediaStreamTrackMetricsHost;
 class P2PSocketDispatcherHost;
 #endif
 
@@ -518,6 +519,9 @@
   void CreateMediaStreamDispatcherHost(
       MediaStreamManager* media_stream_manager,
       mojom::MediaStreamDispatcherHostRequest request);
+  void CreateMediaStreamTrackMetricsHost(
+      mojom::MediaStreamTrackMetricsHostRequest request);
+
   void OnRegisterAecDumpConsumer(int id);
   void OnUnregisterAecDumpConsumer(int id);
   void RegisterAecDumpConsumerOnUIThread(int id);
@@ -714,6 +718,9 @@
 
   scoped_refptr<base::SequencedTaskRunner>
       audio_debug_recordings_file_task_runner_;
+
+  std::unique_ptr<MediaStreamTrackMetricsHost, BrowserThread::DeleteOnIOThread>
+      media_stream_track_metrics_host_;
 #endif
 
   // Forwards messages between WebRTCInternals in the browser process
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 1b8a3c8..8e322b7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2501,9 +2501,15 @@
   if (!auto_resize_enabled_)
     return;
 
-  if (delegate_) {
-    delegate_->ResizeDueToAutoResize(this, new_size,
+  if (view_) {
+    viz::ScopedSurfaceIdAllocator scoped_allocator =
+        view_->ResizeDueToAutoResize(new_size,
                                      last_auto_resize_request_number_);
+
+    if (delegate_) {
+      delegate_->ResizeDueToAutoResize(this, new_size,
+                                       last_auto_resize_request_number_);
+    }
   }
 }
 
@@ -2519,6 +2525,8 @@
     return;
   }
 
+  DCHECK(!view_->IsLocalSurfaceIdAllocationSuppressed());
+
   viz::LocalSurfaceId local_surface_id(view_->GetLocalSurfaceId());
   if (local_surface_id.is_valid()) {
     ScreenInfo screen_info;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 087bc63..f476f45 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2187,6 +2187,9 @@
 
 void RenderWidgetHostViewAura::SyncSurfaceProperties(
     const cc::DeadlinePolicy& deadline_policy) {
+  if (IsLocalSurfaceIdAllocationSuppressed())
+    return;
+
   if (delegated_frame_host_) {
     delegated_frame_host_->WasResized(window_->GetLocalSurfaceId(),
                                       window_->bounds().size(),
@@ -2485,9 +2488,18 @@
   WasResized(cc::DeadlinePolicy::UseDefaultDeadline());
 }
 
-void RenderWidgetHostViewAura::ResizeDueToAutoResize(const gfx::Size& new_size,
-                                                     uint64_t sequence_number) {
-  WasResized(cc::DeadlinePolicy::UseDefaultDeadline());
+viz::ScopedSurfaceIdAllocator RenderWidgetHostViewAura::ResizeDueToAutoResize(
+    const gfx::Size& new_size,
+    uint64_t sequence_number) {
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      &RenderWidgetHostViewAura::WasResized, weak_ptr_factory_.GetWeakPtr(),
+      cc::DeadlinePolicy::UseDefaultDeadline());
+  return window_->GetSurfaceIdAllocator(std::move(allocation_task));
+}
+
+bool RenderWidgetHostViewAura::IsLocalSurfaceIdAllocationSuppressed() const {
+  DCHECK(window_);
+  return window_->IsLocalSurfaceIdAllocationSuppressed();
 }
 
 void RenderWidgetHostViewAura::DidNavigate() {
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 1db26cab..655fc78 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -200,8 +200,12 @@
                      base::OnceCallback<void(const base::UnguessableToken&)>
                          callback) override;
   void OnSynchronizedDisplayPropertiesChanged() override;
-  void ResizeDueToAutoResize(const gfx::Size& new_size,
-                             uint64_t sequence_number) override;
+  viz::ScopedSurfaceIdAllocator ResizeDueToAutoResize(
+      const gfx::Size& new_size,
+      uint64_t sequence_number) override;
+
+  bool IsLocalSurfaceIdAllocationSuppressed() const override;
+
   void DidNavigate() override;
 
   // Overridden from ui::TextInputClient:
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 151c87cd..10cc19e 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -279,10 +279,21 @@
   text_input_manager_ = nullptr;
 }
 
-void RenderWidgetHostViewBase::ResizeDueToAutoResize(const gfx::Size& new_size,
-                                                     uint64_t sequence_number) {
-  RenderWidgetHostImpl* host = GetRenderWidgetHostImpl();
-  host->DidAllocateLocalSurfaceIdForAutoResize(sequence_number);
+viz::ScopedSurfaceIdAllocator RenderWidgetHostViewBase::ResizeDueToAutoResize(
+    const gfx::Size& new_size,
+    uint64_t sequence_number) {
+  // TODO(cblume): This doesn't currently suppress allocation.
+  // It maintains existing behavior while using the suppression style.
+  // This will be addressed in a follow-up patch.
+  // See https://crbug.com/805073
+  base::OnceCallback<void()> allocation_task =
+      base::BindOnce(&RenderWidgetHostViewBase::OnResizeDueToAutoResizeComplete,
+                     weak_factory_.GetWeakPtr(), sequence_number);
+  return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
+}
+
+bool RenderWidgetHostViewBase::IsLocalSurfaceIdAllocationSuppressed() const {
+  return false;
 }
 
 base::WeakPtr<RenderWidgetHostViewBase> RenderWidgetHostViewBase::GetWeakPtr() {
@@ -582,6 +593,13 @@
 
 #endif
 
+void RenderWidgetHostViewBase::OnResizeDueToAutoResizeComplete(
+    uint64_t sequence_number) {
+  RenderWidgetHostImpl* host = GetRenderWidgetHostImpl();
+  if (host)
+    host->DidAllocateLocalSurfaceIdForAutoResize(sequence_number);
+}
+
 #if defined(OS_MACOSX)
 bool RenderWidgetHostViewBase::ShouldContinueToPauseForFrame() {
   return false;
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 06f2793..a88faed 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -19,6 +19,7 @@
 #include "base/strings/string16.h"
 #include "build/build_config.h"
 #include "components/viz/common/quads/compositor_frame.h"
+#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
 #include "components/viz/common/surfaces/surface_id.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/content_export.h"
@@ -162,8 +163,11 @@
 
   // Informs the view that the renderer has resized to |new_size| because auto-
   // resize is enabled.
-  virtual void ResizeDueToAutoResize(const gfx::Size& new_size,
-                                     uint64_t sequence_number);
+  virtual viz::ScopedSurfaceIdAllocator ResizeDueToAutoResize(
+      const gfx::Size& new_size,
+      uint64_t sequence_number);
+
+  virtual bool IsLocalSurfaceIdAllocationSuppressed() const;
 
   base::WeakPtr<RenderWidgetHostViewBase> GetWeakPtr();
 
@@ -572,6 +576,8 @@
   // LocalSurfaceId.
   virtual void OnSynchronizedDisplayPropertiesChanged() {}
 
+  void OnResizeDueToAutoResizeComplete(uint64_t sequence_number);
+
   gfx::Rect current_display_area_;
 
   uint32_t renderer_frame_number_;
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 4f8390b..958ce84 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -1015,11 +1015,18 @@
     DisplayUtil::GetDefaultScreenInfo(screen_info);
 }
 
-void RenderWidgetHostViewChildFrame::ResizeDueToAutoResize(
+viz::ScopedSurfaceIdAllocator
+RenderWidgetHostViewChildFrame::ResizeDueToAutoResize(
     const gfx::Size& new_size,
     uint64_t sequence_number) {
-  if (frame_connector_)
-    frame_connector_->ResizeDueToAutoResize(new_size, sequence_number);
+  // TODO(cblume): This doesn't currently suppress allocation.
+  // It maintains existing behavior while using the suppression style.
+  // This will be addressed in a follow-up patch.
+  // See https://crbug.com/805073
+  base::OnceCallback<void()> allocation_task = base::BindOnce(
+      &RenderWidgetHostViewChildFrame::OnResizeDueToAutoResizeComplete,
+      weak_factory_.GetWeakPtr(), new_size, sequence_number);
+  return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
 }
 
 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() {
@@ -1108,6 +1115,13 @@
       ->CanBecomeVisible();
 }
 
+void RenderWidgetHostViewChildFrame::OnResizeDueToAutoResizeComplete(
+    const gfx::Size& new_size,
+    uint64_t sequence_number) {
+  if (frame_connector_)
+    frame_connector_->ResizeDueToAutoResize(new_size, sequence_number);
+}
+
 void RenderWidgetHostViewChildFrame::DidNavigate() {
   if (host_->auto_resize_enabled()) {
     host_->DidAllocateLocalSurfaceIdForAutoResize(
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index a03a87b..e65b4a5 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -185,8 +185,9 @@
       BrowserAccessibilityDelegate* delegate,
       bool for_root_frame) override;
   void GetScreenInfo(ScreenInfo* screen_info) const override;
-  void ResizeDueToAutoResize(const gfx::Size& new_size,
-                             uint64_t sequence_number) override;
+  viz::ScopedSurfaceIdAllocator ResizeDueToAutoResize(
+      const gfx::Size& new_size,
+      uint64_t sequence_number) override;
 
   // viz::mojom::CompositorFrameSinkClient implementation.
   void DidReceiveCompositorFrameAck(
@@ -305,6 +306,9 @@
   // using CSS.
   bool CanBecomeVisible();
 
+  void OnResizeDueToAutoResizeComplete(const gfx::Size& new_size,
+                                       uint64_t sequence_number);
+
   std::vector<base::OnceClosure> frame_swapped_callbacks_;
 
   // The surface client ID of the parent RenderWidgetHostView.  0 if none.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 747c6cd..cb8b3e00 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -337,8 +337,9 @@
   bool ShouldContinueToPauseForFrame() override;
   gfx::Vector2d GetOffsetFromRootSurface() override;
   gfx::Rect GetBoundsInRootWindow() override;
-  void ResizeDueToAutoResize(const gfx::Size& new_size,
-                             uint64_t sequence_number) override;
+  viz::ScopedSurfaceIdAllocator ResizeDueToAutoResize(
+      const gfx::Size& new_size,
+      uint64_t sequence_number) override;
   void DidNavigate() override;
 
   bool LockMouse() override;
@@ -563,6 +564,9 @@
       blink::WebMouseWheelEvent wheel_event,
       bool should_route_event);
 
+  void OnResizeDueToAutoResizeComplete(const gfx::Size& new_size,
+                                       uint64_t sequence_number);
+
   // The associated view. This is weak and is inserted into the view hierarchy
   // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
   // destructor.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 2fedef58..93d1b45 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1106,10 +1106,17 @@
   }
 }
 
-void RenderWidgetHostViewMac::ResizeDueToAutoResize(const gfx::Size& new_size,
-                                                    uint64_t sequence_number) {
-  browser_compositor_->UpdateForAutoResize(new_size);
-  RenderWidgetHostViewBase::ResizeDueToAutoResize(new_size, sequence_number);
+viz::ScopedSurfaceIdAllocator RenderWidgetHostViewMac::ResizeDueToAutoResize(
+    const gfx::Size& new_size,
+    uint64_t sequence_number) {
+  // TODO(cblume): This doesn't currently suppress allocation.
+  // It maintains existing behavior while using the suppression style.
+  // This will be addressed in a follow-up patch.
+  // See https://crbug.com/805073
+  base::OnceCallback<void()> allocation_task =
+      base::BindOnce(&RenderWidgetHostViewMac::OnResizeDueToAutoResizeComplete,
+                     weak_factory_.GetWeakPtr(), new_size, sequence_number);
+  return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
 }
 
 void RenderWidgetHostViewMac::DidNavigate() {
@@ -1217,6 +1224,13 @@
   browser_compositor_->SetNeedsBeginFrames(needs_begin_frames_);
 }
 
+void RenderWidgetHostViewMac::OnResizeDueToAutoResizeComplete(
+    const gfx::Size& new_size,
+    uint64_t sequence_number) {
+  browser_compositor_->UpdateForAutoResize(new_size);
+  render_widget_host_->DidAllocateLocalSurfaceIdForAutoResize(sequence_number);
+}
+
 void RenderWidgetHostViewMac::SetWantsAnimateOnlyBeginFrames() {
   browser_compositor_->SetWantsAnimateOnlyBeginFrames();
 }
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index 754f001..bfd139c 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -19,7 +19,6 @@
 #include "content/browser/service_worker/service_worker_context_core.h"
 #include "content/common/content_switches_internal.h"
 #include "content/common/renderer.mojom.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/browser/browser_thread.h"
@@ -682,6 +681,10 @@
   owner_version_->StopWorkerIfIdle(true /* requested_from_renderer */);
 }
 
+void EmbeddedWorkerInstance::CountFeature(blink::mojom::WebFeature feature) {
+  owner_version_->CountFeature(feature);
+}
+
 void EmbeddedWorkerInstance::OnReadyForInspection() {
   if (devtools_proxy_) {
     blink::mojom::DevToolsAgentAssociatedPtrInfo devtools_agent_ptr_info;
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index 01bc212..2cad0bb 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -252,6 +252,7 @@
   // Implements mojom::EmbeddedWorkerInstanceHost.
   // These functions all run on the IO thread.
   void RequestTermination() override;
+  void CountFeature(blink::mojom::WebFeature feature) override;
   void OnReadyForInspection() override;
   void OnScriptLoaded() override;
   // Notifies the corresponding provider host that the thread has started and is
diff --git a/content/browser/service_worker/embedded_worker_instance_unittest.cc b/content/browser/service_worker/embedded_worker_instance_unittest.cc
index 82e5fed9..1a00b172 100644
--- a/content/browser/service_worker/embedded_worker_instance_unittest.cc
+++ b/content/browser/service_worker/embedded_worker_instance_unittest.cc
@@ -22,7 +22,6 @@
 #include "content/browser/service_worker/service_worker_test_utils.h"
 #include "content/browser/service_worker/service_worker_version.h"
 #include "content/common/service_worker/embedded_worker.mojom.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_event_dispatcher.mojom.h"
 #include "content/public/common/child_process_host.h"
 #include "content/public/common/content_switches.h"
diff --git a/content/browser/service_worker/embedded_worker_registry.cc b/content/browser/service_worker/embedded_worker_registry.cc
index 16daab86..98d98d5 100644
--- a/content/browser/service_worker/embedded_worker_registry.cc
+++ b/content/browser/service_worker/embedded_worker_registry.cc
@@ -12,7 +12,6 @@
 #include "content/browser/service_worker/service_worker_context_core.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/public/browser/browser_thread.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_sender.h"
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index a7a6575..5ee1c4f 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -26,7 +26,6 @@
 #include "content/browser/service_worker/service_worker_test_utils.h"
 #include "content/common/background_fetch/background_fetch_types.h"
 #include "content/common/renderer.mojom.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_event_dispatcher.mojom.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc
index 10f0068..58b13ad 100644
--- a/content/browser/service_worker/service_worker_context_unittest.cc
+++ b/content/browser/service_worker/service_worker_context_unittest.cc
@@ -23,7 +23,6 @@
 #include "content/browser/service_worker/service_worker_storage.h"
 #include "content/browser/service_worker/service_worker_test_utils.h"
 #include "content/browser/service_worker/service_worker_version.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "content/public/test/test_utils.h"
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index d2a1040..027fe12 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -22,7 +22,6 @@
 #include "content/browser/service_worker/service_worker_handle.h"
 #include "content/browser/service_worker/service_worker_navigation_handle_core.h"
 #include "content/browser/service_worker/service_worker_registration.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/browser/content_browser_client.h"
@@ -37,7 +36,6 @@
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_object.mojom.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_provider_type.mojom.h"
 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h"
-#include "third_party/WebKit/public/platform/web_feature.mojom.h"
 #include "url/gurl.h"
 
 using blink::MessagePortChannel;
@@ -48,7 +46,7 @@
 namespace {
 
 const uint32_t kServiceWorkerFilteredMessageClasses[] = {
-    ServiceWorkerMsgStart, EmbeddedWorkerMsgStart,
+    ServiceWorkerMsgStart,
 };
 
 }  // namespace
@@ -133,7 +131,6 @@
   IPC_BEGIN_MESSAGE_MAP(ServiceWorkerDispatcherHost, message)
     IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_PostMessageToWorker,
                         OnPostMessageToWorker)
-    IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_CountFeature, OnCountFeature)
     IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
 
@@ -422,24 +419,6 @@
       std::move(event), worker->CreateSimpleEventCallback(request_id));
 }
 
-void ServiceWorkerDispatcherHost::OnCountFeature(int64_t version_id,
-                                                 uint32_t feature) {
-  if (!GetContext())
-    return;
-  ServiceWorkerVersion* version = GetContext()->GetLiveVersion(version_id);
-  if (!version)
-    return;
-  if (feature >=
-      static_cast<uint32_t>(blink::mojom::WebFeature::kNumberOfFeatures)) {
-    // We don't use BadMessageReceived here since this IPC will be converted to
-    // a Mojo method call soon, which will validate inputs for us.
-    // TODO(xiaofeng.zhang): Convert the OnCountFeature IPC into a Mojo method
-    // call.
-    return;
-  }
-  version->CountFeature(feature);
-}
-
 ServiceWorkerContextCore* ServiceWorkerDispatcherHost::GetContext() {
   // Temporary CHECK for debugging https://crbug.com/736203.
   CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index 9f669ef..2de74af 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -136,7 +136,6 @@
   void OnProviderCreated(ServiceWorkerProviderHostInfo info) override;
 
   // IPC Message handlers
-  void OnCountFeature(int64_t version_id, uint32_t feature);
   void OnPostMessageToWorker(
       int handle_id,
       int provider_id,
diff --git a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
index 862fe18..eb62434 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
@@ -24,7 +24,6 @@
 #include "content/browser/service_worker/service_worker_handle.h"
 #include "content/browser/service_worker/service_worker_navigation_handle_core.h"
 #include "content/browser/service_worker/service_worker_test_utils.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/common/browser_side_navigation_policy.h"
diff --git a/content/browser/service_worker/service_worker_handle_unittest.cc b/content/browser/service_worker/service_worker_handle_unittest.cc
index fbbdb23..9a21638f 100644
--- a/content/browser/service_worker/service_worker_handle_unittest.cc
+++ b/content/browser/service_worker/service_worker_handle_unittest.cc
@@ -15,7 +15,6 @@
 #include "content/browser/service_worker/service_worker_registration.h"
 #include "content/browser/service_worker/service_worker_test_utils.h"
 #include "content/browser/service_worker/service_worker_version.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/public/test/mock_resource_context.h"
diff --git a/content/browser/service_worker/service_worker_job_unittest.cc b/content/browser/service_worker/service_worker_job_unittest.cc
index 64ee507..d512809 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -27,7 +27,6 @@
 #include "content/browser/service_worker/service_worker_registration_object_host.h"
 #include "content/browser/service_worker/service_worker_registration_status.h"
 #include "content/browser/service_worker/service_worker_test_utils.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/test/test_browser_context.h"
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index 3fd12f21..eb0880fa 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -555,17 +555,12 @@
                                   std::move(message));
 }
 
-void ServiceWorkerProviderHost::CountFeature(uint32_t feature) {
+void ServiceWorkerProviderHost::CountFeature(blink::mojom::WebFeature feature) {
   if (!dispatcher_host_)
     return;
   // CountFeature message should be sent only for clients.
   DCHECK(IsProviderForClient());
-  DCHECK_LT(feature,
-            static_cast<uint32_t>(blink::mojom::WebFeature::kNumberOfFeatures));
-
-  blink::mojom::WebFeature web_feature =
-      static_cast<blink::mojom::WebFeature>(feature);
-  container_->CountFeature(web_feature);
+  container_->CountFeature(feature);
 }
 
 void ServiceWorkerProviderHost::ClaimedByRegistration(
@@ -796,11 +791,8 @@
 
   // Populate used features for UseCounter purposes.
   std::vector<blink::mojom::WebFeature> used_features;
-  for (const uint32_t feature : controller_->used_features()) {
-    DCHECK_LT(feature, static_cast<uint32_t>(
-                           blink::mojom::WebFeature::kNumberOfFeatures));
-    used_features.push_back(static_cast<blink::mojom::WebFeature>(feature));
-  }
+  for (const blink::mojom::WebFeature feature : controller_->used_features())
+    used_features.push_back(feature);
 
   // S13nServiceWorker: Pass an endpoint for the client to talk to this
   // controller.
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 4187669e..fdbe5b5 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -34,6 +34,7 @@
 #include "services/network/public/mojom/request_context_frame_type.mojom.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_provider_type.mojom.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_registration.mojom.h"
+#include "third_party/WebKit/public/platform/web_feature.mojom.h"
 
 namespace network {
 class ResourceRequestBody;
@@ -296,7 +297,7 @@
 
   // Notifies the client that its controller used a feature, for UseCounter
   // purposes. This can only be called if IsProviderForClient() is true.
-  void CountFeature(uint32_t feature);
+  void CountFeature(blink::mojom::WebFeature feature);
 
   // |registration| claims the document to be controlled.
   void ClaimedByRegistration(ServiceWorkerRegistration* registration);
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 31277926..a7ed9a5b 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -431,7 +431,8 @@
   if (version->origin_trial_tokens())
     data.origin_trial_tokens = *version->origin_trial_tokens();
   data.navigation_preload_state = registration->navigation_preload_state();
-  data.used_features = version->used_features();
+  for (const blink::mojom::WebFeature feature : version->used_features())
+    data.used_features.insert(static_cast<uint32_t>(feature));
 
   ResourceList resources;
   version->script_cache_map()->GetResources(&resources);
@@ -1540,16 +1541,14 @@
     // TODO(falken): Maybe Chrome should have a generic mechanism to detect
     // profile downgrade and just abort? Or we could just crash here, but that
     // seems extreme and difficult for a user to escape.
-    std::set<uint32_t> used_features = data.used_features;
-    for (auto it = used_features.begin(); it != used_features.end();) {
-      if (*it >=
+    std::set<blink::mojom::WebFeature> used_features;
+    for (const uint32_t feature : data.used_features) {
+      if (feature <
           static_cast<uint32_t>(blink::mojom::WebFeature::kNumberOfFeatures)) {
-        it = used_features.erase(it);
-      } else {
-        ++it;
+        used_features.insert(static_cast<blink::mojom::WebFeature>(feature));
       }
     }
-    version->set_used_features(used_features);
+    version->set_used_features(std::move(used_features));
   }
 
   if (version->status() == ServiceWorkerVersion::ACTIVATED)
diff --git a/content/browser/service_worker/service_worker_storage_unittest.cc b/content/browser/service_worker/service_worker_storage_unittest.cc
index 002ee831..7ed40c5 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -697,7 +697,10 @@
   const int64_t kVersionId = 0;
   const base::Time kToday = base::Time::Now();
   const base::Time kYesterday = kToday - base::TimeDelta::FromDays(1);
-  std::set<uint32_t> used_features = {124, 901, 1019};
+  std::set<blink::mojom::WebFeature> used_features = {
+      blink::mojom::WebFeature::kServiceWorkerControlledPage,
+      blink::mojom::WebFeature::kReferrerPolicyHeader,
+      blink::mojom::WebFeature::kLocationOrigin};
 
   scoped_refptr<ServiceWorkerRegistration> found_registration;
 
@@ -731,7 +734,8 @@
       ServiceWorkerVersion::FetchHandlerExistence::EXISTS);
   live_version->SetStatus(ServiceWorkerVersion::INSTALLED);
   live_version->script_cache_map()->SetResources(resources);
-  live_version->set_used_features(used_features);
+  live_version->set_used_features(
+      std::set<blink::mojom::WebFeature>(used_features));
   live_registration->SetWaitingVersion(live_version);
   live_registration->set_last_update_check(kYesterday);
   EXPECT_EQ(SERVICE_WORKER_OK,
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 2417abc..ec47ba7 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -34,7 +34,6 @@
 #include "content/browser/service_worker/service_worker_type_converters.h"
 #include "content/common/origin_trials/trial_policy_impl.h"
 #include "content/common/service_worker/embedded_worker.mojom.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/browser/browser_thread.h"
@@ -1348,7 +1347,7 @@
   std::move(callback).Run(mojo::ConvertTo<ServiceWorkerStatusCode>(status));
 }
 
-void ServiceWorkerVersion::CountFeature(uint32_t feature) {
+void ServiceWorkerVersion::CountFeature(blink::mojom::WebFeature feature) {
   if (!used_features_.insert(feature).second)
     return;
   for (auto provider_host_by_uuid : controllee_map_)
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index ce0bfe6..7f00be4d 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -45,6 +45,7 @@
 #include "third_party/WebKit/public/mojom/service_worker/service_worker.mojom.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_client.mojom.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_event_status.mojom.h"
+#include "third_party/WebKit/public/platform/web_feature.mojom.h"
 #include "ui/base/mojo/window_open_disposition.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -463,11 +464,13 @@
     return max_request_expiration_time_ - tick_clock_->NowTicks();
   }
 
-  void CountFeature(uint32_t feature);
-  void set_used_features(const std::set<uint32_t>& used_features) {
-    used_features_ = used_features;
+  void CountFeature(blink::mojom::WebFeature feature);
+  void set_used_features(std::set<blink::mojom::WebFeature> used_features) {
+    used_features_ = std::move(used_features);
   }
-  const std::set<uint32_t>& used_features() const { return used_features_; }
+  const std::set<blink::mojom::WebFeature>& used_features() const {
+    return used_features_;
+  }
 
   static bool IsInstalled(ServiceWorkerVersion::Status status);
 
@@ -855,9 +858,8 @@
   base::Optional<ServiceWorkerMetrics::EventType> start_worker_first_purpose_;
 
   // This is the set of features that were used up until installation of this
-  // version completed, or used during the lifetime of |this|. The values must
-  // be from blink::UseCounter::Feature enum.
-  std::set<uint32_t> used_features_;
+  // version completed, or used during the lifetime of |this|.
+  std::set<blink::mojom::WebFeature> used_features_;
 
   std::unique_ptr<blink::TrialTokenValidator> validator_;
 
diff --git a/content/browser/streams/OWNERS b/content/browser/streams/OWNERS
index fe068abc..a114309 100644
--- a/content/browser/streams/OWNERS
+++ b/content/browser/streams/OWNERS
@@ -1,4 +1,5 @@
-tyoshino@chromium.org
+ricea@chromium.org
+yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
 # COMPONENT: Blink>Network>StreamsAPI
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ca66c49..6479acc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2862,11 +2862,6 @@
 
   if (delegate_)
     delegate_->ResizeDueToAutoResize(this, new_size);
-
-  RenderWidgetHostViewBase* view =
-      static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
-  if (view)
-    view->ResizeDueToAutoResize(new_size, sequence_number);
 }
 
 gfx::Size WebContentsImpl::GetAutoResizeSize() {
diff --git a/content/browser/webauth/webauth_browsertest.cc b/content/browser/webauth/webauth_browsertest.cc
index e02f2e9..f24e46e8 100644
--- a/content/browser/webauth/webauth_browsertest.cc
+++ b/content/browser/webauth/webauth_browsertest.cc
@@ -8,17 +8,14 @@
 
 #include "base/command_line.h"
 #include "base/macros.h"
+#include "base/run_loop.h"
 #include "base/test/scoped_feature_list.h"
-#include "base/test/test_mock_time_task_runner.h"
-#include "base/time/tick_clock.h"
-#include "base/time/time.h"
 #include "components/network_session_configurator/common/network_switches.h"
 #include "content/browser/webauth/authenticator_impl.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/service_manager_connection.h"
-#include "content/public/test/browser_test.h"
 #include "content/public/test/content_browser_test.h"
 #include "content/public/test/content_browser_test_utils.h"
 #include "content/shell/browser/shell.h"
@@ -32,11 +29,60 @@
 
 namespace content {
 
+namespace {
+
 using webauth::mojom::AuthenticatorPtr;
 using webauth::mojom::AuthenticatorStatus;
 using webauth::mojom::GetAssertionAuthenticatorResponsePtr;
 using webauth::mojom::MakeCredentialAuthenticatorResponsePtr;
 
+class MockCreateCallback {
+ public:
+  MockCreateCallback() = default;
+  MOCK_METHOD1_T(Run, void(AuthenticatorStatus));
+
+  using MakeCredentialCallback =
+      base::OnceCallback<void(AuthenticatorStatus,
+                              MakeCredentialAuthenticatorResponsePtr)>;
+
+  void RunWrapper(AuthenticatorStatus status,
+                  MakeCredentialAuthenticatorResponsePtr unused_response) {
+    Run(status);
+  }
+
+  MakeCredentialCallback Get() {
+    return base::BindOnce(&MockCreateCallback::RunWrapper,
+                          base::Unretained(this));
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockCreateCallback);
+};
+
+class MockGetCallback {
+ public:
+  MockGetCallback() = default;
+  MOCK_METHOD1_T(Run, void(AuthenticatorStatus));
+
+  using GetAssertionCallback =
+      base::OnceCallback<void(AuthenticatorStatus,
+                              GetAssertionAuthenticatorResponsePtr)>;
+
+  void RunWrapper(AuthenticatorStatus status,
+                  GetAssertionAuthenticatorResponsePtr unused_response) {
+    Run(status);
+  }
+
+  GetAssertionCallback Get() {
+    return base::BindOnce(&MockGetCallback::RunWrapper, base::Unretained(this));
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockGetCallback);
+};
+
+}  // namespace
+
 class WebAuthBrowserTest : public content::ContentBrowserTest {
  public:
   WebAuthBrowserTest() : https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {
@@ -49,6 +95,9 @@
     host_resolver()->AddRule("*", "127.0.0.1");
     https_server_.ServeFilesFromSourceDirectory("content/test/data");
     ASSERT_TRUE(https_server_.Start());
+
+    NavigateToURL(shell(), GetHttpsURL("www.example.com", "/title1.html"));
+    authenticator_ptr_ = ConnectToAuthenticatorWithTestConnector();
   }
 
   void SetUpCommandLine(base::CommandLine* command_line) override {
@@ -128,95 +177,54 @@
     return authenticator;
   }
 
+  void ResetAuthenticatorImplAndWaitForConnectionError() {
+    EXPECT_TRUE(authenticator_impl_);
+    EXPECT_TRUE(authenticator_ptr_);
+    EXPECT_TRUE(authenticator_ptr_.is_bound());
+    EXPECT_FALSE(authenticator_ptr_.encountered_error());
+
+    base::RunLoop run_loop;
+    authenticator_ptr_.set_connection_error_handler(run_loop.QuitClosure());
+
+    authenticator_impl_.reset();
+    run_loop.Run();
+  }
+
+  AuthenticatorPtr& authenticator() { return authenticator_ptr_; }
+
  private:
   base::test::ScopedFeatureList scoped_feature_list_;
   net::EmbeddedTestServer https_server_;
   std::unique_ptr<content::AuthenticatorImpl> authenticator_impl_;
+  AuthenticatorPtr authenticator_ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(WebAuthBrowserTest);
 };
 
-class MockCreateCallback {
- public:
-  MockCreateCallback() = default;
-  MOCK_METHOD0_T(Run, void());
-
-  using MakeCredentialCallback =
-      base::OnceCallback<void(AuthenticatorStatus,
-                              MakeCredentialAuthenticatorResponsePtr)>;
-
-  void RunWrapper(AuthenticatorStatus unused,
-                  MakeCredentialAuthenticatorResponsePtr unused2) {
-    Run();
-  }
-
-  MakeCredentialCallback Get() {
-    return base::BindOnce(&MockCreateCallback::RunWrapper,
-                          base::Unretained(this));
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(MockCreateCallback);
-};
-
-class MockGetCallback {
- public:
-  MockGetCallback() = default;
-  MOCK_METHOD0_T(Run, void());
-
-  using GetAssertionCallback =
-      base::OnceCallback<void(AuthenticatorStatus,
-                              GetAssertionAuthenticatorResponsePtr)>;
-
-  void RunWrapper(AuthenticatorStatus unused,
-                  GetAssertionAuthenticatorResponsePtr unused2) {
-    Run();
-  }
-
-  GetAssertionCallback Get() {
-    return base::BindOnce(&MockGetCallback::RunWrapper, base::Unretained(this));
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(MockGetCallback);
-};
-
-// Tests.
-
-// Tests that no crash occurs when navigating away during a pending
-// create(publicKey) request.
+// Tests that no crash occurs when the implementation is destroyed with a
+// pending create(publicKey) request.
 IN_PROC_BROWSER_TEST_F(WebAuthBrowserTest,
                        CreatePublicKeyCredentialNavigateAway) {
-  const GURL a_url1 = GetHttpsURL("www.example.com", "/title1.html");
-  const GURL b_url1 = GetHttpsURL("www.test.com", "/title1.html");
-
-  NavigateToURL(shell(), a_url1);
-
-  AuthenticatorPtr authenticator = ConnectToAuthenticatorWithTestConnector();
-
   MockCreateCallback create_callback;
-  EXPECT_CALL(create_callback, Run()).Times(0);
-  authenticator->MakeCredential(BuildBasicCreateOptions(),
-                                create_callback.Get());
+  EXPECT_CALL(create_callback, Run(::testing::_)).Times(0);
 
-  ASSERT_NO_FATAL_FAILURE(NavigateToURL(shell(), b_url1));
+  authenticator()->MakeCredential(BuildBasicCreateOptions(),
+                                  create_callback.Get());
+  authenticator().FlushForTesting();
+
+  ResetAuthenticatorImplAndWaitForConnectionError();
 }
 
-// Tests that no crash occurs when navigating away during a pending
-// get(publicKey) request.
+// Tests that no crash occurs when the implementation is destroyed with a
+// pending get(publicKey) request.
 IN_PROC_BROWSER_TEST_F(WebAuthBrowserTest, GetPublicKeyCredentialNavigateAway) {
-  const GURL a_url1 = GetHttpsURL("www.example.com", "/title1.html");
-  const GURL b_url1 = GetHttpsURL("www.test.com", "/title1.html");
-
-  NavigateToURL(shell(), a_url1);
-
-  AuthenticatorPtr authenticator = ConnectToAuthenticatorWithTestConnector();
-
   MockGetCallback get_callback;
-  EXPECT_CALL(get_callback, Run()).Times(0);
-  authenticator->GetAssertion(BuildBasicGetOptions(), get_callback.Get());
+  EXPECT_CALL(get_callback, Run(::testing::_)).Times(0);
 
-  ASSERT_NO_FATAL_FAILURE(NavigateToURL(shell(), b_url1));
+  authenticator()->GetAssertion(BuildBasicGetOptions(), get_callback.Get());
+  authenticator().FlushForTesting();
+
+  ResetAuthenticatorImplAndWaitForConnectionError();
 }
 
 }  // namespace content
diff --git a/content/browser/websockets/OWNERS b/content/browser/websockets/OWNERS
index 4546121..d5f5069 100644
--- a/content/browser/websockets/OWNERS
+++ b/content/browser/websockets/OWNERS
@@ -1,5 +1,4 @@
 ricea@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 6e99733..c8cfb65 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -214,7 +214,6 @@
     "media/media_stream_controls.h",
     "media/media_stream_param_traits.cc",
     "media/media_stream_param_traits.h",
-    "media/media_stream_track_metrics_host_messages.h",
     "media/midi_messages.h",
     "media/peer_connection_tracker_messages.h",
     "media/surface_view_manager_messages_android.h",
@@ -267,7 +266,6 @@
     "send_zygote_child_ping_linux.cc",
     "service_manager/service_manager_connection_impl.cc",
     "service_manager/service_manager_connection_impl.h",
-    "service_worker/embedded_worker_messages.h",
     "service_worker/service_worker_loader_helpers.cc",
     "service_worker/service_worker_loader_helpers.h",
     "service_worker/service_worker_messages.h",
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index 604f1a98..24752ae 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -67,12 +67,6 @@
 #ifndef CONTENT_COMMON_MEDIA_MEDIA_PLAYER_DELEGATE_MESSAGES_H_
 #error "Failed to include content/common/media/media_player_delegate_messages.h"
 #endif
-#undef CONTENT_COMMON_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_MESSAGES_H_
-#include "content/common/media/media_stream_track_metrics_host_messages.h"
-#ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_MESSAGES_H_
-#error \
-    "Failed to include content/common/media/media_stream_track_metrics_host_messages.h"
-#endif
 #undef CONTENT_COMMON_MEDIA_MIDI_MESSAGES_H_
 #include "content/common/media/midi_messages.h"
 #ifndef CONTENT_COMMON_MEDIA_MIDI_MESSAGES_H_
@@ -99,12 +93,6 @@
 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_
 #error "Failed to include content/common/resource_messages.h"
 #endif
-#undef CONTENT_COMMON_SERVICE_WORKER_EMBEDDED_WORKER_MESSAGES_H_
-#include "content/common/service_worker/embedded_worker_messages.h"
-#ifndef CONTENT_COMMON_SERVICE_WORKER_EMBEDDED_WORKER_MESSAGES_H_
-#error \
-    "Failed to include content/common/service_worker/embedded_worker_messages.h"
-#endif
 #undef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_MESSAGES_H_
 #include "content/common/service_worker/service_worker_messages.h"
 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_MESSAGES_H_
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index e5fbf207..793a801 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -8,6 +8,7 @@
 import "content/common/service_worker/controller_service_worker.mojom";
 import "content/common/url_loader_factory_bundle.mojom";
 import "content/public/common/resource_type.mojom";
+import "content/public/common/transferrable_url_loader.mojom";
 import "content/public/common/window_container_type.mojom";
 import "mojo/common/unguessable_token.mojom";
 import "mojo/public/mojom/base/string16.mojom";
@@ -86,6 +87,7 @@
       RequestNavigationParams request_params,
       network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints,
       URLLoaderFactoryBundle? subresource_loader_factories,
+      array<TransferrableURLLoader>? subresource_overrides,
       ControllerServiceWorkerInfo? controller_service_worker_info,
       mojo.common.mojom.UnguessableToken devtools_navigation_token);
 
diff --git a/content/common/media/media_stream.mojom b/content/common/media/media_stream.mojom
index 8477e350..483ac0c1 100644
--- a/content/common/media/media_stream.mojom
+++ b/content/common/media/media_stream.mojom
@@ -99,3 +99,13 @@
   // Tells the browser process that the stream has been started successfully.
   OnStreamStarted(string label);
 };
+
+// Browser-side interface that is used by the renderer process to notify the
+// addition or deletion of tracks.
+interface MediaStreamTrackMetricsHost {
+  // Adds the track with the specified information to the list of tracks.
+  AddTrack(uint64 id, bool is_audio, bool is_remote);
+
+  // Removes the track with the specified ID from the list of tracks.
+  RemoveTrack(uint64 id);
+};
diff --git a/content/common/media/media_stream_track_metrics_host_messages.h b/content/common/media/media_stream_track_metrics_host_messages.h
deleted file mode 100644
index 6f357094..0000000
--- a/content/common/media/media_stream_track_metrics_host_messages.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_MESSAGES_H_
-#define CONTENT_COMMON_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_MESSAGES_H_
-
-#include <stdint.h>
-
-#include "base/values.h"
-#include "content/common/content_export.h"
-#include "ipc/ipc_message_macros.h"
-
-#undef IPC_MESSAGE_EXPORT
-#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
-#define IPC_MESSAGE_START MediaStreamTrackMetricsHostMsgStart
-
-// Messages sent to MediaStreamTrackMetricsHost.
-IPC_MESSAGE_CONTROL3(MediaStreamTrackMetricsHost_AddTrack,
-                     uint64_t /* id */,
-                     bool /* is_audio */,
-                     bool /* is_remote */)
-IPC_MESSAGE_CONTROL1(MediaStreamTrackMetricsHost_RemoveTrack, uint64_t /* id */)
-
-#endif  // CONTENT_COMMON_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_MESSAGES_H_
diff --git a/content/common/render_frame_metadata.mojom b/content/common/render_frame_metadata.mojom
index 787a3b7..71215a118 100644
--- a/content/common/render_frame_metadata.mojom
+++ b/content/common/render_frame_metadata.mojom
@@ -8,7 +8,9 @@
 
 // See components/viz/service/quads/render_frame_metadata.h
 struct RenderFrameMetadata {
-  gfx.mojom.Vector2dF root_scroll_offset;
+  // Scroll offset of the root layer. This optional parameter is only sent
+  // during tests.
+  gfx.mojom.Vector2dF? root_scroll_offset;
 };
 
 // This interface is provided by the renderer. It can optionally enable
diff --git a/content/common/render_frame_metadata_struct_traits.h b/content/common/render_frame_metadata_struct_traits.h
index d19afa0..ff267126 100644
--- a/content/common/render_frame_metadata_struct_traits.h
+++ b/content/common/render_frame_metadata_struct_traits.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_RENDER_FRAME_METADATA_STRUCT_TRAITS_H_
 #define CONTENT_COMMON_RENDER_FRAME_METADATA_STRUCT_TRAITS_H_
 
+#include "base/optional.h"
 #include "cc/trees/render_frame_metadata.h"
 #include "content/common/render_frame_metadata.mojom-shared.h"
 
@@ -13,7 +14,7 @@
 template <>
 struct StructTraits<content::mojom::RenderFrameMetadataDataView,
                     cc::RenderFrameMetadata> {
-  static gfx::Vector2dF root_scroll_offset(
+  static base::Optional<gfx::Vector2dF> root_scroll_offset(
       const cc::RenderFrameMetadata& metadata) {
     return metadata.root_scroll_offset;
   }
diff --git a/content/common/service_worker/embedded_worker.mojom b/content/common/service_worker/embedded_worker.mojom
index 499899a..8cc4f055 100644
--- a/content/common/service_worker/embedded_worker.mojom
+++ b/content/common/service_worker/embedded_worker.mojom
@@ -14,6 +14,7 @@
 import "services/service_manager/public/mojom/interface_provider.mojom";
 import "third_party/WebKit/public/mojom/service_worker/service_worker.mojom";
 import "third_party/WebKit/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom";
+import "third_party/WebKit/public/platform/web_feature.mojom";
 import "third_party/WebKit/public/web/console_message.mojom";
 import "third_party/WebKit/public/web/devtools_agent.mojom";
 import "third_party/WebKit/public/web/worker_content_settings_proxy.mojom";
@@ -110,6 +111,17 @@
   // message has been missed, the browser will terminate the service worker.
   RequestTermination();
 
+  // Tells the browser process that this service worker used |feature|, for
+  // UseCounter purposes. The browser process propagates the feature usage bit
+  // to all clients controlled by the service worker. See
+  // https://crbug.com/376039 for background.
+  // Note: Because CountFeature() is possible to be called on the main thread
+  // during service worker startup and is also called on the worker thread after
+  // that, we put it here rather than interface ServiceWorkerHost, so that we
+  // can still keep interface ServiceWorkerHost being used solely on the worker
+  // thread in the renderer process.
+  CountFeature(blink.mojom.WebFeature feature);
+
   // Indicates that the worker is ready for inspection.
   OnReadyForInspection();
   // Indicates that the worker has finished loading the script.
diff --git a/content/common/service_worker/embedded_worker_messages.h b/content/common/service_worker/embedded_worker_messages.h
deleted file mode 100644
index be5e5c3..0000000
--- a/content/common/service_worker/embedded_worker_messages.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_SERVICE_WORKER_EMBEDDED_WORKER_MESSAGES_H_
-#define CONTENT_COMMON_SERVICE_WORKER_EMBEDDED_WORKER_MESSAGES_H_
-
-#include <stdint.h>
-
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_macros.h"
-#include "ipc/ipc_param_traits.h"
-
-#undef IPC_MESSAGE_EXPORT
-#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
-
-#define IPC_MESSAGE_START EmbeddedWorkerMsgStart
-
-// Renderer -> Browser message to count an API use. |feature| must be one of the
-// values from blink::UseCounter::Feature enum.
-IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_CountFeature,
-                     int64_t /* service_worker_version_id */,
-                     uint32_t /* feature */)
-
-#endif  // CONTENT_COMMON_SERVICE_WORKER_EMBEDDED_WORKER_MESSAGES_H_
diff --git a/content/common/throttling_url_loader.cc b/content/common/throttling_url_loader.cc
index fc8c821..6ead156 100644
--- a/content/common/throttling_url_loader.cc
+++ b/content/common/throttling_url_loader.cc
@@ -60,6 +60,20 @@
     loader_->ResumeReadingBodyFromNet(throttle_);
   }
 
+  void InterceptResponse(
+      network::mojom::URLLoaderPtr new_loader,
+      network::mojom::URLLoaderClientRequest new_client_request,
+      network::mojom::URLLoaderPtr* original_loader,
+      network::mojom::URLLoaderClientRequest* original_client_request)
+      override {
+    if (!loader_)
+      return;
+
+    ScopedDelegateCall scoped_delegate_call(this);
+    loader_->InterceptResponse(std::move(new_loader),
+                               std::move(new_client_request), original_loader,
+                               original_client_request);
+  }
   void Detach() { loader_ = nullptr; }
 
  private:
@@ -498,6 +512,24 @@
     url_loader_->ResumeReadingBodyFromNet();
 }
 
+void ThrottlingURLLoader::InterceptResponse(
+    network::mojom::URLLoaderPtr new_loader,
+    network::mojom::URLLoaderClientRequest new_client_request,
+    network::mojom::URLLoaderPtr* original_loader,
+    network::mojom::URLLoaderClientRequest* original_client_request) {
+  response_intercepted_ = true;
+
+  if (original_loader)
+    *original_loader = std::move(url_loader_);
+  url_loader_ = std::move(new_loader);
+
+  if (original_client_request)
+    *original_client_request = client_binding_.Unbind();
+  client_binding_.Bind(std::move(new_client_request));
+  client_binding_.set_connection_error_handler(base::BindRepeating(
+      &ThrottlingURLLoader::OnClientConnectionError, base::Unretained(this)));
+}
+
 void ThrottlingURLLoader::DisconnectClient(base::StringPiece custom_reason) {
   client_binding_.Close();
 
diff --git a/content/common/throttling_url_loader.h b/content/common/throttling_url_loader.h
index 54e48644..ecd5fd4 100644
--- a/content/common/throttling_url_loader.h
+++ b/content/common/throttling_url_loader.h
@@ -62,6 +62,8 @@
     forwarding_client_ = client;
   }
 
+  bool response_intercepted() const { return response_intercepted_; }
+
  private:
   class ForwardingThrottleDelegate;
 
@@ -122,6 +124,11 @@
   void SetPriority(net::RequestPriority priority);
   void PauseReadingBodyFromNet(URLLoaderThrottle* throttle);
   void ResumeReadingBodyFromNet(URLLoaderThrottle* throttle);
+  void InterceptResponse(
+      network::mojom::URLLoaderPtr new_loader,
+      network::mojom::URLLoaderClientRequest new_client_request,
+      network::mojom::URLLoaderPtr* original_loader,
+      network::mojom::URLLoaderClientRequest* original_client_request);
 
   // Disconnects the client connection and releases the URLLoader.
   void DisconnectClient(base::StringPiece custom_description);
@@ -226,6 +233,8 @@
   // The latest request URL from where we expect a response
   GURL response_url_;
 
+  bool response_intercepted_ = false;
+
   base::WeakPtrFactory<ThrottlingURLLoader> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ThrottlingURLLoader);
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
index 5a217fa9..ded026c 100644
--- a/content/public/app/mojo/content_browser_manifest.json
+++ b/content/public/app/mojo/content_browser_manifest.json
@@ -42,6 +42,7 @@
           "content::mojom::FieldTrialRecorder",
           "content::mojom::FileUtilitiesHost",
           "content::mojom::FrameSinkProvider",
+          "content::mojom::MediaStreamTrackMetricsHost",
           "content::mojom::MemoryCoordinatorHandle",
           "content::mojom::PeerConnectionTrackerHost",
           "content::mojom::PushMessaging",
diff --git a/content/public/browser/cookie_store_factory.h b/content/public/browser/cookie_store_factory.h
index c459156..c5073384 100644
--- a/content/public/browser/cookie_store_factory.h
+++ b/content/public/browser/cookie_store_factory.h
@@ -21,7 +21,6 @@
 class ChannelIDService;
 class CookieCryptoDelegate;
 class CookieStore;
-class NetLog;
 }
 
 namespace storage {
@@ -84,8 +83,7 @@
 };
 
 CONTENT_EXPORT std::unique_ptr<net::CookieStore> CreateCookieStore(
-    const CookieStoreConfig& config,
-    net::NetLog* net_log);
+    const CookieStoreConfig& config);
 
 }  // namespace content
 
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index e46c8288..5bc794d4 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -13,6 +13,7 @@
 #include "content/public/browser/reload_type.h"
 #include "content/public/browser/restore_type.h"
 #include "content/public/common/referrer.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/net_errors.h"
 #include "net/http/http_response_info.h"
@@ -317,6 +318,9 @@
   // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
   // be a clone of the NavigationData.
   virtual NavigationData* GetNavigationData() = 0;
+
+  virtual void RegisterSubresourceOverride(
+      mojom::TransferrableURLLoaderPtr transferrable_loader) = 0;
 };
 
 }  // namespace content
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index bd16811..35e4ea0 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -368,6 +368,7 @@
     "fullscreen_video_element.mojom",
     "push_messaging_status.mojom",
     "resource_usage_reporter.mojom",
+    "transferrable_url_loader.mojom",
     "webplugininfo.mojom",
     "window_container_type.mojom",
   ]
diff --git a/content/public/common/transferrable_url_loader.mojom b/content/public/common/transferrable_url_loader.mojom
new file mode 100644
index 0000000..d1a3a7a
--- /dev/null
+++ b/content/public/common/transferrable_url_loader.mojom
@@ -0,0 +1,17 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+import "services/network/public/mojom/url_loader.mojom";
+import "url/mojom/url.mojom";

+

+// Used to transfer a URLLoader when after OnReceiveResponse() has been called

+// on the URLLoaderClient.

+struct TransferrableURLLoader {

+  url.mojom.Url url;

+  network.mojom.URLLoader url_loader;

+  network.mojom.URLLoaderClient& url_loader_client;

+  network.mojom.URLResponseHead head;

+};

diff --git a/content/public/common/url_loader_throttle.cc b/content/public/common/url_loader_throttle.cc
index af525cc..b2743344 100644
--- a/content/public/common/url_loader_throttle.cc
+++ b/content/public/common/url_loader_throttle.cc
@@ -12,6 +12,14 @@
 void URLLoaderThrottle::Delegate::PauseReadingBodyFromNet() {}
 void URLLoaderThrottle::Delegate::ResumeReadingBodyFromNet() {}
 
+void URLLoaderThrottle::Delegate::InterceptResponse(
+    network::mojom::URLLoaderPtr new_loader,
+    network::mojom::URLLoaderClientRequest new_client_request,
+    network::mojom::URLLoaderPtr* original_loader,
+    network::mojom::URLLoaderClientRequest* original_client_request) {
+  NOTIMPLEMENTED();
+}
+
 URLLoaderThrottle::Delegate::~Delegate() {}
 
 URLLoaderThrottle::~URLLoaderThrottle() {}
diff --git a/content/public/common/url_loader_throttle.h b/content/public/common/url_loader_throttle.h
index 7fd342a..73a1ae2 100644
--- a/content/public/common/url_loader_throttle.h
+++ b/content/public/common/url_loader_throttle.h
@@ -8,6 +8,7 @@
 #include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
 #include "content/public/common/resource_type.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "net/base/request_priority.h"
 
 class GURL;
@@ -58,6 +59,14 @@
     virtual void PauseReadingBodyFromNet();
     virtual void ResumeReadingBodyFromNet();
 
+    // Replaces the URLLoader and URLLoaderClient endpoints held by the
+    // ThrottlingURLLoader instance.
+    virtual void InterceptResponse(
+        network::mojom::URLLoaderPtr new_loader,
+        network::mojom::URLLoaderClientRequest new_client_request,
+        network::mojom::URLLoaderPtr* original_loader,
+        network::mojom::URLLoaderClientRequest* original_client_request);
+
    protected:
     virtual ~Delegate();
   };
diff --git a/content/renderer/cache_storage/cache_storage_message_filter.cc b/content/renderer/cache_storage/cache_storage_message_filter.cc
index 5f7fad4..33fa79f 100644
--- a/content/renderer/cache_storage/cache_storage_message_filter.cc
+++ b/content/renderer/cache_storage/cache_storage_message_filter.cc
@@ -11,9 +11,10 @@
 namespace content {
 
 CacheStorageMessageFilter::CacheStorageMessageFilter(
-    ThreadSafeSender* thread_safe_sender)
-    : WorkerThreadMessageFilter(thread_safe_sender) {
-}
+    ThreadSafeSender* thread_safe_sender,
+    scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
+    : WorkerThreadMessageFilter(thread_safe_sender,
+                                std::move(main_thread_task_runner)) {}
 
 CacheStorageMessageFilter::~CacheStorageMessageFilter() {
 }
diff --git a/content/renderer/cache_storage/cache_storage_message_filter.h b/content/renderer/cache_storage/cache_storage_message_filter.h
index 6527594..528a683 100644
--- a/content/renderer/cache_storage/cache_storage_message_filter.h
+++ b/content/renderer/cache_storage/cache_storage_message_filter.h
@@ -13,7 +13,9 @@
 
 class CacheStorageMessageFilter : public WorkerThreadMessageFilter {
  public:
-  explicit CacheStorageMessageFilter(ThreadSafeSender* thread_safe_sender);
+  CacheStorageMessageFilter(
+      ThreadSafeSender* thread_safe_sender,
+      scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);
 
  protected:
   ~CacheStorageMessageFilter() override;
diff --git a/content/renderer/loader/child_url_loader_factory_bundle.cc b/content/renderer/loader/child_url_loader_factory_bundle.cc
index 08d0a9d..1ad2ae19 100644
--- a/content/renderer/loader/child_url_loader_factory_bundle.cc
+++ b/content/renderer/loader/child_url_loader_factory_bundle.cc
@@ -5,14 +5,99 @@
 #include "content/renderer/loader/child_url_loader_factory_bundle.h"
 
 #include "base/logging.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
 #include "url/gurl.h"
 #include "url/url_constants.h"
 
 namespace content {
 
+namespace {
+
+class URLLoaderRelay : public network::mojom::URLLoaderClient,
+                       public network::mojom::URLLoader {
+ public:
+  URLLoaderRelay(network::mojom::URLLoaderPtr loader_sink,
+                 network::mojom::URLLoaderClientRequest client_source,
+                 network::mojom::URLLoaderClientPtr client_sink)
+      : loader_sink_(std::move(loader_sink)),
+        client_source_binding_(this, std::move(client_source)),
+        client_sink_(std::move(client_sink)) {}
+
+  // network::mojom::URLLoader implementation:
+  void FollowRedirect() override { loader_sink_->FollowRedirect(); }
+
+  void ProceedWithResponse() override { loader_sink_->ProceedWithResponse(); }
+
+  void SetPriority(net::RequestPriority priority,
+                   int32_t intra_priority_value) override {
+    loader_sink_->SetPriority(priority, intra_priority_value);
+  }
+
+  void PauseReadingBodyFromNet() override {
+    loader_sink_->PauseReadingBodyFromNet();
+  }
+
+  void ResumeReadingBodyFromNet() override {
+    loader_sink_->ResumeReadingBodyFromNet();
+  }
+
+  // network::mojom::URLLoaderClient implementation:
+  void OnReceiveResponse(
+      const network::ResourceResponseHead& head,
+      const base::Optional<net::SSLInfo>& ssl_info,
+      network::mojom::DownloadedTempFilePtr downloaded_file) override {
+    client_sink_->OnReceiveResponse(head, ssl_info, std::move(downloaded_file));
+  }
+
+  void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
+                         const network::ResourceResponseHead& head) override {
+    client_sink_->OnReceiveRedirect(redirect_info, head);
+  }
+
+  void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override {
+    client_sink_->OnDataDownloaded(data_length, encoded_length);
+  }
+
+  void OnUploadProgress(int64_t current_position,
+                        int64_t total_size,
+                        OnUploadProgressCallback callback) override {
+    client_sink_->OnUploadProgress(current_position, total_size,
+                                   std::move(callback));
+  }
+
+  void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override {
+    client_sink_->OnReceiveCachedMetadata(data);
+  }
+
+  void OnTransferSizeUpdated(int32_t transfer_size_diff) override {
+    client_sink_->OnTransferSizeUpdated(transfer_size_diff);
+  }
+
+  void OnStartLoadingResponseBody(
+      mojo::ScopedDataPipeConsumerHandle body) override {
+    client_sink_->OnStartLoadingResponseBody(std::move(body));
+  }
+
+  void OnComplete(const network::URLLoaderCompletionStatus& status) override {
+    client_sink_->OnComplete(status);
+  }
+
+ private:
+  network::mojom::URLLoaderPtr loader_sink_;
+  mojo::Binding<network::mojom::URLLoaderClient> client_source_binding_;
+  network::mojom::URLLoaderClientPtr client_sink_;
+};
+
+}  // namespace
+
 ChildURLLoaderFactoryBundleInfo::ChildURLLoaderFactoryBundleInfo() = default;
 
 ChildURLLoaderFactoryBundleInfo::ChildURLLoaderFactoryBundleInfo(
+    std::unique_ptr<URLLoaderFactoryBundleInfo> base_info)
+    : URLLoaderFactoryBundleInfo(std::move(base_info->default_factory_info()),
+                                 std::move(base_info->factories_info())) {}
+
+ChildURLLoaderFactoryBundleInfo::ChildURLLoaderFactoryBundleInfo(
     network::mojom::URLLoaderFactoryPtrInfo default_factory_info,
     std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
         factories_info,
@@ -39,7 +124,7 @@
 
 ChildURLLoaderFactoryBundle::ChildURLLoaderFactoryBundle(
     std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info) {
-  Update(std::move(info));
+  Update(std::move(info), base::nullopt);
 }
 
 ChildURLLoaderFactoryBundle::ChildURLLoaderFactoryBundle(
@@ -75,6 +160,25 @@
     const network::ResourceRequest& request,
     network::mojom::URLLoaderClientPtr client,
     const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
+  auto override_iter = subresource_overrides_.find(request.url);
+  if (override_iter != subresource_overrides_.end()) {
+    mojom::TransferrableURLLoaderPtr transferrable_loader =
+        std::move(override_iter->second);
+    subresource_overrides_.erase(override_iter);
+
+    client->OnReceiveResponse(transferrable_loader->head, base::nullopt,
+                              nullptr);
+    mojo::MakeStrongBinding(
+        std::make_unique<URLLoaderRelay>(
+            network::mojom::URLLoaderPtr(
+                std::move(transferrable_loader->url_loader)),
+            std::move(transferrable_loader->url_loader_client),
+            std::move(client)),
+        std::move(loader));
+
+    return;
+  }
+
   network::mojom::URLLoaderFactory* factory_ptr = GetFactoryForURL(request.url);
 
   factory_ptr->CreateLoaderAndStart(std::move(loader), routing_id, request_id,
@@ -104,18 +208,29 @@
         mojo::MakeRequest(&direct_network_factory_info));
   }
 
+  // Currently there is no need to override subresources from workers,
+  // therefore |subresource_overrides| are not shared with the clones.
+
   return std::make_unique<ChildURLLoaderFactoryBundleInfo>(
       std::move(default_factory_info), std::move(factories_info),
       std::move(direct_network_factory_info));
 }
 
 void ChildURLLoaderFactoryBundle::Update(
-    std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info) {
+    std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info,
+    base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+        subresource_overrides) {
   if (info->direct_network_factory_info()) {
     direct_network_factory_.Bind(
         std::move(info->direct_network_factory_info()));
   }
   URLLoaderFactoryBundle::Update(std::move(info));
+
+  if (subresource_overrides) {
+    for (auto& element : *subresource_overrides) {
+      subresource_overrides_[element->url] = std::move(element);
+    }
+  }
 }
 
 bool ChildURLLoaderFactoryBundle::IsHostChildURLLoaderFactoryBundle() const {
diff --git a/content/renderer/loader/child_url_loader_factory_bundle.h b/content/renderer/loader/child_url_loader_factory_bundle.h
index 2e88425..5b7bac1ab 100644
--- a/content/renderer/loader/child_url_loader_factory_bundle.h
+++ b/content/renderer/loader/child_url_loader_factory_bundle.h
@@ -9,6 +9,7 @@
 #include "content/common/content_export.h"
 #include "content/common/possibly_associated_interface_ptr.h"
 #include "content/common/url_loader_factory_bundle.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 
 namespace content {
@@ -22,6 +23,8 @@
       PossiblyAssociatedInterfacePtrInfo<network::mojom::URLLoaderFactory>;
 
   ChildURLLoaderFactoryBundleInfo();
+  explicit ChildURLLoaderFactoryBundleInfo(
+      std::unique_ptr<URLLoaderFactoryBundleInfo> base_info);
   ChildURLLoaderFactoryBundleInfo(
       network::mojom::URLLoaderFactoryPtrInfo default_factory_info,
       std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
@@ -82,7 +85,9 @@
 
   std::unique_ptr<ChildURLLoaderFactoryBundleInfo> PassInterface();
 
-  void Update(std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info);
+  void Update(std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info,
+              base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+                  subresource_overrides);
 
   virtual bool IsHostChildURLLoaderFactoryBundle() const;
 
@@ -96,6 +101,8 @@
   PossiblyAssociatedFactoryGetterCallback direct_network_factory_getter_;
   PossiblyAssociatedURLLoaderFactoryPtr direct_network_factory_;
 
+  std::map<GURL, mojom::TransferrableURLLoaderPtr> subresource_overrides_;
+
   FactoryGetterCallback default_blob_factory_getter_;
 };
 
diff --git a/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc b/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
index c970d9ae..a3c5f63 100644
--- a/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
+++ b/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
@@ -43,7 +43,7 @@
     std::unique_ptr<TrackedChildURLLoaderFactoryBundleInfo> info) {
   DCHECK(info->main_thread_host_bundle());
   main_thread_host_bundle_ = std::move(info->main_thread_host_bundle());
-  Update(std::move(info));
+  Update(std::move(info), base::nullopt);
   AddObserverOnMainThread();
 }
 
@@ -98,7 +98,8 @@
 void TrackedChildURLLoaderFactoryBundle::OnUpdate(
     std::unique_ptr<SharedURLLoaderFactoryInfo> info) {
   Update(base::WrapUnique(
-      static_cast<ChildURLLoaderFactoryBundleInfo*>(info.release())));
+             static_cast<ChildURLLoaderFactoryBundleInfo*>(info.release())),
+         base::nullopt);
 }
 
 // -----------------------------------------------------------------------------
@@ -142,7 +143,7 @@
                                      partial_bundle->Clone());
   }
 
-  Update(partial_bundle->PassInterface());
+  Update(partial_bundle->PassInterface(), base::nullopt);
 }
 
 bool HostChildURLLoaderFactoryBundle::IsHostChildURLLoaderFactoryBundle()
diff --git a/content/renderer/media/media_factory.cc b/content/renderer/media/media_factory.cc
index 47a8f8c..bbf9808c 100644
--- a/content/renderer/media/media_factory.cc
+++ b/content/renderer/media/media_factory.cc
@@ -71,11 +71,7 @@
 
 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
 #include "media/remoting/courier_renderer_factory.h"    // nogncheck
-#include "media/remoting/remoting_cdm_controller.h"     // nogncheck
-#include "media/remoting/remoting_cdm_factory.h"        // nogncheck
 #include "media/remoting/renderer_controller.h"         // nogncheck
-#include "media/remoting/shared_session.h"              // nogncheck
-#include "media/remoting/sink_availability_observer.h"  // nogncheck
 #endif
 
 #if BUILDFLAG(ENABLE_LIBRARY_CDMS)
@@ -146,19 +142,6 @@
 
   remote_interfaces_ = render_frame_->GetRemoteInterfaces();
   DCHECK(remote_interfaces_);
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
-  // Create the SinkAvailabilityObserver to monitor the remoting sink
-  // availablity.
-  media::mojom::RemotingSourcePtr remoting_source;
-  auto remoting_source_request = mojo::MakeRequest(&remoting_source);
-  media::mojom::RemoterPtr remoter;
-  GetRemoterFactory()->Create(std::move(remoting_source),
-                              mojo::MakeRequest(&remoter));
-  remoting_sink_observer_ =
-      std::make_unique<media::remoting::SinkAvailabilityObserver>(
-          std::move(remoting_source_request), std::move(remoter));
-#endif  // BUILDFLAG(ENABLE_MEDIA_REMOTING)
 }
 
 #if defined(OS_ANDROID)
@@ -434,9 +417,8 @@
   GetRemoterFactory()->Create(std::move(remoting_source),
                               mojo::MakeRequest(&remoter));
   using RemotingController = media::remoting::RendererController;
-  std::unique_ptr<RemotingController> remoting_controller(
-      new RemotingController(new media::remoting::SharedSession(
-          std::move(remoting_source_request), std::move(remoter))));
+  auto remoting_controller = std::make_unique<RemotingController>(
+      std::move(remoting_source_request), std::move(remoter));
   *out_media_observer = remoting_controller->GetWeakPtr();
 
   auto courier_factory =
@@ -558,12 +540,6 @@
   cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceFactory()));
 #endif  // BUILDFLAG(ENABLE_LIBRARY_CDMS)
 
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
-  cdm_factory_.reset(new media::remoting::RemotingCdmFactory(
-      std::move(cdm_factory_), GetRemoterFactory(),
-      std::move(remoting_sink_observer_)));
-#endif  // BUILDFLAG(ENABLE_MEDIA_REMOTING)
-
   return cdm_factory_.get();
 }
 
diff --git a/content/renderer/media/media_factory.h b/content/renderer/media/media_factory.h
index f63ba99..36171f7 100644
--- a/content/renderer/media/media_factory.h
+++ b/content/renderer/media/media_factory.h
@@ -49,9 +49,6 @@
 #if defined(OS_ANDROID)
 class RendererMediaPlayerManager;
 #endif
-namespace remoting {
-class SinkAvailabilityObserver;
-}
 }
 
 namespace service_manager {
@@ -197,14 +194,6 @@
   // Lazy-bound pointer to the RemoterFactory service in the browser
   // process. Always use the GetRemoterFactory() accessor instead of this.
   media::mojom::RemoterFactoryPtr remoter_factory_;
-
-  // An observer for the remoting sink availability that is used by
-  // media::RemotingCdmFactory to initialize media::RemotingSourceImpl. Created
-  // in the constructor of RenderFrameImpl to make sure
-  // media::RemotingSourceImpl be intialized with correct availability info.
-  // Own by media::RemotingCdmFactory after it is created.
-  std::unique_ptr<media::remoting::SinkAvailabilityObserver>
-      remoting_sink_observer_;
 #endif
 };
 
diff --git a/content/renderer/media/webrtc/media_stream_track_metrics.cc b/content/renderer/media/webrtc/media_stream_track_metrics.cc
index e340bd0b..e84c5e83b 100644
--- a/content/renderer/media/webrtc/media_stream_track_metrics.cc
+++ b/content/renderer/media/webrtc/media_stream_track_metrics.cc
@@ -10,8 +10,10 @@
 
 #include "base/md5.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "content/common/media/media_stream_track_metrics_host_messages.h"
+#include "content/child/child_thread_impl.h"
+#include "content/public/common/service_names.mojom.h"
 #include "content/renderer/render_thread_impl.h"
+#include "services/service_manager/public/cpp/connector.h"
 #include "third_party/webrtc/api/mediastreaminterface.h"
 
 using webrtc::AudioTrackVector;
@@ -351,16 +353,13 @@
   // |of a unit test.
   if (render_thread) {
     if (event == CONNECTED) {
-      RenderThreadImpl::current()->Send(
-          new MediaStreamTrackMetricsHost_AddTrack(
-              MakeUniqueId(track_id, stream_type),
-              track_type == AUDIO_TRACK,
-              stream_type == RECEIVED_STREAM));
+      GetMediaStreamTrackMetricsHost()->AddTrack(
+          MakeUniqueId(track_id, stream_type), track_type == AUDIO_TRACK,
+          stream_type == RECEIVED_STREAM);
     } else {
       DCHECK_EQ(DISCONNECTED, event);
-      RenderThreadImpl::current()->Send(
-          new MediaStreamTrackMetricsHost_RemoveTrack(
-              MakeUniqueId(track_id, stream_type)));
+      GetMediaStreamTrackMetricsHost()->RemoveTrack(
+          MakeUniqueId(track_id, stream_type));
     }
   }
 }
@@ -399,4 +398,13 @@
       stream_type);
 }
 
+mojom::MediaStreamTrackMetricsHostPtr&
+MediaStreamTrackMetrics::GetMediaStreamTrackMetricsHost() {
+  if (!track_metrics_host_) {
+    ChildThreadImpl::current()->GetConnector()->BindInterface(
+        mojom::kBrowserServiceName, &track_metrics_host_);
+  }
+  return track_metrics_host_;
+}
+
 }  // namespace content
diff --git a/content/renderer/media/webrtc/media_stream_track_metrics.h b/content/renderer/media/webrtc/media_stream_track_metrics.h
index 1a09b4eee..7793186 100644
--- a/content/renderer/media/webrtc/media_stream_track_metrics.h
+++ b/content/renderer/media/webrtc/media_stream_track_metrics.h
@@ -12,6 +12,7 @@
 
 #include "base/sequence_checker.h"
 #include "content/common/content_export.h"
+#include "content/common/media/media_stream.mojom.h"
 #include "third_party/webrtc/api/peerconnectioninterface.h"
 
 namespace webrtc {
@@ -92,6 +93,10 @@
   // track object and the PeerConnection it is attached to both exist.
   uint64_t MakeUniqueId(const std::string& track, StreamType stream_type);
 
+  mojom::MediaStreamTrackMetricsHostPtr& GetMediaStreamTrackMetricsHost();
+
+  mojom::MediaStreamTrackMetricsHostPtr track_metrics_host_;
+
   typedef std::vector<std::unique_ptr<MediaStreamTrackMetricsObserver>>
       ObserverVector;
   ObserverVector observers_;
diff --git a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
index 23d38be..fd71ccd 100644
--- a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
@@ -4,8 +4,10 @@
 
 #include "content/renderer/media/webrtc/rtc_peer_connection_handler.h"
 
+#include <ctype.h>
 #include <string.h>
 
+#include <algorithm>
 #include <memory>
 #include <string>
 #include <utility>
@@ -16,9 +18,11 @@
 #include "base/logging.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
+#include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
+#include "base/unguessable_token.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "content/renderer/media/stream/media_stream_constraints_util.h"
@@ -1336,7 +1340,8 @@
     blink::WebRTCPeerConnectionHandlerClient* client,
     PeerConnectionDependencyFactory* dependency_factory,
     scoped_refptr<base::SingleThreadTaskRunner> task_runner)
-    : initialize_called_(false),
+    : id_(base::ToUpperASCII(base::UnguessableToken::Create().ToString())),
+      initialize_called_(false),
       client_(client),
       is_closed_(false),
       dependency_factory_(dependency_factory),
@@ -1349,6 +1354,7 @@
       task_runner_(std::move(task_runner)),
       weak_factory_(this) {
   CHECK(client_);
+
   GetPeerConnectionHandlers()->insert(this);
 }
 
@@ -1998,6 +2004,10 @@
   is_closed_ = true;
 }
 
+blink::WebString RTCPeerConnectionHandler::Id() const {
+  return blink::WebString::FromASCII(id_);
+}
+
 void RTCPeerConnectionHandler::OnSignalingChange(
     webrtc::PeerConnectionInterface::SignalingState new_state) {
   DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/content/renderer/media/webrtc/rtc_peer_connection_handler.h b/content/renderer/media/webrtc/rtc_peer_connection_handler.h
index 768821f..7bcd1ec 100644
--- a/content/renderer/media/webrtc/rtc_peer_connection_handler.h
+++ b/content/renderer/media/webrtc/rtc_peer_connection_handler.h
@@ -153,6 +153,7 @@
       const blink::WebString& label,
       const blink::WebRTCDataChannelInit& init) override;
   void Stop() override;
+  blink::WebString Id() const override;
 
   // Delegate functions to allow for mocking of WebKit interfaces.
   // getStats takes ownership of request parameter.
@@ -244,6 +245,9 @@
   void RunSynchronousClosureOnSignalingThread(const base::Closure& closure,
                                               const char* trace_event_name);
 
+  // Corresponds to the experimental RTCPeerConnection.id read-only attribute.
+  const std::string id_;
+
   // Initialize() is never expected to be called more than once, even if the
   // first call fails.
   bool initialize_called_;
diff --git a/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc
index 8462cc3..7ea0930 100644
--- a/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc
@@ -5,6 +5,7 @@
 #include "content/renderer/media/webrtc/rtc_peer_connection_handler.h"
 
 #include <stddef.h>
+#include <string.h>
 
 #include <map>
 #include <memory>
@@ -270,9 +271,7 @@
   void SetUp() override {
     mock_client_.reset(new NiceMock<MockWebRTCPeerConnectionHandlerClient>());
     mock_dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
-    pc_handler_.reset(
-        new RTCPeerConnectionHandlerUnderTest(
-            mock_client_.get(), mock_dependency_factory_.get()));
+    pc_handler_ = CreateRTCPeerConnectionHandlerUnderTest();
     mock_tracker_.reset(new NiceMock<MockPeerConnectionTracker>());
     blink::WebRTCConfiguration config;
     blink::WebMediaConstraints constraints;
@@ -292,6 +291,12 @@
     blink::WebHeap::CollectAllGarbageForTesting();
   }
 
+  std::unique_ptr<RTCPeerConnectionHandlerUnderTest>
+  CreateRTCPeerConnectionHandlerUnderTest() {
+    return std::make_unique<RTCPeerConnectionHandlerUnderTest>(
+        mock_client_.get(), mock_dependency_factory_.get());
+  }
+
   // Creates a WebKit local MediaStream.
   blink::WebMediaStream CreateLocalMediaStream(
       const std::string& stream_label) {
@@ -1542,4 +1547,16 @@
   channel->SetClient(nullptr);
 }
 
+TEST_F(RTCPeerConnectionHandlerTest, IdIsOfExpectedFormat) {
+  const std::string id = pc_handler_->Id().Ascii();
+  constexpr size_t expected_length = 32u;
+  EXPECT_EQ(id.length(), expected_length);
+  EXPECT_EQ(id.length(), strspn(id.c_str(), "0123456789ABCDEF"));
+}
+
+TEST_F(RTCPeerConnectionHandlerTest, IdIsNotRepeated) {
+  const auto other_pc_handler_ = CreateRTCPeerConnectionHandlerUnderTest();
+  EXPECT_NE(pc_handler_->Id(), other_pc_handler_->Id());
+}
+
 }  // namespace content
diff --git a/content/renderer/notifications/notification_dispatcher.cc b/content/renderer/notifications/notification_dispatcher.cc
index 46b700fc..9508f95e7 100644
--- a/content/renderer/notifications/notification_dispatcher.cc
+++ b/content/renderer/notifications/notification_dispatcher.cc
@@ -11,8 +11,10 @@
 namespace content {
 
 NotificationDispatcher::NotificationDispatcher(
-    ThreadSafeSender* thread_safe_sender)
-    : WorkerThreadMessageFilter(thread_safe_sender) {}
+    ThreadSafeSender* thread_safe_sender,
+    scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
+    : WorkerThreadMessageFilter(thread_safe_sender,
+                                std::move(main_thread_task_runner)) {}
 
 NotificationDispatcher::~NotificationDispatcher() {}
 
diff --git a/content/renderer/notifications/notification_dispatcher.h b/content/renderer/notifications/notification_dispatcher.h
index dac26a1b..15cdc4a 100644
--- a/content/renderer/notifications/notification_dispatcher.h
+++ b/content/renderer/notifications/notification_dispatcher.h
@@ -15,7 +15,9 @@
 
 class NotificationDispatcher : public WorkerThreadMessageFilter {
  public:
-  explicit NotificationDispatcher(ThreadSafeSender* thread_safe_sender);
+  NotificationDispatcher(
+      ThreadSafeSender* thread_safe_sender,
+      scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);
 
   // Generates and stores a new process-unique notification request ID mapped to
   // |thread_id|, and returns the generated request ID. This method can be
diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc
index 30a15e8..430f61d 100644
--- a/content/renderer/p2p/ipc_network_manager.cc
+++ b/content/renderer/p2p/ipc_network_manager.cc
@@ -100,9 +100,15 @@
     DCHECK(!ip_address.IsNil());
 
     rtc::IPAddress prefix = rtc::TruncateIP(ip_address, it->prefix_length);
-    std::unique_ptr<rtc::Network> network(
-        new rtc::Network(it->name, it->name, prefix, it->prefix_length,
-                         ConvertConnectionTypeToAdapterType(it->type)));
+    rtc::AdapterType adapter_type =
+        ConvertConnectionTypeToAdapterType(it->type);
+    // If the adapter type is unknown, try to guess it using WebRTC's string
+    // matching rules.
+    if (adapter_type == rtc::ADAPTER_TYPE_UNKNOWN) {
+      adapter_type = rtc::GetAdapterTypeFromName(it->name.c_str());
+    }
+    std::unique_ptr<rtc::Network> network(new rtc::Network(
+        it->name, it->name, prefix, it->prefix_length, adapter_type));
     network->set_default_local_address_provider(this);
 
     rtc::InterfaceAddress iface_addr;
diff --git a/content/renderer/p2p/ipc_network_manager_unittest.cc b/content/renderer/p2p/ipc_network_manager_unittest.cc
index a7071718..3d7effb 100644
--- a/content/renderer/p2p/ipc_network_manager_unittest.cc
+++ b/content/renderer/p2p/ipc_network_manager_unittest.cc
@@ -117,4 +117,43 @@
   EXPECT_EQ((*network_with_one_ip)->GetIPs()[0], ip_address);
 }
 
+// Test that IpcNetworkManager will guess a network type from the interface
+// name when not otherwise available.
+TEST_F(IpcNetworkManagerTest, DeterminesNetworkTypeFromNameIfUnknown) {
+  net::NetworkInterfaceList list;
+  net::IPAddress ip;
+  std::vector<rtc::Network*> networks;
+  rtc::IPAddress ip_address;
+
+  // Add a "tun1" entry of type "unknown" and "tun2" entry of type Wi-Fi. The
+  // "tun1" entry (and only it) should have its type determined from its name,
+  // since its type is unknown.
+  EXPECT_TRUE(ip.AssignFromIPLiteral(kIPv6PublicAddrString1));
+  list.push_back(net::NetworkInterface(
+      "tun1", "tun1", 0, net::NetworkChangeNotifier::CONNECTION_UNKNOWN, ip, 64,
+      net::IP_ADDRESS_ATTRIBUTE_NONE));
+
+  EXPECT_TRUE(ip.AssignFromIPLiteral(kIPv6PublicAddrString2));
+  list.push_back(net::NetworkInterface(
+      "tun2", "tun2", 0, net::NetworkChangeNotifier::CONNECTION_WIFI, ip, 64,
+      net::IP_ADDRESS_ATTRIBUTE_NONE));
+
+  network_manager_->OnNetworkListChanged(list, net::IPAddress(),
+                                         net::IPAddress());
+  network_manager_->GetNetworks(&networks);
+  EXPECT_EQ(2uL, networks.size());
+
+  auto tun1 = std::find_if(
+      networks.begin(), networks.end(),
+      [](rtc::Network* network) { return network->name() == "tun1"; });
+  ASSERT_NE(networks.end(), tun1);
+  auto tun2 = std::find_if(
+      networks.begin(), networks.end(),
+      [](rtc::Network* network) { return network->name() == "tun2"; });
+  ASSERT_NE(networks.end(), tun1);
+
+  EXPECT_EQ(rtc::ADAPTER_TYPE_VPN, (*tun1)->type());
+  EXPECT_EQ(rtc::ADAPTER_TYPE_WIFI, (*tun2)->type());
+}
+
 }  // namespace content
diff --git a/content/renderer/pepper/OWNERS b/content/renderer/pepper/OWNERS
index 6532e804..a032c224 100644
--- a/content/renderer/pepper/OWNERS
+++ b/content/renderer/pepper/OWNERS
@@ -7,7 +7,6 @@
 
 # WebSocket
 per-file *websocket*=ricea@chromium.org
-per-file *websocket*=tyoshino@chromium.org
 per-file *websocket*=yhirano@chromium.org
 
 # COMPONENT: Internals>Plugins>Pepper
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c810f60..e72bf40c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3084,6 +3084,8 @@
     const RequestNavigationParams& request_params,
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories,
+    base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+        subresource_overrides,
     mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
     const base::UnguessableToken& devtools_navigation_token) {
   DCHECK(!IsRendererDebugURL(common_params.url));
@@ -3113,7 +3115,8 @@
          !base::FeatureList::IsEnabled(network::features::kNetworkService) ||
          subresource_loader_factories);
 
-  SetupLoaderFactoryBundle(std::move(subresource_loader_factories));
+  SetupLoaderFactoryBundle(std::move(subresource_loader_factories),
+                           std::move(subresource_overrides));
 
   // Clear pending navigations which weren't sent to the browser because we
   // did not get a didStartProvisionalLoad() notification for them.
@@ -3213,7 +3216,8 @@
   GetContentClient()->SetActiveURL(
       common_params.url, frame_->Top()->GetSecurityOrigin().ToString().Utf8());
 
-  SetupLoaderFactoryBundle(std::move(subresource_loader_factories));
+  SetupLoaderFactoryBundle(std::move(subresource_loader_factories),
+                           base::nullopt /* subresource_overrides */);
 
   pending_navigation_params_.reset(new PendingNavigationParams(
       common_params, request_params,
@@ -6581,14 +6585,17 @@
           base::MakeRefCounted<TrackedChildURLLoaderFactoryBundle>(
               std::move(bundle_info));
     } else {
-      SetupLoaderFactoryBundle(nullptr);
+      SetupLoaderFactoryBundle(nullptr,
+                               base::nullopt /* subresource_overrides */);
     }
   }
   return loader_factories_.get();
 }
 
 void RenderFrameImpl::SetupLoaderFactoryBundle(
-    std::unique_ptr<URLLoaderFactoryBundleInfo> info) {
+    std::unique_ptr<URLLoaderFactoryBundleInfo> info,
+    base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+        subresource_overrides) {
   RenderThreadImpl* render_thread = RenderThreadImpl::current();
 
   loader_factories_ = base::MakeRefCounted<HostChildURLLoaderFactoryBundle>();
@@ -6597,12 +6604,14 @@
   if (render_thread) {
     loader_factories_->Update(render_thread->blink_platform_impl()
                                   ->CreateDefaultURLLoaderFactoryBundle()
-                                  ->PassInterface());
+                                  ->PassInterface(),
+                              base::nullopt);
   }
 
   if (info) {
-    static_cast<URLLoaderFactoryBundle*>(loader_factories_.get())
-        ->Update(std::move(info));
+    loader_factories_->Update(
+        std::make_unique<ChildURLLoaderFactoryBundleInfo>(std::move(info)),
+        std::move(subresource_overrides));
   }
 }
 
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 781dad0..5529f20 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -529,6 +529,8 @@
       const RequestNavigationParams& request_params,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
+      base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+          subresource_overrides,
       mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
       const base::UnguessableToken& devtools_navigation_token) override;
   void CommitFailedNavigation(
@@ -1119,7 +1121,9 @@
   ChildURLLoaderFactoryBundle* GetLoaderFactoryBundle();
 
   void SetupLoaderFactoryBundle(
-      std::unique_ptr<URLLoaderFactoryBundleInfo> info);
+      std::unique_ptr<URLLoaderFactoryBundleInfo> info,
+      base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+          subresource_overrides);
 
   // Update current main frame's encoding and send it to browser window.
   // Since we want to let users see the right encoding info from menu
diff --git a/content/renderer/render_frame_metadata_observer_impl.cc b/content/renderer/render_frame_metadata_observer_impl.cc
index 58989b6..de27550 100644
--- a/content/renderer/render_frame_metadata_observer_impl.cc
+++ b/content/renderer/render_frame_metadata_observer_impl.cc
@@ -22,20 +22,32 @@
 }
 
 void RenderFrameMetadataObserverImpl::OnRenderFrameSubmission(
-    const cc::RenderFrameMetadata& metadata) {
-  bool metadata_changed = last_render_frame_metadata_ != metadata;
-  last_render_frame_metadata_ = metadata;
-
+    cc::RenderFrameMetadata metadata) {
   if (!render_frame_metadata_observer_client_)
     return;
 
-  if (report_all_frame_submissions_for_testing_enabled_)
+  // By default only report metadata changes for fields which have a low
+  // frequency of change. However if there are changes in high frequency fields
+  // these can be reported while testing is enabled.
+  bool send_metadata = false;
+  if (report_all_frame_submissions_for_testing_enabled_) {
     render_frame_metadata_observer_client_->OnFrameSubmissionForTesting();
+    send_metadata = last_render_frame_metadata_ != metadata;
+  } else {
+    // Sending |root_scroll_offset| outside of tests would leave the browser
+    // process with out of date information. It is an optional parameter which
+    // we clear here.
+    metadata.root_scroll_offset = base::nullopt;
+    send_metadata = cc::RenderFrameMetadata::HasAlwaysUpdateMetadataChanged(
+        last_render_frame_metadata_, metadata);
+  }
 
-  if (metadata_changed) {
+  if (send_metadata) {
     render_frame_metadata_observer_client_->OnRenderFrameMetadataChanged(
         metadata);
   }
+
+  last_render_frame_metadata_ = metadata;
 }
 
 void RenderFrameMetadataObserverImpl::ReportAllFrameSubmissionsForTesting(
diff --git a/content/renderer/render_frame_metadata_observer_impl.h b/content/renderer/render_frame_metadata_observer_impl.h
index 0c888fd..6c4c29d 100644
--- a/content/renderer/render_frame_metadata_observer_impl.h
+++ b/content/renderer/render_frame_metadata_observer_impl.h
@@ -32,8 +32,7 @@
 
   // cc::RenderFrameMetadataObserver:
   void BindToCurrentThread() override;
-  void OnRenderFrameSubmission(
-      const cc::RenderFrameMetadata& metadata) override;
+  void OnRenderFrameSubmission(cc::RenderFrameMetadata metadata) override;
 
   // mojom::RenderFrameMetadataObserver:
   void ReportAllFrameSubmissionsForTesting(bool enabled) override;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 81d3f80..0657a428 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -806,8 +806,8 @@
           shared_bitmap_allocation_notifier_ptr.PassInterface(),
           GetChannel()->ipc_task_runner_refptr()));
 
-  notification_dispatcher_ =
-      new NotificationDispatcher(thread_safe_sender());
+  notification_dispatcher_ = new NotificationDispatcher(
+      thread_safe_sender(), GetRendererScheduler()->IPCTaskRunner());
   AddFilter(notification_dispatcher_->GetFilter());
 
   resource_dispatcher_.reset(new ResourceDispatcher());
@@ -894,7 +894,9 @@
   midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner());
   AddFilter(midi_message_filter_.get());
 
-  AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter());
+  AddFilter((new CacheStorageMessageFilter(
+                 thread_safe_sender(), GetRendererScheduler()->IPCTaskRunner()))
+                ->GetFilter());
 
 #if defined(USE_AURA)
   if (features::IsMusEnabled())
@@ -1391,8 +1393,8 @@
     isolate->IsolateInBackgroundNotification();
   }
 
-  service_worker_message_filter_ =
-      new ServiceWorkerMessageFilter(thread_safe_sender());
+  service_worker_message_filter_ = new ServiceWorkerMessageFilter(
+      thread_safe_sender(), GetRendererScheduler()->IPCTaskRunner());
   AddFilter(service_worker_message_filter_->GetFilter());
 
   renderer_scheduler_->SetStoppingWhenBackgroundedEnabled(
diff --git a/content/renderer/service_worker/embedded_worker_instance_client_impl.cc b/content/renderer/service_worker/embedded_worker_instance_client_impl.cc
index f47464c..69c1df6 100644
--- a/content/renderer/service_worker/embedded_worker_instance_client_impl.cc
+++ b/content/renderer/service_worker/embedded_worker_instance_client_impl.cc
@@ -10,7 +10,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "content/child/scoped_child_process_reference.h"
 #include "content/child/thread_safe_sender.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_utils.h"
 #include "content/public/common/content_client.h"
 #include "content/renderer/service_worker/service_worker_context_client.h"
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index c50636b..f2d9aa4 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -19,7 +19,6 @@
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
 #include "content/child/thread_safe_sender.h"
-#include "content/common/service_worker/embedded_worker_messages.h"
 #include "content/common/service_worker/service_worker_event_dispatcher.mojom.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_status_code.h"
@@ -997,9 +996,9 @@
                      std::move(embedded_worker_client_)));
 }
 
-void ServiceWorkerContextClient::CountFeature(uint32_t feature) {
-  Send(new EmbeddedWorkerHostMsg_CountFeature(service_worker_version_id_,
-                                              feature));
+void ServiceWorkerContextClient::CountFeature(
+    blink::mojom::WebFeature feature) {
+  (*instance_host_)->CountFeature(feature);
 }
 
 void ServiceWorkerContextClient::ReportException(
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 46de26a..86e0bd0 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -137,7 +137,7 @@
   void DidInitializeWorkerContext(v8::Local<v8::Context> context) override;
   void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
   void WorkerContextDestroyed() override;
-  void CountFeature(uint32_t feature) override;
+  void CountFeature(blink::mojom::WebFeature feature) override;
   void ReportException(const blink::WebString& error_message,
                        int line_number,
                        int column_number,
diff --git a/content/renderer/service_worker/service_worker_message_filter.cc b/content/renderer/service_worker/service_worker_message_filter.cc
index 97c828c..1df154a 100644
--- a/content/renderer/service_worker/service_worker_message_filter.cc
+++ b/content/renderer/service_worker/service_worker_message_filter.cc
@@ -12,9 +12,10 @@
 
 namespace content {
 
-ServiceWorkerMessageFilter::ServiceWorkerMessageFilter(ThreadSafeSender* sender)
-    : WorkerThreadMessageFilter(sender) {
-}
+ServiceWorkerMessageFilter::ServiceWorkerMessageFilter(
+    ThreadSafeSender* sender,
+    scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
+    : WorkerThreadMessageFilter(sender, std::move(main_thread_task_runner)) {}
 
 ServiceWorkerMessageFilter::~ServiceWorkerMessageFilter() {}
 
diff --git a/content/renderer/service_worker/service_worker_message_filter.h b/content/renderer/service_worker/service_worker_message_filter.h
index fcad144..6b89375 100644
--- a/content/renderer/service_worker/service_worker_message_filter.h
+++ b/content/renderer/service_worker/service_worker_message_filter.h
@@ -14,7 +14,9 @@
 class CONTENT_EXPORT ServiceWorkerMessageFilter
     : public WorkerThreadMessageFilter {
  public:
-  explicit ServiceWorkerMessageFilter(ThreadSafeSender* thread_safe_sender);
+  ServiceWorkerMessageFilter(
+      ThreadSafeSender* thread_safe_sender,
+      scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);
 
  protected:
   ~ServiceWorkerMessageFilter() override;
diff --git a/content/renderer/worker_thread_message_filter.cc b/content/renderer/worker_thread_message_filter.cc
index 81b24c2..081764d 100644
--- a/content/renderer/worker_thread_message_filter.cc
+++ b/content/renderer/worker_thread_message_filter.cc
@@ -12,10 +12,10 @@
 namespace content {
 
 WorkerThreadMessageFilter::WorkerThreadMessageFilter(
-    ThreadSafeSender* thread_safe_sender)
-    : main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
-      thread_safe_sender_(thread_safe_sender) {
-}
+    ThreadSafeSender* thread_safe_sender,
+    scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
+    : main_thread_task_runner_(std::move(main_thread_task_runner)),
+      thread_safe_sender_(thread_safe_sender) {}
 
 WorkerThreadMessageFilter::~WorkerThreadMessageFilter() {
 }
diff --git a/content/renderer/worker_thread_message_filter.h b/content/renderer/worker_thread_message_filter.h
index d08b47d..64c0d47 100644
--- a/content/renderer/worker_thread_message_filter.h
+++ b/content/renderer/worker_thread_message_filter.h
@@ -19,7 +19,9 @@
 // A base class for filtering IPC messages targeted for worker threads.
 class WorkerThreadMessageFilter : public ChildMessageFilter {
  public:
-  explicit WorkerThreadMessageFilter(ThreadSafeSender* thread_safe_sender);
+  WorkerThreadMessageFilter(
+      ThreadSafeSender* thread_safe_sender,
+      scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);
 
  protected:
   ~WorkerThreadMessageFilter() override;
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index 0210bf7..baa6a70 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -140,7 +140,7 @@
     builder.set_net_log(net_log_);
     builder.set_network_delegate(CreateNetworkDelegate());
     std::unique_ptr<net::CookieStore> cookie_store =
-        CreateCookieStore(CookieStoreConfig(), net_log_);
+        CreateCookieStore(CookieStoreConfig());
     std::unique_ptr<net::ChannelIDService> channel_id_service =
         std::make_unique<net::ChannelIDService>(
             new net::DefaultChannelIDStore(nullptr));
diff --git a/content/test/gpu/gpu_tests/pixel_expectations.py b/content/test/gpu/gpu_tests/pixel_expectations.py
index 46415673..44d6fe1 100644
--- a/content/test/gpu/gpu_tests/pixel_expectations.py
+++ b/content/test/gpu/gpu_tests/pixel_expectations.py
@@ -136,36 +136,3 @@
                bug=809868)
     self.Flaky('Pixel_CanvasDisplayLinearRGBUnaccelerated2DGPUCompositing',
                ['android'], bug=810006)
-
-    self.Fail('Pixel_CSSFilterEffects', ['mac'], bug=815045)
-    self.Fail('Pixel_CSSFilterEffects_NoOverlays', ['mac'], bug=815045)
-
-    # TODO(kainino): temporary suppressions for perf experiment
-    self.Fail('Pixel_2DCanvasWebGL',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_IOSurface2DCanvasWebGL',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasTransferAfterStyleResize',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasTransferBeforeStyleResize',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasWebGLDefault',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasWebGLDefaultWorker',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasWebGLSoftwareCompositing',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasWebGLSoftwareCompositingWorker',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_OffscreenCanvasWebglResizeOnWorker',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_WebGLGreenTriangle_AA_Alpha',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_WebGLGreenTriangle_AA_Alpha_SwiftShader',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_WebGLGreenTriangle_AA_NoAlpha',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_WebGLGreenTriangle_NonChromiumImage_AA_Alpha',
-        ['mac', 'intel'], bug=815154)
-    self.Fail('Pixel_WebGLGreenTriangle_NonChromiumImage_AA_NoAlpha',
-        ['mac', 'intel'], bug=815154)
diff --git a/content/test/mock_render_widget_host_delegate.cc b/content/test/mock_render_widget_host_delegate.cc
index 98351b2..5c2ab31 100644
--- a/content/test/mock_render_widget_host_delegate.cc
+++ b/content/test/mock_render_widget_host_delegate.cc
@@ -17,11 +17,7 @@
 void MockRenderWidgetHostDelegate::ResizeDueToAutoResize(
     RenderWidgetHostImpl* render_widget_host,
     const gfx::Size& new_size,
-    uint64_t sequence_number) {
-  RenderWidgetHostViewBase* rwhv = rwh_->GetView();
-  if (rwhv)
-    rwhv->ResizeDueToAutoResize(new_size, sequence_number);
-}
+    uint64_t sequence_number) {}
 
 KeyboardEventProcessingResult
 MockRenderWidgetHostDelegate::PreHandleKeyboardEvent(
diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc
index 85f417f..9c432bf 100644
--- a/content/test/test_render_frame.cc
+++ b/content/test/test_render_frame.cc
@@ -155,7 +155,7 @@
                    request_params,
                    network::mojom::URLLoaderClientEndpointsPtr(),
                    std::make_unique<URLLoaderFactoryBundleInfo>(),
-                   mojom::ControllerServiceWorkerInfoPtr(),
+                   base::nullopt, mojom::ControllerServiceWorkerInfoPtr(),
                    base::UnguessableToken::Create());
 }
 
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 0d72747b..23db12f 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -65,6 +65,8 @@
       const RequestNavigationParams& request_params,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories,
+      base::Optional<std::vector<mojom::TransferrableURLLoaderPtr>>
+          subresource_overrides,
       mojom::ControllerServiceWorkerInfoPtr controller_service_worker,
       const base::UnguessableToken& devtools_navigation_token) override {
     frame_host_->GetProcess()->set_did_frame_commit_navigation(true);
@@ -72,7 +74,8 @@
         head, body_url, common_params, request_params,
         std::move(url_loader_client_endpoints),
         std::move(subresource_loader_factories),
-        std::move(controller_service_worker), devtools_navigation_token);
+        std::move(subresource_overrides), std::move(controller_service_worker),
+        devtools_navigation_token);
   }
 
   void CommitSameDocumentNavigation(
diff --git a/docs/jumbo.md b/docs/jumbo.md
index 6832d741..e9fed8d3 100644
--- a/docs/jumbo.md
+++ b/docs/jumbo.md
@@ -51,10 +51,10 @@
 
 ## Tuning
 
-By default at most `200` files are merged at a time. The more files
-are merged, the less total CPU time is needed, but parallelism is
-reduced. This can be changed by setting `jumbo_file_merge_limit` to
-something else than `200`.
+By default at most `50`, or `8` when using goma, files are merged at a
+time. The more files that are are merged, the less total CPU time is
+needed, but parallelism is reduced. This number can be changed by
+setting `jumbo_file_merge_limit`.
 
 ## Naming
 
diff --git a/docs/memory-infra/README.md b/docs/memory-infra/README.md
index eb3252b..e0aa5758 100644
--- a/docs/memory-infra/README.md
+++ b/docs/memory-infra/README.md
@@ -7,48 +7,38 @@
 
 [TOC]
 
-## Getting Started
+## Taking a memory-infra trace
 
- 1. Get a bleeding-edge or tip-of-tree build of Chrome.
-
- 2. [Record a trace as usual][record-trace]: open [chrome://tracing][tracing]
+ 1. [Record a trace as usual][record-trace]: open [chrome://tracing][tracing]
     on Desktop Chrome or [chrome://inspect?tracing][inspect-tracing] to trace
     Chrome for Android.
 
- 3. Make sure to enable the **memory-infra** category on the right.
+ 2. Make sure to enable the **memory-infra** category on the right.
 
       ![Tick the memory-infra checkbox when recording a trace.][memory-infra-box]
 
- 4. For now, some subsystems only work if Chrome is started with the
-    `--no-sandbox` flag. 
-    <!-- TODO(primiano) TODO(ssid): https://crbug.com/461788 -->
 
 [record-trace]:     https://sites.google.com/a/chromium.org/dev/developers/how-tos/trace-event-profiling-tool/recording-tracing-runs
 [tracing]:          chrome://tracing
 [inspect-tracing]:  chrome://inspect?tracing
 [memory-infra-box]: https://storage.googleapis.com/chromium-docs.appspot.com/1c6d1886584e7cc6ffed0d377f32023f8da53e02
 
+## Navigating a memory-infra trace
+
 ![Timeline View and Analysis View][tracing-views]
 
-After recording a trace, you will see the **timeline view**. Timeline view
-shows:
-
- * Total resident memory grouped by process (at the top).
- * Total resident memory grouped by subsystem (at the top).
- * Allocated memory per subsystem for every process.
-
-Click one of the ![M][m-blue] dots to bring up the **analysis view**. Click
-on a cell in analysis view to reveal more information about its subsystem.
-PartitionAlloc for instance, has more details about its partitions.
+After recording a trace, you will see the **timeline view**. The **timeline
+view** is primarily used for other tracing features. Click one of the
+![M][m-purple] dots to bring up the **analysis view**. Click on a cell in
+analysis view to reveal more information about its subsystem. PartitionAlloc for
+instance, has more details about its partitions.
 
 ![Component details for PartitionAlloc][partalloc-details]
 
-The purple ![M][m-purple] dots represent heavy dumps. In these dumps, components
-can provide more details than in the regular dumps. The full details of the
-MemoryInfra UI are explained in its [design doc][mi-ui-doc].
+The full details of the MemoryInfra UI are explained in its [design
+doc][mi-ui-doc].
 
 [tracing-views]:     https://storage.googleapis.com/chromium-docs.appspot.com/db12015bd262385f0f8bd69133330978a99da1ca
-[m-blue]:            https://storage.googleapis.com/chromium-docs.appspot.com/b60f342e38ff3a3767bbe4c8640d96a2d8bc864b
 [partalloc-details]: https://storage.googleapis.com/chromium-docs.appspot.com/02eade61d57c83f8ef8227965513456555fc3324
 [m-purple]:          https://storage.googleapis.com/chromium-docs.appspot.com/d7bdf4d16204c293688be2e5a0bcb2bf463dbbc3
 [mi-ui-doc]:         https://docs.google.com/document/d/1b5BSBEd1oB-3zj_CBAQWiQZ0cmI0HmjmXG-5iNveLqw/edit
diff --git a/docs/memory/README.md b/docs/memory/README.md
index 1f378f7..e8ee0c856 100644
--- a/docs/memory/README.md
+++ b/docs/memory/README.md
@@ -39,17 +39,11 @@
 Follow [these instructions](/docs/memory/filing_memory_bugs.md) to file a high
 quality bug.
 
-## I have a reproducible memory problem, what do I do?
+## I'm a developer trying to investigate a memory issues, what do I do?
 
-Yay! Please file a [memory
-bug](https://bugs.chromium.org/p/chromium/issues/entry?template=Memory%20usage).
+See [this page](/docs/memory/debugging_memory_issues.md) for further instructions.
 
-If you are willing to do a bit more, please grab a memory infra trace and upload
-that. Here are [instructions for MacOS](https://docs.google.com/document/d/15mBOu_uZbgP5bpdHZJXEnF9csSRq7phUWXnZcteVr0o/edit).
-(TODO: Add instructions for easily grabbing a trace for all platforms.)
-
-
-## I'm a dev and I want to help. How do I get started?
+## I'm a developer looking for more information. How do I get started?
 
 Great! First, sign up for the mailing lists above and check out the slack channel.
 
@@ -60,7 +54,6 @@
 | [Key Concepts in Chrome Memory](/docs/memory/key_concepts.md) | Primer for memory terminology in Chrome. |
 | [memory-infra](/docs/memory-infra/README.md) | The primary tool used for inspecting allocations. |
 
-
 ## What are people actively working on?
 | Project | Description |
 |---------|-------------|
diff --git a/docs/memory/debugging_memory_issues.md b/docs/memory/debugging_memory_issues.md
new file mode 100644
index 0000000..1ebd696
--- /dev/null
+++ b/docs/memory/debugging_memory_issues.md
@@ -0,0 +1,131 @@
+# Debugging Memory Issues
+
+This page is designed to help Chromium developers debug memory issues.
+
+When in doubt, reach out to memory-dev@chromium.org.
+
+[TOC]
+
+## Investigating Reproducible Memory Issues
+
+Let's say that there's a CL or feature that reproducibly increases memory usage
+when it's landed/enabled, given a particular set of repro steps.
+
+* Take a look at [the documentation](/docs/memory/README.md) for both
+  taking and navigating memory-infra traces.
+* Take two memory-infra traces. One with the reproducible memory regression, and
+  one without.
+* Load the memory-infra traces into two tabs.
+* Compare the memory dump providers and look for the one that shows the
+  regression. Follow the relevant link.
+    * [The regression is in the Malloc MemoryDumpProvider.](#Investigating-Reproducible-Memory-Issues)
+    * [The regression is in a non-Malloc
+      MemoryDumpProvider.](#Regression-in-Non-Malloc-MemoryDumpProvider)
+    * [The regression is only observed in **private
+      footprint**.](#Regression-only-in-Private-Footprint)
+    * [No regression is observed.](#No-observed-regression)
+
+### Regression in Malloc MemoryDumpProvider
+
+Repeat the above steps, but this time also [take a heap
+dump](#Taking-a-Heap-Dump). Confirm that the regression is also visible in the
+heap dump, and then compare the two heap dumps to find the difference. You can
+also use
+[diff_heap_profiler.py](https://cs.chromium.org/chromium/src/third_party/catapult/experimental/tracing/bin/diff_heap_profiler.py)
+to perform the diff.
+
+### Regression in Non-Malloc MemoryDumpProvider
+
+Hopefully the MemoryDumpProvider has sufficient information to help diagnose the
+leak. Depending on the whether the leaked object is allocated via malloc or new
+- it usually should be, you can also use the steps for debugging a Malloc
+MemoryDumpProvider regression.
+
+### Regression only in Private Footprint
+
+* Repeat the repro steps, but instead of taking a memory-infra trace, use
+  the following tools to map the process's virtual space:
+    * On macOS, use vmmap
+    * On Windows, use SysInternal VMMap
+    * On other OSes, use /proc/<pid\>/smaps.
+* The results should help diagnose what's happening. Contact the
+  memory-dev@chromium.org mailing list for more help.
+
+### No observed regression
+
+* If there isn't a regression in PrivateMemoryFootprint, then this might become
+  a question of semantics for what constitutes a memory regression. Common
+  problems include:
+    * Shared Memory, which is hard to attribute, but is mostly accounted for in
+      the memory-infra trace.
+    * Binary size, which is currently not accounted for anywhere.
+
+## Investigating Heap Dumps From the Wild
+
+For a small set of Chrome users in the wild, Chrome will record and upload
+anonymized heap dumps. This has the benefit of wider coverage for real code
+paths, at the expense of reproducibility.
+
+These heap dumps can take some time to grok, but frequently yield valuable
+insight. At the time of this writing, heap dumps from the wild have resulted in
+real, high impact bugs being found in Chrome code ~90% of the time.
+
+* The first thing to do upon receiving a heap dump is to open it in the [trace
+  viewer](/docs/memory-infra/README.md). This will tell us the counts, sizes, and
+  allocating stack traces of the potentially leaked objects. Look for stacks
+  that result in >100 MB of live memory. Frequently, sets of objects will be
+  leaked with similar counts. This can provide insight into the nature of the
+  leak.
+    * Important note: Heap profiling in the field uses
+      [poison process sampling](https://bugs.chromium.org/p/chromium/issues/detail?id=810748)
+      with a rate parameter of 10000. This means that for large/frequent allocations
+      [e.g. >100 MB], the noise will be quite small [much less than 1%]. But
+      there is noise so counts will not be exact.
+* The stack trace is almost always sufficient to tell the type of object being
+  leaked as well, since most functions in Chrome have a limited number of calls
+  to new and malloc.
+* The next thing to do is to determine whether the memory usage is intentional.
+  Very rarely, components in Chrome legitimately need to use many 100s of MBs of
+  memory. In this case, it's important to create a
+  [MemoryDumpProvider](https://cs.chromium.org/chromium/src/base/trace_event/memory_dump_provider.h)
+  to report this memory usage, so that we have a better understanding of which
+  components are using a lot of memory. For an example, see
+  [Issue 813046](https://bugs.chromium.org/p/chromium/issues/detail?id=813046).
+* Assuming the memory usage is not intentional, the next thing to do is to
+  figure out what is causing the memory leak.
+    * The most common cause is adding elements to a container with no limit.
+      Usually the code makes assumptions about how frequently it will be called
+      in the wild, and something breaks those assumptions. Or sometimes the code
+      to clear the container is not called as frequently as expected [or at
+      all]. [Example
+      1](https://bugs.chromium.org/p/chromium/issues/detail?id=798012). [Example
+      2](https://bugs.chromium.org/p/chromium/issues/detail?id=804440).
+    * Retain cycles for ref-counted objects.
+      [Example](https://bugs.chromium.org/p/chromium/issues/detail?id=814334#c23)
+    * Straight up leaks resulting from incorrect use of APIs. [Example
+      1](https://bugs.chromium.org/p/chromium/issues/detail?id=801702#c31).
+      [Example
+      2](https://bugs.chromium.org/p/chromium/issues/detail?id=814444#c17).
+
+## Taking a Heap Dump
+
+Navigate to chrome://flags and search for **memlog**. There are several options
+that can be used to configure heap dumps. All of these options are also
+available as command line flags, for automated test runs [e.g. telemetry].
+
+* `#memlog` controls which processes are profiled. It's also possible to
+  manually specify the process via the interface at `chrome://memory-internals`.
+* `#memlog-sampling` will greatly reduce the overhead of the heap profiler, at
+  the expense of inaccuracy in small or infrequent allocations. Unless
+  performance is a concern, leave it disabled.
+* `#memlog-stack-mode` describes the type of metadata recorded for each
+  allocation. `native` stacks provide the most utility. The only time the other
+  options should be considered is for Android official builds, most of which do
+  not support `native` stacks.
+* `#memlog-keep-small-allocations` should be enabled, as it prevents the heap
+  dump exporter from pruning small allocations. Doing so yields smaller traces,
+  which is desirable when heap profiling is enabled in the wild.
+
+Once the flags have been set appropriately, restart Chrome and take a
+memory-infra trace. The results will have a heap dump.
+
diff --git a/docs/memory/key_concepts.md b/docs/memory/key_concepts.md
index 507a94e..3c1bf27 100644
--- a/docs/memory/key_concepts.md
+++ b/docs/memory/key_concepts.md
@@ -89,16 +89,80 @@
 
 ## Terms and definitions
 
-TODO(awong): To through Erik's Consistent Memory Metrics doc and pull out bits
-that reconcile with this.
+Each platform exposes a different memory model. This section describes a
+consistent set of terminology that will be used by this document. This
+terminology is intentionally Linux-biased, since that is the platform most
+readers are expected to be familiar with.
 
-### Commited Memory
-### Discardable memory
-### Proportional Set Size
-### Image memory
-### Shared Memory.
+### Supported platforms
+* Linux
+* Android
+* ChromeOS
+* Windows [kernel: Windows NT]
+* macOS/iOS [kernel: Darwin/XNU/Mach]
 
-TODO(awong): Write overview of our platform diversity, windows vs \*nix memory models (eg,
-"committed" memory), what "discardable" memory is, GPU memory, zram, overcommit,
-the various Chrome heaps (pageheap, partitionalloc, oilpan, v8, malloc...per
-platform), etc.
+### Terminology
+Warning: This terminology is neither complete, nor precise, when compared to the
+terminology used by any specific platform. Any in-depth discussion should occur
+on a per-platform basis, and use terminology specific to that platform.
+
+* **Virtual memory** - A per-process abstraction layer exposed by the kernel. A
+  contiguous region divided into 4kb **virtual pages**.
+* **Physical memory** - A per-machine abstraction layer internal to the kernel.
+  A contiguous region divided into 4kb **physical pages**. Each **physical
+  page** represents 4kb of physical memory.
+* **Resident** - A virtual page whose contents is backed by a physical
+  page.
+* **Swapped/Compressed** - A virtual page whose contents is backed by
+  something other than a physical page.
+* **Swapping/Compression** - [verb] The process of taking Resident pages and
+  making them Swapped/Compressed pages. This frees up physical pages.
+* **Unlocked Discardable/Reusable** - Android [Ashmem] and Darwin specific. A virtual
+  page whose contents is backed by a physical page, but the Kernel is free
+  to reuse the physical page at any point in time.
+* **Private** - A virtual page whose contents will only be modifiable by the
+  current process.
+* **Copy on Write** - A private virtual page owned by the parent process.
+  When either the parent or child process attempts to make a modification, the
+  child is given a private copy of the page.
+* **Shared** - A virtual page whose contents could be shared with other
+  processes.
+* **File-backed** - A virtual page whose contents reflect those of a
+  file.
+* **Anonymous** - A virtual page that is not file-backed.
+
+## Platform Specific Sources of Truth
+Memory is a complex topic, fraught with potential miscommunications. In an
+attempt to forestall disagreement over semantics, these are the sources of truth
+used to determine memory usage for a given process.
+
+* Windows: [SysInternals
+  VMMap](https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap)
+* Darwin:
+  [vmmap](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/vmmap.1.html)
+* Linux/Derivatives:
+  [/proc/<pid\>/smaps](http://man7.org/linux/man-pages/man5/proc.5.html)
+
+## Shared Memory
+
+Accounting for shared memory is poorly defined. If a memory region is mapped
+into multiple processes [possibly multiple times], which ones should it count
+towards?
+
+On Linux, one common solution is to use proportional set size, which counts
+1/Nth of the resident size, where N is the number of other processes that have
+page faulted the region. This has the nice property of being additive across
+processes. The downside is that it is context dependent. e.g. If a user opens
+more tabs, thus causing a system library to be mapped into more processes, the
+PSS for previous tabs will go down.
+
+File backed shared memory regions are typically not interesting to report, since
+they typically represent shared system resources, libraries, and the browser
+binary itself, all of which are outside of the control of developers. This is
+particularly problematic across different versions of the OS, where the set of
+base libraries that get linked by default into a process highly varies, out of
+Chrome's control.
+
+In Chrome, we have implemented ownership tracking for anonymous shared memory
+regions - each shared memory region counts towards exactly one process, which is
+determined by the type and usage of the shared memory region.
diff --git a/docs/webui_explainer.md b/docs/webui_explainer.md
index 1244741..b9bb5a7 100644
--- a/docs/webui_explainer.md
+++ b/docs/webui_explainer.md
@@ -138,7 +138,7 @@
     content::WebUIDataSource::Add(source);
 
     // Handles messages from JavaScript to C++ via chrome.send().
-    web_ui->AddMessageHandler(base::MakeUnique<OvenHandler>());
+    web_ui->AddMessageHandler(std::make_unique<OvenHandler>());
   }
 };
 ```
diff --git a/extensions/browser/api/mime_handler_private/mime_handler_private.cc b/extensions/browser/api/mime_handler_private/mime_handler_private.cc
index b30c8e3..e922b3cc 100644
--- a/extensions/browser/api/mime_handler_private/mime_handler_private.cc
+++ b/extensions/browser/api/mime_handler_private/mime_handler_private.cc
@@ -95,29 +95,28 @@
     extensions::mime_handler::StreamInfoPtr,
     extensions::StreamContainer>::Convert(const extensions::StreamContainer&
                                               stream) {
-  if (!stream.stream_info()->handle)
+  if (stream.stream_url().is_empty())
     return extensions::mime_handler::StreamInfoPtr();
 
   auto result = extensions::mime_handler::StreamInfo::New();
   result->embedded = stream.embedded();
   result->tab_id = stream.tab_id();
-  const content::StreamInfo* info = stream.stream_info();
-  result->mime_type = info->mime_type;
+  result->mime_type = stream.mime_type();
 
   // If the URL is too long, mojo will give up on sending the URL. In these
   // cases truncate it. Only data: URLs should ever really suffer this problem
   // so only worry about those for now.
   // TODO(raymes): This appears to be a bug in mojo somewhere. crbug.com/480099.
-  if (info->original_url.SchemeIs(url::kDataScheme) &&
-      info->original_url.spec().size() > content::kMaxURLDisplayChars) {
-    result->original_url = info->original_url.scheme() + ":";
+  if (stream.original_url().SchemeIs(url::kDataScheme) &&
+      stream.original_url().spec().size() > content::kMaxURLDisplayChars) {
+    result->original_url = stream.original_url().scheme() + ":";
   } else {
-    result->original_url = info->original_url.spec();
+    result->original_url = stream.original_url().spec();
   }
 
-  result->stream_url = info->handle->GetURL().spec();
+  result->stream_url = stream.stream_url().spec();
   result->response_headers =
-      extensions::CreateResponseHeadersMap(info->response_headers.get());
+      extensions::CreateResponseHeadersMap(stream.response_headers());
   return result;
 }
 
diff --git a/extensions/browser/api/mime_handler_private/mime_handler_private_unittest.cc b/extensions/browser/api/mime_handler_private/mime_handler_private_unittest.cc
index 37020f4..9c93c5679 100644
--- a/extensions/browser/api/mime_handler_private/mime_handler_private_unittest.cc
+++ b/extensions/browser/api/mime_handler_private/mime_handler_private_unittest.cc
@@ -47,8 +47,8 @@
     stream_info->handle = base::WrapUnique(new TestStreamHandle);
     stream_info->mime_type = "test/unit";
     stream_info->original_url = GURL("test://extensions_unittests");
-    stream_container_.reset(
-        new StreamContainer(std::move(stream_info), 1, true, GURL(), ""));
+    stream_container_ = std::make_unique<StreamContainer>(
+        std::move(stream_info), 1, true, GURL(), "", nullptr, GURL());
     service_binding_ =
         mojo::MakeStrongBinding(std::make_unique<MimeHandlerServiceImpl>(
                                     stream_container_->GetWeakPtr()),
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 6f2b56d0..6b08ad6 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -8,6 +8,7 @@
 
 #include "components/guest_view/common/guest_view_constants.h"
 #include "content/public/browser/host_zoom_map.h"
+#include "content/public/browser/navigation_handle.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
@@ -33,18 +34,29 @@
 
 namespace extensions {
 
-StreamContainer::StreamContainer(std::unique_ptr<content::StreamInfo> stream,
-                                 int tab_id,
-                                 bool embedded,
-                                 const GURL& handler_url,
-                                 const std::string& extension_id)
+StreamContainer::StreamContainer(
+    std::unique_ptr<content::StreamInfo> stream,
+    int tab_id,
+    bool embedded,
+    const GURL& handler_url,
+    const std::string& extension_id,
+    content::mojom::TransferrableURLLoaderPtr transferrable_loader,
+    const GURL& original_url)
     : stream_(std::move(stream)),
       embedded_(embedded),
       tab_id_(tab_id),
       handler_url_(handler_url),
       extension_id_(extension_id),
+      transferrable_loader_(std::move(transferrable_loader)),
+      mime_type_(stream_ ? stream_->mime_type
+                         : transferrable_loader_->head.mime_type),
+      original_url_(stream_ ? stream_->original_url : original_url),
+      stream_url_(stream_ ? stream_->handle->GetURL()
+                          : transferrable_loader_->url),
+      response_headers_(stream_ ? stream_->response_headers
+                                : transferrable_loader_->head.headers),
       weak_factory_(this) {
-  DCHECK(stream_);
+  DCHECK(stream_ || transferrable_loader_);
 }
 
 StreamContainer::~StreamContainer() {
@@ -57,12 +69,18 @@
   }
   stream_->handle->AddCloseListener(callback);
   stream_->handle.reset();
+  stream_url_ = GURL();
 }
 
 base::WeakPtr<StreamContainer> StreamContainer::GetWeakPtr() {
   return weak_factory_.GetWeakPtr();
 }
 
+content::mojom::TransferrableURLLoaderPtr
+StreamContainer::TakeTransferrableURLLoader() {
+  return std::move(transferrable_loader_);
+}
+
 // static
 const char MimeHandlerViewGuest::Type[] = "mimehandler";
 
@@ -152,7 +170,7 @@
           .GetByID(stream_->extension_id());
   if (!mime_handler_extension) {
     LOG(ERROR) << "Extension for mime_type not found, mime_type = "
-               << stream_->stream_info()->mime_type;
+               << stream_->mime_type();
     callback.Run(nullptr);
     return;
   }
@@ -267,8 +285,7 @@
   if (!attached())
     return false;
 
-  embedder_web_contents()->SaveFrame(stream_->stream_info()->original_url,
-                                     referrer);
+  embedder_web_contents()->SaveFrame(stream_->original_url(), referrer);
   return true;
 }
 
@@ -300,4 +317,10 @@
   registry_.TryBindInterface(interface_name, interface_pipe);
 }
 
+void MimeHandlerViewGuest::ReadyToCommitNavigation(
+    content::NavigationHandle* navigation_handle) {
+  navigation_handle->RegisterSubresourceOverride(
+      stream_->TakeTransferrableURLLoader());
+}
+
 }  // namespace extensions
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index df25eca4..d01e2d1 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -11,6 +11,7 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "components/guest_view/browser/guest_view.h"
+#include "content/public/common/transferrable_url_loader.mojom.h"
 #include "services/service_manager/public/cpp/binder_registry.h"
 
 namespace content {
@@ -26,11 +27,14 @@
 // MimeHandler to handle a resource stream.
 class StreamContainer {
  public:
-  StreamContainer(std::unique_ptr<content::StreamInfo> stream,
-                  int tab_id,
-                  bool embedded,
-                  const GURL& handler_url,
-                  const std::string& extension_id);
+  StreamContainer(
+      std::unique_ptr<content::StreamInfo> stream,
+      int tab_id,
+      bool embedded,
+      const GURL& handler_url,
+      const std::string& extension_id,
+      content::mojom::TransferrableURLLoaderPtr transferrable_loader,
+      const GURL& original_url);
   ~StreamContainer();
 
   // Aborts the stream.
@@ -38,18 +42,32 @@
 
   base::WeakPtr<StreamContainer> GetWeakPtr();
 
-  const content::StreamInfo* stream_info() const { return stream_.get(); }
+  content::mojom::TransferrableURLLoaderPtr TakeTransferrableURLLoader();
+
   bool embedded() const { return embedded_; }
   int tab_id() const { return tab_id_; }
   GURL handler_url() const { return handler_url_; }
   std::string extension_id() const { return extension_id_; }
 
+  const std::string& mime_type() const { return mime_type_; }
+  const GURL& original_url() const { return original_url_; }
+  const GURL& stream_url() const { return stream_url_; }
+  net::HttpResponseHeaders* response_headers() const {
+    return response_headers_.get();
+  }
+
  private:
   const std::unique_ptr<content::StreamInfo> stream_;
   const bool embedded_;
   const int tab_id_;
   const GURL handler_url_;
   const std::string extension_id_;
+  content::mojom::TransferrableURLLoaderPtr transferrable_loader_;
+
+  std::string mime_type_;
+  GURL original_url_;
+  GURL stream_url_;
+  scoped_refptr<net::HttpResponseHeaders> response_headers_;
 
   base::WeakPtrFactory<StreamContainer> weak_factory_;
 
@@ -109,6 +127,8 @@
       content::RenderFrameHost* render_frame_host,
       const std::string& interface_name,
       mojo::ScopedMessagePipeHandle* interface_pipe) final;
+  void ReadyToCommitNavigation(
+      content::NavigationHandle* navigation_handle) final;
 
   std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_;
   std::unique_ptr<StreamContainer> stream_;
diff --git a/extensions/browser/updater/update_service.cc b/extensions/browser/updater/update_service.cc
index 1c0d5cf12..bb46917 100644
--- a/extensions/browser/updater/update_service.cc
+++ b/extensions/browser/updater/update_service.cc
@@ -5,6 +5,7 @@
 #include "extensions/browser/updater/update_service.h"
 
 #include <map>
+#include <utility>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
@@ -133,6 +134,7 @@
       extension_ids,
       base::BindOnce(&UpdateDataProvider::GetData, update_data_provider_,
                      std::move(update_data)),
+      false,
       base::BindOnce(&UpdateService::UpdateCheckComplete,
                      weak_ptr_factory_.GetWeakPtr(), extension_ids));
 }
diff --git a/extensions/browser/updater/update_service_unittest.cc b/extensions/browser/updater/update_service_unittest.cc
index a03daff..78c248b 100644
--- a/extensions/browser/updater/update_service_unittest.cc
+++ b/extensions/browser/updater/update_service_unittest.cc
@@ -59,6 +59,7 @@
                update_client::Callback callback) override {}
   void Update(const std::vector<std::string>& ids,
               CrxDataCallback crx_data_callback,
+              bool is_foreground,
               update_client::Callback callback) override;
   bool GetCrxUpdateState(
       const std::string& id,
@@ -89,6 +90,7 @@
 
 void FakeUpdateClient::Update(const std::vector<std::string>& ids,
                               CrxDataCallback crx_data_callback,
+                              bool is_foreground,
                               update_client::Callback callback) {
   std::move(crx_data_callback).Run(ids, &data_);
   std::move(callback).Run(update_client::Error::NONE);
diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn
index 383839d..28a17d9 100644
--- a/gpu/command_buffer/client/BUILD.gn
+++ b/gpu/command_buffer/client/BUILD.gn
@@ -162,6 +162,7 @@
   deps = [
     "//base",
     "//components/viz/common:resource_format",
+    "//ui/gfx:buffer_types",
   ]
 }
 
diff --git a/gpu/command_buffer/client/raster_implementation.cc b/gpu/command_buffer/client/raster_implementation.cc
index 92be4cad..ced4cbf 100644
--- a/gpu/command_buffer/client/raster_implementation.cc
+++ b/gpu/command_buffer/client/raster_implementation.cc
@@ -905,78 +905,21 @@
 // instead of having to edit some template or the code generator.
 #include "gpu/command_buffer/client/raster_implementation_impl_autogen.h"
 
-void RasterImplementation::GenTextures(GLsizei n, GLuint* textures) {
-  GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenTextures(" << n << ", "
-                     << static_cast<const void*>(textures) << ")");
-  if (n < 0) {
-    SetGLError(GL_INVALID_VALUE, "glGenTextures", "n < 0");
-    return;
-  }
-  GPU_CLIENT_SINGLE_THREAD_CHECK();
-  for (int ii = 0; ii < n; ++ii) {
-    textures[ii] = texture_id_allocator_.AllocateID();
-  }
-  // TODO(backer): Send some signal to service side.
-  // helper_->GenTexturesImmediate(n, textures);
-  // if (share_group_->bind_generates_resource())
-  //   helper_->CommandBufferHelper::Flush();
-
-  GPU_CLIENT_LOG_CODE_BLOCK({
-    for (GLsizei i = 0; i < n; ++i) {
-      GPU_CLIENT_LOG("  " << i << ": " << textures[i]);
-    }
-  });
-  CheckGLError();
-}
-
-void RasterImplementation::BindTexture(GLenum target, GLuint texture) {
-  GPU_CLIENT_SINGLE_THREAD_CHECK();
-  GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTexture("
-                     << GLES2Util::GetStringEnum(texture) << ")");
-  DCHECK_EQ(target, static_cast<GLenum>(GL_TEXTURE_2D));
-  if (target != GL_TEXTURE_2D) {
-    return;
-  }
-  TextureUnit& unit = texture_units_[active_texture_unit_];
-  unit.bound_texture_2d = texture;
-  // TODO(backer): Update bound texture on the server side.
-  // helper_->BindTexture(target, texture);
-  texture_id_allocator_.MarkAsUsed(texture);
-}
-
-void RasterImplementation::ActiveTexture(GLenum texture) {
-  GPU_CLIENT_SINGLE_THREAD_CHECK();
-  GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glActiveTexture("
-                     << GLES2Util::GetStringEnum(texture) << ")");
-  GLuint texture_index = texture - GL_TEXTURE0;
-  if (texture_index >=
-      static_cast<GLuint>(capabilities_.max_combined_texture_image_units)) {
-    SetGLErrorInvalidEnum("glActiveTexture", texture, "texture");
-    return;
-  }
-
-  active_texture_unit_ = texture_index;
-  // TODO(backer): Update active texture on the server side.
-  // helper_->ActiveTexture(texture);
-  CheckGLError();
-}
-
-void RasterImplementation::GenerateMipmap(GLenum target) {
+void RasterImplementation::SetColorSpaceMetadata(GLuint texture_id,
+                                                 GLColorSpace color_space) {
   NOTIMPLEMENTED();
 }
-void RasterImplementation::SetColorSpaceMetadataCHROMIUM(
-    GLuint texture_id,
-    GLColorSpace color_space) {
+void RasterImplementation::GenMailbox(GLbyte* mailbox) {
   NOTIMPLEMENTED();
 }
-void RasterImplementation::GenMailboxCHROMIUM(GLbyte* mailbox) {
+void RasterImplementation::ProduceTextureDirect(GLuint texture,
+                                                const GLbyte* mailbox) {
   NOTIMPLEMENTED();
 }
-void RasterImplementation::ProduceTextureDirectCHROMIUM(GLuint texture,
-                                                        const GLbyte* mailbox) {
-  NOTIMPLEMENTED();
-}
-GLuint RasterImplementation::CreateAndConsumeTextureCHROMIUM(
+GLuint RasterImplementation::CreateAndConsumeTexture(
+    bool use_buffer,
+    gfx::BufferUsage buffer_usage,
+    viz::ResourceFormat format,
     const GLbyte* mailbox) {
   NOTIMPLEMENTED();
   return 0;
@@ -989,60 +932,28 @@
                                                      GLint imageId) {
   NOTIMPLEMENTED();
 }
-void RasterImplementation::TexImage2D(GLenum target,
-                                      GLint level,
-                                      GLint internalformat,
-                                      GLsizei width,
-                                      GLsizei height,
-                                      GLint border,
-                                      GLenum format,
-                                      GLenum type,
-                                      const void* pixels) {
+
+GLuint RasterImplementation::CreateTexture(bool use_buffer,
+                                           gfx::BufferUsage buffer_usage,
+                                           viz::ResourceFormat format) {
+  NOTIMPLEMENTED();
+  return 0;
+}
+
+void RasterImplementation::TexStorage2D(GLuint texture_id,
+                                        GLint levels,
+                                        GLsizei width,
+                                        GLsizei height) {
   NOTIMPLEMENTED();
 }
-void RasterImplementation::TexSubImage2D(GLenum target,
-                                         GLint level,
-                                         GLint xoffset,
-                                         GLint yoffset,
-                                         GLsizei width,
-                                         GLsizei height,
-                                         GLenum format,
-                                         GLenum type,
-                                         const void* pixels) {
-  NOTIMPLEMENTED();
-}
-void RasterImplementation::CompressedTexImage2D(GLenum target,
-                                                GLint level,
-                                                GLenum internalformat,
-                                                GLsizei width,
-                                                GLsizei height,
-                                                GLint border,
-                                                GLsizei imageSize,
-                                                const void* data) {
-  NOTIMPLEMENTED();
-}
-void RasterImplementation::TexStorageForRaster(GLenum target,
-                                               viz::ResourceFormat format,
-                                               GLsizei width,
-                                               GLsizei height,
-                                               RasterTexStorageFlags flags) {
-  NOTIMPLEMENTED();
-}
-void RasterImplementation::CopySubTextureCHROMIUM(
-    GLuint source_id,
-    GLint source_level,
-    GLenum dest_target,
-    GLuint dest_id,
-    GLint dest_level,
-    GLint xoffset,
-    GLint yoffset,
-    GLint x,
-    GLint y,
-    GLsizei width,
-    GLsizei height,
-    GLboolean unpack_flip_y,
-    GLboolean unpack_premultiply_alpha,
-    GLboolean unpack_unmultiply_alpha) {
+void RasterImplementation::CopySubTexture(GLuint source_id,
+                                          GLuint dest_id,
+                                          GLint xoffset,
+                                          GLint yoffset,
+                                          GLint x,
+                                          GLint y,
+                                          GLsizei width,
+                                          GLsizei height) {
   NOTIMPLEMENTED();
 }
 void RasterImplementation::BeginRasterCHROMIUM(
diff --git a/gpu/command_buffer/client/raster_implementation.h b/gpu/command_buffer/client/raster_implementation.h
index f01843f..26342ca 100644
--- a/gpu/command_buffer/client/raster_implementation.h
+++ b/gpu/command_buffer/client/raster_implementation.h
@@ -99,63 +99,39 @@
 #include "gpu/command_buffer/client/raster_implementation_autogen.h"
 
   // RasterInterface implementation.
-  void GenTextures(GLsizei n, GLuint* textures) override;
-  void BindTexture(GLenum target, GLuint texture) override;
-  void ActiveTexture(GLenum texture) override;
-  void GenerateMipmap(GLenum target) override;
-  void SetColorSpaceMetadataCHROMIUM(GLuint texture_id,
-                                     GLColorSpace color_space) override;
-  void GenMailboxCHROMIUM(GLbyte* mailbox) override;
-  void ProduceTextureDirectCHROMIUM(GLuint texture,
-                                    const GLbyte* mailbox) override;
-  GLuint CreateAndConsumeTextureCHROMIUM(const GLbyte* mailbox) override;
-  void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-  void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-  void TexImage2D(GLenum target,
-                  GLint level,
-                  GLint internalformat,
-                  GLsizei width,
-                  GLsizei height,
-                  GLint border,
-                  GLenum format,
-                  GLenum type,
-                  const void* pixels) override;
-  void TexSubImage2D(GLenum target,
-                     GLint level,
-                     GLint xoffset,
-                     GLint yoffset,
-                     GLsizei width,
-                     GLsizei height,
-                     GLenum format,
-                     GLenum type,
-                     const void* pixels) override;
-  void CompressedTexImage2D(GLenum target,
-                            GLint level,
-                            GLenum internalformat,
-                            GLsizei width,
-                            GLsizei height,
-                            GLint border,
-                            GLsizei imageSize,
-                            const void* data) override;
-  void TexStorageForRaster(GLenum target,
-                           viz::ResourceFormat format,
-                           GLsizei width,
-                           GLsizei height,
-                           RasterTexStorageFlags flags) override;
-  void CopySubTextureCHROMIUM(GLuint source_id,
-                              GLint source_level,
-                              GLenum dest_target,
-                              GLuint dest_id,
-                              GLint dest_level,
-                              GLint xoffset,
-                              GLint yoffset,
-                              GLint x,
-                              GLint y,
-                              GLsizei width,
-                              GLsizei height,
-                              GLboolean unpack_flip_y,
-                              GLboolean unpack_premultiply_alpha,
-                              GLboolean unpack_unmultiply_alpha) override;
+  // Texture objects.
+  GLuint CreateTexture(bool use_buffer,
+                       gfx::BufferUsage buffer_usage,
+                       viz::ResourceFormat format) override;
+  void SetColorSpaceMetadata(GLuint texture_id,
+                             GLColorSpace color_space) override;
+
+  // Mailboxes.
+  void GenMailbox(GLbyte* mailbox) override;
+  void ProduceTextureDirect(GLuint texture, const GLbyte* mailbox) override;
+  GLuint CreateAndConsumeTexture(bool use_buffer,
+                                 gfx::BufferUsage buffer_usage,
+                                 viz::ResourceFormat format,
+                                 const GLbyte* mailbox) override;
+
+  // Image objects.
+  void BindTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) override;
+  void ReleaseTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) override;
+
+  // Texture allocation and copying.
+  void TexStorage2D(GLuint texture_id,
+                    GLint levels,
+                    GLsizei width,
+                    GLsizei height) override;
+  void CopySubTexture(GLuint source_id,
+                      GLuint dest_id,
+                      GLint xoffset,
+                      GLint yoffset,
+                      GLint x,
+                      GLint y,
+                      GLsizei width,
+                      GLsizei height) override;
+
   void BeginRasterCHROMIUM(
       GLuint texture_id,
       GLuint sk_color,
diff --git a/gpu/command_buffer/client/raster_implementation_gles.cc b/gpu/command_buffer/client/raster_implementation_gles.cc
index e27042aa..90f4e81c 100644
--- a/gpu/command_buffer/client/raster_implementation_gles.cc
+++ b/gpu/command_buffer/client/raster_implementation_gles.cc
@@ -16,6 +16,7 @@
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "gpu/command_buffer/common/capabilities.h"
+#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
 #include "ui/gfx/geometry/rect_conversions.h"
 #include "ui/gfx/skia_util.h"
 
@@ -127,12 +128,48 @@
 
 }  // anonymous namespace
 
+static GLenum GetImageTextureTarget(const gpu::Capabilities& caps,
+                                    gfx::BufferUsage usage,
+                                    viz::ResourceFormat format) {
+  gfx::BufferFormat buffer_format = viz::BufferFormat(format);
+  return GetBufferTextureTarget(usage, buffer_format, caps);
+}
+
+RasterImplementationGLES::Texture::Texture(GLuint id,
+                                           GLenum target,
+                                           bool use_buffer,
+                                           gfx::BufferUsage buffer_usage,
+                                           viz::ResourceFormat format)
+    : id(id),
+      target(target),
+      use_buffer(use_buffer),
+      buffer_usage(buffer_usage),
+      format(format) {}
+
+RasterImplementationGLES::Texture* RasterImplementationGLES::GetTexture(
+    GLuint texture_id) {
+  auto it = texture_info_.find(texture_id);
+  DCHECK(it != texture_info_.end()) << "Undefined texture id";
+  return &it->second;
+}
+
+RasterImplementationGLES::Texture* RasterImplementationGLES::EnsureTextureBound(
+    RasterImplementationGLES::Texture* texture) {
+  DCHECK(texture);
+  if (bound_texture_ != texture) {
+    bound_texture_ = texture;
+    gl_->BindTexture(texture->target, texture->id);
+  }
+  return texture;
+}
+
 RasterImplementationGLES::RasterImplementationGLES(
     gles2::GLES2Interface* gl,
     ContextSupport* support,
     const gpu::Capabilities& caps)
     : gl_(gl),
       support_(support),
+      caps_(caps),
       use_texture_storage_(caps.texture_storage),
       use_texture_storage_image_(caps.texture_storage_image) {}
 
@@ -212,52 +249,76 @@
   gl_->GetQueryObjectuivEXT(id, pname, params);
 }
 
-void RasterImplementationGLES::GenTextures(GLsizei n, GLuint* textures) {
-  gl_->GenTextures(n, textures);
+GLuint RasterImplementationGLES::CreateTexture(bool use_buffer,
+                                               gfx::BufferUsage buffer_usage,
+                                               viz::ResourceFormat format) {
+  GLuint texture_id = 0;
+  gl_->GenTextures(1, &texture_id);
+  DCHECK(texture_id);
+  GLenum target = use_buffer
+                      ? GetImageTextureTarget(caps_, buffer_usage, format)
+                      : GL_TEXTURE_2D;
+  texture_info_.emplace(std::make_pair(
+      texture_id,
+      Texture(texture_id, target, use_buffer, buffer_usage, format)));
+  return texture_id;
 }
 
 void RasterImplementationGLES::DeleteTextures(GLsizei n,
                                               const GLuint* textures) {
+  DCHECK(n > 0);
+  for (GLsizei i = 0; i < n; i++) {
+    auto texture_iter = texture_info_.find(textures[i]);
+    DCHECK(texture_iter != texture_info_.end());
+
+    if (bound_texture_ == &texture_iter->second)
+      bound_texture_ = nullptr;
+
+    texture_info_.erase(texture_iter);
+  }
+
   gl_->DeleteTextures(n, textures);
 };
 
-void RasterImplementationGLES::BindTexture(GLenum target, GLuint texture) {
-  gl_->BindTexture(target, texture);
-};
-
-void RasterImplementationGLES::ActiveTexture(GLenum texture) {
-  gl_->ActiveTexture(texture);
+void RasterImplementationGLES::SetColorSpaceMetadata(GLuint texture_id,
+                                                     GLColorSpace color_space) {
+  Texture* texture = GetTexture(texture_id);
+  gl_->SetColorSpaceMetadataCHROMIUM(texture->id, color_space);
 }
 
-void RasterImplementationGLES::GenerateMipmap(GLenum target) {
-  gl_->GenerateMipmap(target);
-}
-
-void RasterImplementationGLES::SetColorSpaceMetadataCHROMIUM(
-    GLuint texture_id,
-    GLColorSpace color_space) {
-  gl_->SetColorSpaceMetadataCHROMIUM(texture_id, color_space);
-}
-
-void RasterImplementationGLES::TexParameteri(GLenum target,
+void RasterImplementationGLES::TexParameteri(GLuint texture_id,
                                              GLenum pname,
                                              GLint param) {
-  gl_->TexParameteri(target, pname, param);
+  Texture* texture = EnsureTextureBound(GetTexture(texture_id));
+  gl_->TexParameteri(texture->target, pname, param);
 }
 
-void RasterImplementationGLES::GenMailboxCHROMIUM(GLbyte* mailbox) {
+void RasterImplementationGLES::GenMailbox(GLbyte* mailbox) {
   gl_->GenMailboxCHROMIUM(mailbox);
 }
 
-void RasterImplementationGLES::ProduceTextureDirectCHROMIUM(
-    GLuint texture,
-    const GLbyte* mailbox) {
-  gl_->ProduceTextureDirectCHROMIUM(texture, mailbox);
+void RasterImplementationGLES::ProduceTextureDirect(GLuint texture_id,
+                                                    const GLbyte* mailbox) {
+  Texture* texture = GetTexture(texture_id);
+  gl_->ProduceTextureDirectCHROMIUM(texture->id, mailbox);
 }
 
-GLuint RasterImplementationGLES::CreateAndConsumeTextureCHROMIUM(
+GLuint RasterImplementationGLES::CreateAndConsumeTexture(
+    bool use_buffer,
+    gfx::BufferUsage buffer_usage,
+    viz::ResourceFormat format,
     const GLbyte* mailbox) {
-  return gl_->CreateAndConsumeTextureCHROMIUM(mailbox);
+  GLuint texture_id = gl_->CreateAndConsumeTextureCHROMIUM(mailbox);
+  DCHECK(texture_id);
+
+  GLenum target = use_buffer
+                      ? GetImageTextureTarget(caps_, buffer_usage, format)
+                      : GL_TEXTURE_2D;
+  texture_info_.emplace(std::make_pair(
+      texture_id,
+      Texture(texture_id, target, use_buffer, buffer_usage, format)));
+
+  return texture_id;
 }
 
 GLuint RasterImplementationGLES::CreateImageCHROMIUM(ClientBuffer buffer,
@@ -267,56 +328,69 @@
   return gl_->CreateImageCHROMIUM(buffer, width, height, internalformat);
 }
 
-void RasterImplementationGLES::BindTexImage2DCHROMIUM(GLenum target,
-                                                      GLint imageId) {
-  gl_->BindTexImage2DCHROMIUM(target, imageId);
+void RasterImplementationGLES::BindTexImage2DCHROMIUM(GLuint texture_id,
+                                                      GLint image_id) {
+  Texture* texture = EnsureTextureBound(GetTexture(texture_id));
+  gl_->BindTexImage2DCHROMIUM(texture->target, image_id);
 }
 
-void RasterImplementationGLES::ReleaseTexImage2DCHROMIUM(GLenum target,
-                                                         GLint imageId) {
-  gl_->ReleaseTexImage2DCHROMIUM(target, imageId);
+void RasterImplementationGLES::ReleaseTexImage2DCHROMIUM(GLuint texture_id,
+                                                         GLint image_id) {
+  Texture* texture = EnsureTextureBound(GetTexture(texture_id));
+  gl_->ReleaseTexImage2DCHROMIUM(texture->target, image_id);
 }
 
 void RasterImplementationGLES::DestroyImageCHROMIUM(GLuint image_id) {
   gl_->DestroyImageCHROMIUM(image_id);
 }
 
-void RasterImplementationGLES::TexImage2D(GLenum target,
-                                          GLint level,
-                                          GLint internalformat,
-                                          GLsizei width,
-                                          GLsizei height,
-                                          GLint border,
-                                          GLenum format,
-                                          GLenum type,
-                                          const void* pixels) {
-  gl_->TexImage2D(target, level, internalformat, width, height, border, format,
-                  type, pixels);
+void RasterImplementationGLES::TexStorage2D(GLuint texture_id,
+                                            GLint levels,
+                                            GLsizei width,
+                                            GLsizei height) {
+  Texture* texture = EnsureTextureBound(GetTexture(texture_id));
+
+  if (texture->use_buffer) {
+    DCHECK(use_texture_storage_image_);
+    DCHECK(levels == 1);
+    gl_->TexStorage2DImageCHROMIUM(texture->target,
+                                   viz::TextureStorageFormat(texture->format),
+                                   GL_SCANOUT_CHROMIUM, width, height);
+  } else if (use_texture_storage_) {
+    gl_->TexStorage2DEXT(texture->target, levels,
+                         viz::TextureStorageFormat(texture->format), width,
+                         height);
+  } else {
+    DCHECK(levels == 1);
+    // TODO(vmiura): Support more than one texture level.
+    gl_->TexImage2D(texture->target, 0, viz::GLInternalFormat(texture->format),
+                    width, height, 0, viz::GLDataFormat(texture->format),
+                    viz::GLDataType(texture->format), nullptr);
+  }
 }
 
-void RasterImplementationGLES::TexSubImage2D(GLenum target,
-                                             GLint level,
-                                             GLint xoffset,
-                                             GLint yoffset,
-                                             GLsizei width,
-                                             GLsizei height,
-                                             GLenum format,
-                                             GLenum type,
-                                             const void* pixels) {
-  gl_->TexSubImage2D(target, level, xoffset, yoffset, width, height, format,
-                     type, pixels);
+void RasterImplementationGLES::CopySubTexture(GLuint source_id,
+                                              GLuint dest_id,
+                                              GLint xoffset,
+                                              GLint yoffset,
+                                              GLint x,
+                                              GLint y,
+                                              GLsizei width,
+                                              GLsizei height) {
+  Texture* source = GetTexture(source_id);
+  Texture* dest = GetTexture(dest_id);
+
+  gl_->CopySubTextureCHROMIUM(source->id, 0, dest->target, dest->id, 0, xoffset,
+                              yoffset, x, y, width, height, false, false,
+                              false);
 }
 
-void RasterImplementationGLES::CompressedTexImage2D(GLenum target,
-                                                    GLint level,
-                                                    GLenum internalformat,
-                                                    GLsizei width,
-                                                    GLsizei height,
-                                                    GLint border,
-                                                    GLsizei imageSize,
-                                                    const void* data) {
-  gl_->CompressedTexImage2D(target, level, internalformat, width, height,
-                            border, imageSize, data);
+void RasterImplementationGLES::CompressedCopyTextureCHROMIUM(GLuint source_id,
+                                                             GLuint dest_id) {
+  Texture* source = GetTexture(source_id);
+  Texture* dest = GetTexture(dest_id);
+
+  gl_->CompressedCopyTextureCHROMIUM(source->id, dest->id);
 }
 
 void RasterImplementationGLES::UnpremultiplyAndDitherCopyCHROMIUM(
@@ -326,70 +400,29 @@
     GLint y,
     GLsizei width,
     GLsizei height) {
-  gl_->UnpremultiplyAndDitherCopyCHROMIUM(source_id, dest_id, x, y, width,
+  Texture* source = GetTexture(source_id);
+  Texture* dest = GetTexture(dest_id);
+
+  gl_->UnpremultiplyAndDitherCopyCHROMIUM(source->id, dest->id, x, y, width,
                                           height);
 }
 
-void RasterImplementationGLES::TexStorageForRaster(
-    GLenum target,
-    viz::ResourceFormat format,
-    GLsizei width,
-    GLsizei height,
-    RasterTexStorageFlags flags) {
-  if (flags & kOverlay) {
-    DCHECK(use_texture_storage_image_);
-    gl_->TexStorage2DImageCHROMIUM(target, viz::TextureStorageFormat(format),
-                                   GL_SCANOUT_CHROMIUM, width, height);
-  } else if (use_texture_storage_) {
-    GLint levels = 1;
-    gl_->TexStorage2DEXT(target, levels, viz::TextureStorageFormat(format),
-                         width, height);
-  } else {
-    gl_->TexImage2D(target, 0, viz::GLInternalFormat(format), width, height, 0,
-                    viz::GLDataFormat(format), viz::GLDataType(format),
-                    nullptr);
-  }
-}
-
-void RasterImplementationGLES::CopySubTextureCHROMIUM(
-    GLuint source_id,
-    GLint source_level,
-    GLenum dest_target,
-    GLuint dest_id,
-    GLint dest_level,
-    GLint xoffset,
-    GLint yoffset,
-    GLint x,
-    GLint y,
-    GLsizei width,
-    GLsizei height,
-    GLboolean unpack_flip_y,
-    GLboolean unpack_premultiply_alpha,
-    GLboolean unpack_unmultiply_alpha) {
-  gl_->CopySubTextureCHROMIUM(source_id, source_level, dest_target, dest_id,
-                              dest_level, xoffset, yoffset, x, y, width, height,
-                              unpack_flip_y, unpack_premultiply_alpha,
-                              unpack_unmultiply_alpha);
-}
-
-void RasterImplementationGLES::CompressedCopyTextureCHROMIUM(GLuint source_id,
-                                                             GLuint dest_id) {
-  gl_->CompressedCopyTextureCHROMIUM(source_id, dest_id);
-}
-
 void RasterImplementationGLES::InitializeDiscardableTextureCHROMIUM(
     GLuint texture_id) {
-  gl_->InitializeDiscardableTextureCHROMIUM(texture_id);
+  Texture* texture = GetTexture(texture_id);
+  gl_->InitializeDiscardableTextureCHROMIUM(texture->id);
 }
 
 void RasterImplementationGLES::UnlockDiscardableTextureCHROMIUM(
     GLuint texture_id) {
-  gl_->UnlockDiscardableTextureCHROMIUM(texture_id);
+  Texture* texture = GetTexture(texture_id);
+  gl_->UnlockDiscardableTextureCHROMIUM(texture->id);
 }
 
 bool RasterImplementationGLES::LockDiscardableTextureCHROMIUM(
     GLuint texture_id) {
-  return gl_->LockDiscardableTextureCHROMIUM(texture_id);
+  Texture* texture = GetTexture(texture_id);
+  return gl_->LockDiscardableTextureCHROMIUM(texture->id);
 }
 
 void RasterImplementationGLES::BeginRasterCHROMIUM(
@@ -411,7 +444,8 @@
       cc::TransferCacheEntryType::kColorSpace,
       raster_color_space.color_space_id);
 
-  gl_->BeginRasterCHROMIUM(texture_id, sk_color, msaa_sample_count,
+  Texture* texture = GetTexture(texture_id);
+  gl_->BeginRasterCHROMIUM(texture->id, sk_color, msaa_sample_count,
                            can_use_lcd_text, use_distance_field_text,
                            color_type, raster_color_space.color_space_id);
   transfer_cache_serialize_helper.FlushEntries();
@@ -475,7 +509,6 @@
 }
 
 void RasterImplementationGLES::BeginGpuRaster() {
-  // TODO(alokp): Use a trace macro to push/pop markers.
   // Using push/pop functions directly incurs cost to evaluate function
   // arguments even when tracing is disabled.
   gl_->TraceBeginCHROMIUM("BeginGpuRaster", "GpuRasterization");
@@ -485,10 +518,13 @@
   // Restore default GL unpack alignment.  TextureUploader expects this.
   gl_->PixelStorei(GL_UNPACK_ALIGNMENT, 4);
 
-  // TODO(alokp): Use a trace macro to push/pop markers.
   // Using push/pop functions directly incurs cost to evaluate function
   // arguments even when tracing is disabled.
   gl_->TraceEndCHROMIUM();
+
+  // Reset cached raster state.
+  bound_texture_ = nullptr;
+  gl_->ActiveTexture(GL_TEXTURE0);
 }
 
 }  // namespace raster
diff --git a/gpu/command_buffer/client/raster_implementation_gles.h b/gpu/command_buffer/client/raster_implementation_gles.h
index 841b6e2..18659eb 100644
--- a/gpu/command_buffer/client/raster_implementation_gles.h
+++ b/gpu/command_buffer/client/raster_implementation_gles.h
@@ -5,6 +5,9 @@
 #ifndef GPU_COMMAND_BUFFER_CLIENT_RASTER_IMPLEMENTATION_GLES_H_
 #define GPU_COMMAND_BUFFER_CLIENT_RASTER_IMPLEMENTATION_GLES_H_
 
+#include <unordered_map>
+
+#include "base/containers/flat_map.h"
 #include "base/macros.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "gpu/command_buffer/client/raster_interface.h"
@@ -54,77 +57,45 @@
   void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
 
   // Texture objects.
-  void GenTextures(GLsizei n, GLuint* textures) override;
+  GLuint CreateTexture(bool use_buffer,
+                       gfx::BufferUsage buffer_usage,
+                       viz::ResourceFormat format) override;
   void DeleteTextures(GLsizei n, const GLuint* textures) override;
-  void BindTexture(GLenum target, GLuint texture) override;
-  void ActiveTexture(GLenum texture) override;
-  void GenerateMipmap(GLenum target) override;
-  void SetColorSpaceMetadataCHROMIUM(GLuint texture_id,
-                                     GLColorSpace color_space) override;
-  void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+  void SetColorSpaceMetadata(GLuint texture_id,
+                             GLColorSpace color_space) override;
+  void TexParameteri(GLuint texture_id, GLenum pname, GLint param) override;
 
   // Mailboxes.
-  void GenMailboxCHROMIUM(GLbyte* mailbox) override;
-  void ProduceTextureDirectCHROMIUM(GLuint texture,
-                                    const GLbyte* mailbox) override;
-  GLuint CreateAndConsumeTextureCHROMIUM(const GLbyte* mailbox) override;
+  void GenMailbox(GLbyte* mailbox) override;
+  void ProduceTextureDirect(GLuint texture, const GLbyte* mailbox) override;
+  GLuint CreateAndConsumeTexture(bool use_buffer,
+                                 gfx::BufferUsage buffer_usage,
+                                 viz::ResourceFormat format,
+                                 const GLbyte* mailbox) override;
 
   // Image objects.
   GLuint CreateImageCHROMIUM(ClientBuffer buffer,
                              GLsizei width,
                              GLsizei height,
                              GLenum internalformat) override;
-  void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-  void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+  void BindTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) override;
+  void ReleaseTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) override;
   void DestroyImageCHROMIUM(GLuint image_id) override;
 
   // Texture allocation and copying.
-  void TexImage2D(GLenum target,
-                  GLint level,
-                  GLint internalformat,
-                  GLsizei width,
-                  GLsizei height,
-                  GLint border,
-                  GLenum format,
-                  GLenum type,
-                  const void* pixels) override;
-  void TexSubImage2D(GLenum target,
-                     GLint level,
-                     GLint xoffset,
-                     GLint yoffset,
-                     GLsizei width,
-                     GLsizei height,
-                     GLenum format,
-                     GLenum type,
-                     const void* pixels) override;
-  void CompressedTexImage2D(GLenum target,
-                            GLint level,
-                            GLenum internalformat,
-                            GLsizei width,
-                            GLsizei height,
-                            GLint border,
-                            GLsizei imageSize,
-                            const void* data) override;
-  void TexStorageForRaster(GLenum target,
-                           viz::ResourceFormat format,
-                           GLsizei width,
-                           GLsizei height,
-                           RasterTexStorageFlags flags) override;
+  void TexStorage2D(GLuint texture_id,
+                    GLint levels,
+                    GLsizei width,
+                    GLsizei height) override;
 
-  void CopySubTextureCHROMIUM(GLuint source_id,
-                              GLint source_level,
-                              GLenum dest_target,
-                              GLuint dest_id,
-                              GLint dest_level,
-                              GLint xoffset,
-                              GLint yoffset,
-                              GLint x,
-                              GLint y,
-                              GLsizei width,
-                              GLsizei height,
-                              GLboolean unpack_flip_y,
-                              GLboolean unpack_premultiply_alpha,
-                              GLboolean unpack_unmultiply_alpha) override;
+  void CopySubTexture(GLuint source_id,
+                      GLuint dest_id,
+                      GLint xoffset,
+                      GLint yoffset,
+                      GLint x,
+                      GLint y,
+                      GLsizei width,
+                      GLsizei height) override;
   void CompressedCopyTextureCHROMIUM(GLuint source_id, GLuint dest_id) override;
   void UnpremultiplyAndDitherCopyCHROMIUM(GLuint source_id,
                                           GLuint dest_id,
@@ -162,12 +133,32 @@
   void EndGpuRaster() override;
 
  private:
+  struct Texture {
+    Texture(GLuint id,
+            GLenum target,
+            bool use_buffer,
+            gfx::BufferUsage buffer_usage,
+            viz::ResourceFormat format);
+    GLuint id;
+    GLenum target;
+    bool use_buffer;
+    gfx::BufferUsage buffer_usage;
+    viz::ResourceFormat format;
+  };
+
+  Texture* GetTexture(GLuint texture_id);
+  Texture* EnsureTextureBound(Texture* texture);
+
   gles2::GLES2Interface* gl_;
   SkColor background_color_;
   ContextSupport* support_;
+  gpu::Capabilities caps_;
   bool use_texture_storage_;
   bool use_texture_storage_image_;
 
+  std::unordered_map<GLuint, Texture> texture_info_;
+  Texture* bound_texture_ = nullptr;
+
   DISALLOW_COPY_AND_ASSIGN(RasterImplementationGLES);
 };
 
diff --git a/gpu/command_buffer/client/raster_implementation_gles_unittest.cc b/gpu/command_buffer/client/raster_implementation_gles_unittest.cc
index b2bff23..5c7e0e5 100644
--- a/gpu/command_buffer/client/raster_implementation_gles_unittest.cc
+++ b/gpu/command_buffer/client/raster_implementation_gles_unittest.cc
@@ -9,6 +9,7 @@
 #include <GLES2/gl2extchromium.h>
 #include <GLES3/gl3.h>
 
+#include "base/containers/flat_map.h"
 #include "cc/paint/color_space_transfer_cache_entry.h"
 #include "cc/paint/display_item_list.h"
 #include "components/viz/common/resources/resource_format_utils.h"
@@ -16,6 +17,7 @@
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/client/gles2_interface_stub.h"
 #include "gpu/command_buffer/common/capabilities.h"
+#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
 #include "gpu/command_buffer/common/mailbox.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -241,9 +243,29 @@
     ri_.reset(new RasterImplementationGLES(gl_.get(), &support_, capabilities));
   }
 
+  void ExpectBindTexture(GLenum target, GLuint texture_id) {
+    if (bound_texture_ != texture_id) {
+      bound_texture_ = texture_id;
+      EXPECT_CALL(*gl_, BindTexture(target, texture_id)).Times(1);
+    }
+  }
+
+  void AllocTextureId(bool use_buffer,
+                      gfx::BufferUsage buffer_usage,
+                      viz::ResourceFormat format,
+                      GLuint texture_id) {
+    GLuint ret_id = 0;
+
+    EXPECT_CALL(*gl_, GenTextures(1, _)).WillOnce(SetArgPointee<1>(texture_id));
+    ret_id = ri_->CreateTexture(use_buffer, buffer_usage, format);
+    EXPECT_EQ(ret_id, texture_id);
+  }
+
   ContextSupportStub support_;
   std::unique_ptr<RasterMockGLES2Interface> gl_;
   std::unique_ptr<RasterImplementationGLES> ri_;
+
+  GLuint bound_texture_ = 0;
 };
 
 TEST_F(RasterImplementationGLESTest, Finish) {
@@ -373,96 +395,73 @@
   ri_->GetQueryObjectuivEXT(kQueryId, kQueryParam, &result);
 }
 
-// MOCK_METHOD2(DeleteTextures, void(GLsizei n, const GLuint* textures));
-TEST_F(RasterImplementationGLESTest, GenTextures) {
-  const GLsizei kNumTextures = 2;
-  GLuint texture_ids[kNumTextures] = {};
-
-  EXPECT_CALL(*gl_, GenTextures(kNumTextures, texture_ids)).Times(1);
-  ri_->GenTextures(kNumTextures, texture_ids);
-}
-
 TEST_F(RasterImplementationGLESTest, DeleteTextures) {
   const GLsizei kNumTextures = 2;
   GLuint texture_ids[kNumTextures] = {2, 3};
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888,
+                 texture_ids[0]);
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888,
+                 texture_ids[1]);
   EXPECT_CALL(*gl_, DeleteTextures(kNumTextures, texture_ids)).Times(1);
   ri_->DeleteTextures(kNumTextures, texture_ids);
 }
 
-TEST_F(RasterImplementationGLESTest, BindTexture) {
-  const GLenum kTarget = GL_TEXTURE_2D;
-  const GLuint kTextureId = 23;
-
-  EXPECT_CALL(*gl_, BindTexture(kTarget, kTextureId)).Times(1);
-  ri_->BindTexture(kTarget, kTextureId);
-}
-
-TEST_F(RasterImplementationGLESTest, ActiveTexture) {
-  const GLenum kTextureUnit = GL_TEXTURE0;
-
-  EXPECT_CALL(*gl_, ActiveTexture(kTextureUnit)).Times(1);
-  ri_->ActiveTexture(kTextureUnit);
-}
-
-TEST_F(RasterImplementationGLESTest, GenerateMipmap) {
-  const GLenum kTarget = GL_TEXTURE_2D;
-
-  EXPECT_CALL(*gl_, GenerateMipmap(kTarget)).Times(1);
-  ri_->GenerateMipmap(kTarget);
-}
-
-TEST_F(RasterImplementationGLESTest, SetColorSpaceMetadataCHROMIUM) {
+TEST_F(RasterImplementationGLESTest, SetColorSpaceMetadata) {
   const GLuint kTextureId = 23;
   gfx::ColorSpace color_space;
 
+  AllocTextureId(true, gfx::BufferUsage::SCANOUT, viz::RGBA_8888, kTextureId);
+
   EXPECT_CALL(*gl_,
               SetColorSpaceMetadataCHROMIUM(
                   kTextureId, reinterpret_cast<GLColorSpace>(&color_space)))
       .Times(1);
-  ri_->SetColorSpaceMetadataCHROMIUM(
-      kTextureId, reinterpret_cast<GLColorSpace>(&color_space));
+  ri_->SetColorSpaceMetadata(kTextureId,
+                             reinterpret_cast<GLColorSpace>(&color_space));
 }
 
 TEST_F(RasterImplementationGLESTest, TexParameteri) {
   const GLenum kTarget = GL_TEXTURE_2D;
+  const GLuint kTextureId = 23;
   const GLenum kPname = GL_TEXTURE_MIN_FILTER;
   const GLint kParam = GL_NEAREST;
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, kTextureId);
+  ExpectBindTexture(kTarget, kTextureId);
   EXPECT_CALL(*gl_, TexParameteri(kTarget, kPname, kParam)).Times(1);
-  ri_->TexParameteri(kTarget, kPname, kParam);
+  ri_->TexParameteri(kTextureId, kPname, kParam);
 }
 
-TEST_F(RasterImplementationGLESTest, GenMailboxCHROMIUM) {
+TEST_F(RasterImplementationGLESTest, GenMailbox) {
   gpu::Mailbox mailbox;
   EXPECT_CALL(*gl_, GenMailboxCHROMIUM(mailbox.name)).Times(1);
-  ri_->GenMailboxCHROMIUM(mailbox.name);
+  ri_->GenMailbox(mailbox.name);
 }
 
-TEST_F(RasterImplementationGLESTest, ProduceTextureDirectCHROMIUM) {
+TEST_F(RasterImplementationGLESTest, ProduceTextureDirect) {
   const GLuint kTextureId = 23;
-  GLuint texture_id = 0;
   gpu::Mailbox mailbox;
 
-  EXPECT_CALL(*gl_, GenTextures(1, &texture_id))
-      .WillOnce(SetArgPointee<1>(kTextureId));
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, kTextureId);
+
   EXPECT_CALL(*gl_, GenMailboxCHROMIUM(mailbox.name)).Times(1);
   EXPECT_CALL(*gl_, ProduceTextureDirectCHROMIUM(kTextureId, mailbox.name))
       .Times(1);
 
-  ri_->GenTextures(1, &texture_id);
-  ri_->GenMailboxCHROMIUM(mailbox.name);
-  ri_->ProduceTextureDirectCHROMIUM(texture_id, mailbox.name);
+  ri_->GenMailbox(mailbox.name);
+  ri_->ProduceTextureDirect(kTextureId, mailbox.name);
 }
 
-TEST_F(RasterImplementationGLESTest, CreateAndConsumeTextureCHROMIUM) {
+TEST_F(RasterImplementationGLESTest, CreateAndConsumeTexture) {
   const GLuint kTextureId = 23;
   GLuint texture_id = 0;
   gpu::Mailbox mailbox;
 
   EXPECT_CALL(*gl_, CreateAndConsumeTextureCHROMIUM(mailbox.name))
       .WillOnce(Return(kTextureId));
-  texture_id = ri_->CreateAndConsumeTextureCHROMIUM(mailbox.name);
+  texture_id = ri_->CreateAndConsumeTexture(false, gfx::BufferUsage::GPU_READ,
+                                            viz::RGBA_8888, mailbox.name);
   EXPECT_EQ(kTextureId, texture_id);
 }
 
@@ -484,18 +483,22 @@
 
 TEST_F(RasterImplementationGLESTest, BindTexImage2DCHROMIUM) {
   const GLenum kTarget = GL_TEXTURE_2D;
+  const GLint kTextureId = 22;
   const GLint kImageId = 23;
 
+  AllocTextureId(false, gfx::BufferUsage::SCANOUT, viz::RGBA_8888, kTextureId);
   EXPECT_CALL(*gl_, BindTexImage2DCHROMIUM(kTarget, kImageId)).Times(1);
-  ri_->BindTexImage2DCHROMIUM(kTarget, kImageId);
+  ri_->BindTexImage2DCHROMIUM(kTextureId, kImageId);
 }
 
 TEST_F(RasterImplementationGLESTest, ReleaseTexImage2DCHROMIUM) {
   const GLenum kTarget = GL_TEXTURE_2D;
+  const GLint kTextureId = 22;
   const GLint kImageId = 23;
 
+  AllocTextureId(false, gfx::BufferUsage::SCANOUT, viz::RGBA_8888, kTextureId);
   EXPECT_CALL(*gl_, ReleaseTexImage2DCHROMIUM(kTarget, kImageId)).Times(1);
-  ri_->ReleaseTexImage2DCHROMIUM(kTarget, kImageId);
+  ri_->ReleaseTexImage2DCHROMIUM(kTextureId, kImageId);
 }
 
 TEST_F(RasterImplementationGLESTest, DestroyImageCHROMIUM) {
@@ -505,68 +508,18 @@
   ri_->DestroyImageCHROMIUM(kImageId);
 }
 
-TEST_F(RasterImplementationGLESTest, TexImage2D) {
-  const GLenum target = GL_TEXTURE_2D;
-  const GLint level = 1;
-  const GLint internalformat = GL_RGBA;
-  const GLsizei width = 2;
-  const GLsizei height = 8;
-  const GLint border = 0;
-  const GLenum format = GL_RGBA;
-  const GLenum type = GL_UNSIGNED_BYTE;
-  const unsigned char pixels[64] = {};
-
-  EXPECT_CALL(*gl_, TexImage2D(target, level, internalformat, width, height,
-                               border, format, type, pixels))
-      .Times(1);
-  ri_->TexImage2D(target, level, internalformat, width, height, border, format,
-                  type, pixels);
-}
-
-TEST_F(RasterImplementationGLESTest, TexSubImage2D) {
-  const GLenum target = GL_TEXTURE_2D;
-  const GLint level = 1;
-  const GLint xoffset = 10;
-  const GLint yoffset = 11;
-  const GLsizei width = 2;
-  const GLsizei height = 8;
-  const GLenum format = GL_RGBA;
-  const GLenum type = GL_UNSIGNED_BYTE;
-  const unsigned char pixels[64] = {};
-
-  EXPECT_CALL(*gl_, TexSubImage2D(target, level, xoffset, yoffset, width,
-                                  height, format, type, pixels))
-      .Times(1);
-  ri_->TexSubImage2D(target, level, xoffset, yoffset, width, height, format,
-                     type, pixels);
-}
-
-TEST_F(RasterImplementationGLESTest, CompressedTexImage2D) {
-  const GLenum target = GL_TEXTURE_2D;
-  const GLint level = 1;
-  const GLint internalformat = viz::GLInternalFormat(viz::ETC1);
-  const GLsizei width = 2;
-  const GLsizei height = 8;
-  const GLint border = 0;
-  const GLsizei image_size = 64;
-  const unsigned char data[64] = {};
-
-  EXPECT_CALL(*gl_, CompressedTexImage2D(target, level, internalformat, width,
-                                         height, border, image_size, data))
-      .Times(1);
-  ri_->CompressedTexImage2D(target, level, internalformat, width, height,
-                            border, image_size, data);
-}
-
 TEST_F(RasterImplementationGLESTest, CompressedCopyTextureCHROMIUM) {
   const GLuint source_id = 23;
   const GLuint dest_id = 24;
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, source_id);
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, dest_id);
+
   EXPECT_CALL(*gl_, CompressedCopyTextureCHROMIUM(source_id, dest_id)).Times(1);
   ri_->CompressedCopyTextureCHROMIUM(source_id, dest_id);
 }
 
-TEST_F(RasterImplementationGLESTest, TexStorageForRasterTexImage2D) {
+TEST_F(RasterImplementationGLESTest, TexStorage2D) {
   const GLenum kTarget = GL_TEXTURE_2D;
   const GLsizei kWidth = 2;
   const GLsizei kHeight = 8;
@@ -577,17 +530,19 @@
       viz::LUMINANCE_F16, viz::RGBA_F16,  viz::R16_EXT};
 
   for (int i = 0; i < kNumTestFormats; i++) {
+    const GLuint kTextureId = 23 + i;
     viz::ResourceFormat format = test_formats[i];
+    AllocTextureId(false, gfx::BufferUsage::GPU_READ, format, kTextureId);
+    ExpectBindTexture(kTarget, kTextureId);
     EXPECT_CALL(*gl_, TexImage2D(kTarget, 0, viz::GLInternalFormat(format),
                                  kWidth, kHeight, 0, viz::GLDataFormat(format),
                                  viz::GLDataType(format), nullptr))
         .Times(1);
-    ri_->TexStorageForRaster(kTarget, format, kWidth, kHeight,
-                             gpu::raster::kNone);
+    ri_->TexStorage2D(kTextureId, 1, kWidth, kHeight);
   }
 }
 
-TEST_F(RasterImplementationGLESTest, TexStorageForRasterTexStorage2DEXT) {
+TEST_F(RasterImplementationGLESTest, TexStorage2DTexStorage2DEXT) {
   gpu::Capabilities capabilities;
   capabilities.texture_storage = true;
   SetUpWithCapabilities(capabilities);
@@ -603,17 +558,19 @@
       viz::RGBA_F16,    viz::R16_EXT};
 
   for (int i = 0; i < kNumTestFormats; i++) {
+    const GLuint kTextureId = 23 + i;
     viz::ResourceFormat format = test_formats[i];
+    AllocTextureId(false, gfx::BufferUsage::GPU_READ, format, kTextureId);
+    ExpectBindTexture(kTarget, kTextureId);
     EXPECT_CALL(*gl_, TexStorage2DEXT(kTarget, kLevels,
                                       viz::TextureStorageFormat(format), kWidth,
                                       kHeight))
         .Times(1);
-    ri_->TexStorageForRaster(kTarget, format, kWidth, kHeight,
-                             gpu::raster::kNone);
+    ri_->TexStorage2D(kTextureId, 1, kWidth, kHeight);
   }
 }
 
-TEST_F(RasterImplementationGLESTest, TexStorageForRasterOverlay) {
+TEST_F(RasterImplementationGLESTest, TexStorage2DOverlay) {
   gpu::Capabilities capabilities;
   capabilities.texture_storage_image = true;
   SetUpWithCapabilities(capabilities);
@@ -621,26 +578,59 @@
   const GLenum kTarget = GL_TEXTURE_2D;
   const GLsizei kWidth = 2;
   const GLsizei kHeight = 8;
-  const int kNumTestFormats = 10;
+  const int kNumTestFormats = 6;
   viz::ResourceFormat test_formats[kNumTestFormats] = {
-      viz::RGBA_8888,   viz::RGBA_4444, viz::BGRA_8888, viz::ALPHA_8,
-      viz::LUMINANCE_8, viz::RGB_565,   viz::RED_8,     viz::LUMINANCE_F16,
-      viz::RGBA_F16,    viz::R16_EXT};
+      viz::RGBA_8888, viz::RGBA_4444, viz::BGRA_8888,
+      viz::RED_8,     viz::RGBA_F16,  viz::R16_EXT};
 
   for (int i = 0; i < kNumTestFormats; i++) {
+    const GLuint kTextureId = 23 + i;
     viz::ResourceFormat format = test_formats[i];
+    AllocTextureId(true, gfx::BufferUsage::SCANOUT, format, kTextureId);
+    ExpectBindTexture(kTarget, kTextureId);
     EXPECT_CALL(*gl_, TexStorage2DImageCHROMIUM(
                           kTarget, viz::TextureStorageFormat(format),
                           GL_SCANOUT_CHROMIUM, kWidth, kHeight))
         .Times(1);
-    ri_->TexStorageForRaster(kTarget, format, kWidth, kHeight,
-                             gpu::raster::kOverlay);
+    ri_->TexStorage2D(kTextureId, 1, kWidth, kHeight);
+  }
+}
+
+TEST_F(RasterImplementationGLESTest, TexStorage2DOverlayNative) {
+  const GLenum target = gpu::GetPlatformSpecificTextureTarget();
+  const GLsizei kWidth = 2;
+  const GLsizei kHeight = 8;
+  const int kNumTestFormats = 6;
+  viz::ResourceFormat test_formats[kNumTestFormats] = {
+      viz::RGBA_8888, viz::RGBA_4444, viz::BGRA_8888,
+      viz::RED_8,     viz::RGBA_F16,  viz::R16_EXT};
+
+  gpu::Capabilities capabilities;
+  capabilities.texture_storage_image = true;
+  for (int i = 0; i < kNumTestFormats; i++) {
+    capabilities.texture_target_exception_list.emplace_back(
+        gfx::BufferUsage::SCANOUT, viz::BufferFormat(test_formats[i]));
+  }
+  SetUpWithCapabilities(capabilities);
+
+  for (int i = 0; i < kNumTestFormats; i++) {
+    const GLuint kTextureId = 23 + i;
+    viz::ResourceFormat format = test_formats[i];
+    AllocTextureId(true, gfx::BufferUsage::SCANOUT, format, kTextureId);
+    ExpectBindTexture(target, kTextureId);
+    EXPECT_CALL(*gl_, TexStorage2DImageCHROMIUM(
+                          target, viz::TextureStorageFormat(format),
+                          GL_SCANOUT_CHROMIUM, kWidth, kHeight))
+        .Times(1);
+    ri_->TexStorage2D(kTextureId, 1, kWidth, kHeight);
   }
 }
 
 TEST_F(RasterImplementationGLESTest, InitializeDiscardableTextureCHROMIUM) {
   const GLuint kTextureId = 23;
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, kTextureId);
+
   EXPECT_CALL(*gl_, InitializeDiscardableTextureCHROMIUM(kTextureId)).Times(1);
   ri_->InitializeDiscardableTextureCHROMIUM(kTextureId);
 }
@@ -648,6 +638,8 @@
 TEST_F(RasterImplementationGLESTest, UnlockDiscardableTextureCHROMIUM) {
   const GLuint kTextureId = 23;
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, kTextureId);
+
   EXPECT_CALL(*gl_, UnlockDiscardableTextureCHROMIUM(kTextureId)).Times(1);
   ri_->UnlockDiscardableTextureCHROMIUM(kTextureId);
 }
@@ -656,6 +648,8 @@
   const GLuint kTextureId = 23;
   bool ret = false;
 
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, kTextureId);
+
   EXPECT_CALL(*gl_, LockDiscardableTextureCHROMIUM(kTextureId))
       .WillOnce(Return(true));
   ret = ri_->LockDiscardableTextureCHROMIUM(kTextureId);
@@ -676,6 +670,9 @@
   const GLint color_type = kRGBA_8888_SkColorType;
   const auto raster_color_space =
       cc::RasterColorSpace(gfx::ColorSpace::CreateSRGB(), 2);
+
+  AllocTextureId(false, gfx::BufferUsage::GPU_READ, viz::RGBA_8888, texture_id);
+
   EXPECT_CALL(*gl_, BeginRasterCHROMIUM(texture_id, sk_color, msaa_sample_count,
                                         can_use_lcd_text,
                                         use_distance_field_text, color_type, 2))
diff --git a/gpu/command_buffer/client/raster_implementation_unittest.cc b/gpu/command_buffer/client/raster_implementation_unittest.cc
index 7e38ec7a..5e1fa681 100644
--- a/gpu/command_buffer/client/raster_implementation_unittest.cc
+++ b/gpu/command_buffer/client/raster_implementation_unittest.cc
@@ -427,37 +427,6 @@
   EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), gl_->GetError());
 }
 
-TEST_F(RasterImplementationTest, GetIntegerCacheWrite) {
-  struct PNameValue {
-    GLenum pname;
-    GLint expected;
-  };
-  gl_->ActiveTexture(GL_TEXTURE4);
-  gl_->BindTexture(GL_TEXTURE_2D, 6);
-
-  const PNameValue pairs[] = {{
-                                  GL_ACTIVE_TEXTURE, GL_TEXTURE4,
-                              },
-                              {
-                                  GL_TEXTURE_BINDING_2D, 6,
-                              }};
-  size_t num_pairs = sizeof(pairs) / sizeof(pairs[0]);
-  for (size_t ii = 0; ii < num_pairs; ++ii) {
-    const PNameValue& pv = pairs[ii];
-    GLint v = -1;
-    gl_->GetIntegerv(pv.pname, &v);
-    EXPECT_EQ(pv.expected, v);
-  }
-
-  ExpectedMemoryInfo result1 =
-      GetExpectedResultMemory(sizeof(cmds::GetError::Result));
-
-  EXPECT_CALL(*command_buffer(), OnFlush())
-      .WillOnce(SetMemory(result1.ptr, GLuint(GL_NO_ERROR)))
-      .RetiresOnSaturation();
-  EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), gl_->GetError());
-}
-
 TEST_F(RasterImplementationTest, BeginEndQueryEXT) {
   //  GL_COMMANDS_COMPLETED_CHROMIUM,
   //  GL_CURRENT_QUERY_EXT
@@ -983,6 +952,8 @@
   EXPECT_EQ(GL_INVALID_VALUE, CheckError());
 }
 
+/*
+TODO(vmiura): Update use of BindTexture.
 TEST_F(RasterImplementationTest, DiscardableTextureLockCounting) {
   const GLint texture_id = 1;
   gl_->InitializeDiscardableTextureCHROMIUM(texture_id);
@@ -1011,6 +982,7 @@
     }
   }
 }
+*/
 
 #include "base/macros.h"
 #include "gpu/command_buffer/client/raster_implementation_unittest_autogen.h"
diff --git a/gpu/command_buffer/client/raster_interface.h b/gpu/command_buffer/client/raster_interface.h
index 530e177..444c7beb 100644
--- a/gpu/command_buffer/client/raster_interface.h
+++ b/gpu/command_buffer/client/raster_interface.h
@@ -8,6 +8,7 @@
 #include <GLES2/gl2.h>
 #include "base/compiler_specific.h"
 #include "components/viz/common/resources/resource_format.h"
+#include "ui/gfx/buffer_types.h"
 
 namespace cc {
 class DisplayItemList;
@@ -35,69 +36,38 @@
   virtual ~RasterInterface() {}
 
   // Texture objects.
-  virtual void GenTextures(GLsizei n, GLuint* textures) = 0;
-  virtual void BindTexture(GLenum target, GLuint texture) = 0;
-  virtual void ActiveTexture(GLenum texture) = 0;
-  virtual void GenerateMipmap(GLenum target) = 0;
-  virtual void SetColorSpaceMetadataCHROMIUM(GLuint texture_id,
-                                             GLColorSpace color_space) = 0;
+  virtual GLuint CreateTexture(bool use_buffer,
+                               gfx::BufferUsage buffer_usage,
+                               viz::ResourceFormat format) = 0;
+  virtual void SetColorSpaceMetadata(GLuint texture_id,
+                                     GLColorSpace color_space) = 0;
 
   // Mailboxes.
-  virtual void GenMailboxCHROMIUM(GLbyte* mailbox) = 0;
-  virtual void ProduceTextureDirectCHROMIUM(GLuint texture,
-                                            const GLbyte* mailbox) = 0;
-  virtual GLuint CreateAndConsumeTextureCHROMIUM(const GLbyte* mailbox) = 0;
+  virtual void GenMailbox(GLbyte* mailbox) = 0;
+  virtual void ProduceTextureDirect(GLuint texture, const GLbyte* mailbox) = 0;
+  virtual GLuint CreateAndConsumeTexture(bool use_buffer,
+                                         gfx::BufferUsage buffer_usage,
+                                         viz::ResourceFormat format,
+                                         const GLbyte* mailbox) = 0;
 
   // Image objects.
-  virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) = 0;
-  virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) = 0;
+  virtual void BindTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) = 0;
+  virtual void ReleaseTexImage2DCHROMIUM(GLuint texture_id, GLint image_id) = 0;
 
   // Texture allocation and copying.
-  virtual void TexImage2D(GLenum target,
-                          GLint level,
-                          GLint internalformat,
-                          GLsizei width,
-                          GLsizei height,
-                          GLint border,
-                          GLenum format,
-                          GLenum type,
-                          const void* pixels) = 0;
-  virtual void TexSubImage2D(GLenum target,
-                             GLint level,
-                             GLint xoffset,
-                             GLint yoffset,
-                             GLsizei width,
-                             GLsizei height,
-                             GLenum format,
-                             GLenum type,
-                             const void* pixels) = 0;
-  virtual void CompressedTexImage2D(GLenum target,
-                                    GLint level,
-                                    GLenum internalformat,
-                                    GLsizei width,
-                                    GLsizei height,
-                                    GLint border,
-                                    GLsizei imageSize,
-                                    const void* data) = 0;
-  virtual void TexStorageForRaster(GLenum target,
-                                   viz::ResourceFormat format,
-                                   GLsizei width,
-                                   GLsizei height,
-                                   RasterTexStorageFlags flags) = 0;
-  virtual void CopySubTextureCHROMIUM(GLuint source_id,
-                                      GLint source_level,
-                                      GLenum dest_target,
-                                      GLuint dest_id,
-                                      GLint dest_level,
-                                      GLint xoffset,
-                                      GLint yoffset,
-                                      GLint x,
-                                      GLint y,
-                                      GLsizei width,
-                                      GLsizei height,
-                                      GLboolean unpack_flip_y,
-                                      GLboolean unpack_premultiply_alpha,
-                                      GLboolean unpack_unmultiply_alpha) = 0;
+  virtual void TexStorage2D(GLuint texture_id,
+                            GLint levels,
+                            GLsizei width,
+                            GLsizei height) = 0;
+  virtual void CopySubTexture(GLuint source_id,
+                              GLuint dest_id,
+                              GLint xoffset,
+                              GLint yoffset,
+                              GLint x,
+                              GLint y,
+                              GLsizei width,
+                              GLsizei height) = 0;
+
   // OOP-Raster
   virtual void BeginRasterCHROMIUM(
       GLuint texture_id,
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
index 3d8d6ba..d0b9d39 100644
--- a/gpu/config/gpu_driver_bug_list.json
+++ b/gpu/config/gpu_driver_bug_list.json
@@ -2779,13 +2779,6 @@
       "os": {
         "type": "macosx"
       },
-      "exceptions" : [
-        {
-          "comment": "TODO(kainino): testing whether this CL is really responsible for crbug.com/815154",
-          "vendor_id": "0x8086",
-          "device_id": ["0x0a2e"]
-        }
-      ],
       "vendor_id": "0x8086",
       "multi_gpu_category": "primary",
       "features": [
diff --git a/headless/lib/browser/headless_url_request_context_getter.cc b/headless/lib/browser/headless_url_request_context_getter.cc
index a86f63bc..f45a1f0 100644
--- a/headless/lib/browser/headless_url_request_context_getter.cc
+++ b/headless/lib/browser/headless_url_request_context_getter.cc
@@ -128,7 +128,7 @@
         cookie_config.crypto_delegate =
             cookie_config::GetCookieCryptoDelegate();
         std::unique_ptr<net::CookieStore> cookie_store =
-            CreateCookieStore(cookie_config, net_log_);
+            CreateCookieStore(cookie_config);
         std::unique_ptr<net::ChannelIDService> channel_id_service =
             std::make_unique<net::ChannelIDService>(
                 new net::DefaultChannelIDStore(nullptr));
diff --git a/infra/config/global/luci-milo-dev.cfg b/infra/config/global/luci-milo-dev.cfg
index 780f4b2..1163555 100644
--- a/infra/config/global/luci-milo-dev.cfg
+++ b/infra/config/global/luci-milo-dev.cfg
@@ -2062,6 +2062,70 @@
 }
 
 consoles: {
+  id: "chromium.fyi.goma"
+  name: "chromium.fyi.goma"
+  repo_url: "https://chromium.googlesource.com/chromium/src"
+  ref: "refs/heads/master"
+  manifest_name: "REVISION"
+  header_id: "chromium"
+
+  builders: {
+    name: "buildbot/chromium.fyi/Win Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win cl.exe Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win7 Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win7 Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/WinMSVC64 Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/chromeos-amd64-generic-rel-goma-canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux x64 Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux x64 Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Android Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/ios-device-goma-canary-clobber"
+  }
+}
+
+consoles: {
   id: "chromium.fyi"
   name: "chromium.fyi"
   repo_url: "https://chromium.googlesource.com/chromium/src"
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg
index 901576c..a2280b8 100644
--- a/infra/config/global/luci-milo.cfg
+++ b/infra/config/global/luci-milo.cfg
@@ -2186,6 +2186,70 @@
 }
 
 consoles: {
+  id: "chromium.fyi.goma"
+  name: "chromium.fyi.goma"
+  repo_url: "https://chromium.googlesource.com/chromium/src"
+  ref: "refs/heads/master"
+  manifest_name: "REVISION"
+  header_id: "chromium"
+
+  builders: {
+    name: "buildbot/chromium.fyi/Win Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win cl.exe Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win7 Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Win7 Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/WinMSVC64 Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Mac Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/chromeos-amd64-generic-rel-goma-canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux Builder Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux x64 Goma Canary (clobber)"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Linux x64 Goma Canary LocalOutputCache"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/Android Builder (dbg) Goma Canary"
+  }
+  builders: {
+    name: "buildbot/chromium.fyi/ios-device-goma-canary-clobber"
+  }
+}
+
+consoles: {
   id: "chromium.fyi"
   name: "chromium.fyi"
   repo_url: "https://chromium.googlesource.com/chromium/src"
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm b/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm
index 40b1771a..df209c1f 100644
--- a/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm
+++ b/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm
@@ -231,8 +231,7 @@
       cookie_util::CookieStoreConfig::COOKIE_STORE_IOS,
       cookie_config::GetCookieCryptoDelegate());
   main_cookie_store_ = cookie_util::CreateCookieStore(
-      ios_cookie_config, std::move(profile_params->system_cookie_store),
-      io_thread->net_log());
+      ios_cookie_config, std::move(profile_params->system_cookie_store));
 
   if (profile_params->path.BaseName().value() ==
       kIOSChromeInitialBrowserState) {
@@ -312,8 +311,7 @@
   // TODO(crbug.com/779106): Check if cookiestore type should be changed.
   std::unique_ptr<net::CookieStore> cookie_store =
       cookie_util::CreateCookieStore(
-          ios_cookie_config, std::make_unique<net::NSHTTPSystemCookieStore>(),
-          main_context->net_log());
+          ios_cookie_config, std::make_unique<net::NSHTTPSystemCookieStore>());
 
   // Transfer ownership of the ChannelIDStore, HttpNetworkSession, cookies, and
   // cache to AppRequestContext.
diff --git a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm
index ebf2319c..4c555393 100644
--- a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm
+++ b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm
@@ -196,7 +196,7 @@
           cookie_path_,
           cookie_util::CookieStoreConfig::RESTORED_SESSION_COOKIES,
           cookie_util::CookieStoreConfig::COOKIE_STORE_IOS, nullptr),
-      std::move(profile_params->system_cookie_store), io_thread->net_log());
+      std::move(profile_params->system_cookie_store));
   main_context->set_cookie_store(main_cookie_store_.get());
   main_cookie_store_->SetChannelIDServiceID(channel_id_service->GetUniqueID());
 
diff --git a/ios/chrome/browser/net/cookie_util.h b/ios/chrome/browser/net/cookie_util.h
index ee29e64..7bd577fcb8 100644
--- a/ios/chrome/browser/net/cookie_util.h
+++ b/ios/chrome/browser/net/cookie_util.h
@@ -19,7 +19,6 @@
 class CookieCryptoDelegate;
 class CookieStore;
 class SystemCookieStore;
-class NetLog;
 }
 
 namespace cookie_util {
@@ -76,8 +75,7 @@
 // CookieStoreIOS.
 std::unique_ptr<net::CookieStore> CreateCookieStore(
     const CookieStoreConfig& config,
-    std::unique_ptr<net::SystemCookieStore> system_cookie_store,
-    net::NetLog* log);
+    std::unique_ptr<net::SystemCookieStore> system_cookie_store);
 
 // Returns true if the cookies should be cleared.
 // Current implementation returns true if the device has rebooted since the
diff --git a/ios/chrome/browser/net/cookie_util.mm b/ios/chrome/browser/net/cookie_util.mm
index f5fde8c..46e5674b5 100644
--- a/ios/chrome/browser/net/cookie_util.mm
+++ b/ios/chrome/browser/net/cookie_util.mm
@@ -20,7 +20,6 @@
 #include "net/cookies/cookie_monster.h"
 #include "net/cookies/cookie_store.h"
 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
-#include "net/log/net_log.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_context_getter.h"
 
@@ -50,11 +49,10 @@
 
 // Creates a CookieMonster configured by |config|.
 std::unique_ptr<net::CookieMonster> CreateCookieMonster(
-    const CookieStoreConfig& config,
-    net::NetLog* log) {
+    const CookieStoreConfig& config) {
   if (config.path.empty()) {
     // Empty path means in-memory store.
-    return std::make_unique<net::CookieMonster>(nullptr, log);
+    return std::make_unique<net::CookieMonster>(nullptr);
   }
 
   const bool restore_old_session_cookies =
@@ -63,7 +61,7 @@
       CreatePersistentCookieStore(config.path, restore_old_session_cookies,
                                   config.crypto_delegate);
   std::unique_ptr<net::CookieMonster> cookie_monster(
-      new net::CookieMonster(persistent_store.get(), log));
+      new net::CookieMonster(persistent_store.get()));
   if (restore_old_session_cookies)
     cookie_monster->SetPersistSessionCookies(true);
   return cookie_monster;
@@ -86,10 +84,9 @@
 
 std::unique_ptr<net::CookieStore> CreateCookieStore(
     const CookieStoreConfig& config,
-    std::unique_ptr<net::SystemCookieStore> system_cookie_store,
-    net::NetLog* log) {
+    std::unique_ptr<net::SystemCookieStore> system_cookie_store) {
   if (config.cookie_store_type == CookieStoreConfig::COOKIE_MONSTER)
-    return CreateCookieMonster(config, log);
+    return CreateCookieMonster(config);
 
   scoped_refptr<net::SQLitePersistentCookieStore> persistent_store = nullptr;
   if (config.session_cookie_mode ==
@@ -100,7 +97,7 @@
         config.crypto_delegate);
   }
   return std::make_unique<net::CookieStoreIOSPersistent>(
-      persistent_store.get(), std::move(system_cookie_store), log);
+      persistent_store.get(), std::move(system_cookie_store));
 }
 
 bool ShouldClearSessionCookies() {
diff --git a/ios/components/io_thread/ios_io_thread.mm b/ios/components/io_thread/ios_io_thread.mm
index 3fb6b920..99c9fb9 100644
--- a/ios/components/io_thread/ios_io_thread.mm
+++ b/ios/components/io_thread/ios_io_thread.mm
@@ -330,8 +330,7 @@
   CreateDefaultAuthHandlerFactory();
   globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl());
   // In-memory cookie store.
-  globals_->system_cookie_store.reset(
-      new net::CookieMonster(nullptr, net_log_));
+  globals_->system_cookie_store.reset(new net::CookieMonster(nullptr));
   // In-memory channel ID store.
   globals_->system_channel_id_service.reset(
       new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr)));
diff --git a/ios/net/cookies/cookie_store_ios.h b/ios/net/cookies/cookie_store_ios.h
index bb7da00..3bbe2657 100644
--- a/ios/net/cookies/cookie_store_ios.h
+++ b/ios/net/cookies/cookie_store_ios.h
@@ -31,8 +31,6 @@
 
 namespace net {
 
-class NetLog;
-
 // Observer for changes on |NSHTTPCookieStorge sharedHTTPCookieStorage|.
 class CookieNotificationObserver {
  public:
@@ -60,12 +58,12 @@
   // as its default backend and is initially synchronized with it.
   // Apple does not persist the cookies' creation dates in NSHTTPCookieStorage,
   // so callers should not expect these values to be populated.
-  CookieStoreIOS(std::unique_ptr<SystemCookieStore> system_store, NetLog* log);
+  explicit CookieStoreIOS(std::unique_ptr<SystemCookieStore> system_store);
 
   // Used by ChromeSigninCookieManager/Cronet
   // TODO(crbug.com/759226): Remove once the migration to use SystemCookieStore
   // is finished.
-  CookieStoreIOS(NSHTTPCookieStorage* ns_cookie_store, NetLog* log);
+  explicit CookieStoreIOS(NSHTTPCookieStorage* ns_cookie_store);
 
   ~CookieStoreIOS() override;
 
@@ -113,8 +111,7 @@
 
  protected:
   CookieStoreIOS(net::CookieMonster::PersistentCookieStore* persistent_store,
-                 std::unique_ptr<SystemCookieStore> system_store,
-                 NetLog* log);
+                 std::unique_ptr<SystemCookieStore> system_store);
 
   // These three functions are used for wrapping user-supplied callbacks given
   // to CookieStoreIOS mutator methods. Given a callback, they return a new
diff --git a/ios/net/cookies/cookie_store_ios.mm b/ios/net/cookies/cookie_store_ios.mm
index 191e448..3de0cb48 100644
--- a/ios/net/cookies/cookie_store_ios.mm
+++ b/ios/net/cookies/cookie_store_ios.mm
@@ -32,7 +32,6 @@
 #import "net/base/mac/url_conversions.h"
 #include "net/cookies/cookie_util.h"
 #include "net/cookies/parsed_cookie.h"
-#include "net/log/net_log.h"
 #include "url/gurl.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -255,16 +254,13 @@
 #pragma mark CookieStoreIOS
 
 CookieStoreIOS::CookieStoreIOS(
-    std::unique_ptr<SystemCookieStore> system_cookie_store,
-    NetLog* log)
+    std::unique_ptr<SystemCookieStore> system_cookie_store)
     : CookieStoreIOS(/*persistent_store=*/nullptr,
-                     std::move(system_cookie_store),
-                     log) {}
+                     std::move(system_cookie_store)) {}
 
-CookieStoreIOS::CookieStoreIOS(NSHTTPCookieStorage* ns_cookie_store,
-                               NetLog* log)
-    : CookieStoreIOS(std::make_unique<NSHTTPSystemCookieStore>(ns_cookie_store),
-                     log) {}
+CookieStoreIOS::CookieStoreIOS(NSHTTPCookieStorage* ns_cookie_store)
+    : CookieStoreIOS(
+          std::make_unique<NSHTTPSystemCookieStore>(ns_cookie_store)) {}
 
 CookieStoreIOS::~CookieStoreIOS() {
   NotificationTrampoline::GetInstance()->RemoveObserver(this);
@@ -518,9 +514,8 @@
 
 CookieStoreIOS::CookieStoreIOS(
     net::CookieMonster::PersistentCookieStore* persistent_store,
-    std::unique_ptr<SystemCookieStore> system_store,
-    NetLog* log)
-    : cookie_monster_(new net::CookieMonster(persistent_store, log)),
+    std::unique_ptr<SystemCookieStore> system_store)
+    : cookie_monster_(new net::CookieMonster(persistent_store)),
       system_store_(std::move(system_store)),
       metrics_enabled_(false),
       cookie_cache_(new CookieCache()),
diff --git a/ios/net/cookies/cookie_store_ios_persistent.h b/ios/net/cookies/cookie_store_ios_persistent.h
index 6b78911..09e96ce 100644
--- a/ios/net/cookies/cookie_store_ios_persistent.h
+++ b/ios/net/cookies/cookie_store_ios_persistent.h
@@ -15,8 +15,6 @@
 
 namespace net {
 
-class NetLog;
-
 // The CookieStoreIOSPersistent is an implementation of CookieStore relying on
 // on backing CookieStore.
 // CookieStoreIOSPersistent is not thread safe.
@@ -29,15 +27,13 @@
 class CookieStoreIOSPersistent : public CookieStoreIOS {
  public:
   // Constructs a CookieStoreIOS with a default SystemCookieStore.
-  CookieStoreIOSPersistent(
-      net::CookieMonster::PersistentCookieStore* persistent_store,
-      NetLog* log);
+  explicit CookieStoreIOSPersistent(
+      net::CookieMonster::PersistentCookieStore* persistent_store);
 
   // Constructs a CookieStoreIOS backed by |system_store|.
   CookieStoreIOSPersistent(
       net::CookieMonster::PersistentCookieStore* persistent_store,
-      std::unique_ptr<SystemCookieStore> system_store,
-      NetLog* log);
+      std::unique_ptr<SystemCookieStore> system_store);
 
   ~CookieStoreIOSPersistent() override;
 
diff --git a/ios/net/cookies/cookie_store_ios_persistent.mm b/ios/net/cookies/cookie_store_ios_persistent.mm
index f3cf6764..3ab7a7c 100644
--- a/ios/net/cookies/cookie_store_ios_persistent.mm
+++ b/ios/net/cookies/cookie_store_ios_persistent.mm
@@ -12,7 +12,6 @@
 #import "ios/net/cookies/ns_http_system_cookie_store.h"
 #import "ios/net/cookies/system_cookie_util.h"
 #include "net/cookies/cookie_monster.h"
-#include "net/log/net_log.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -24,17 +23,14 @@
 #pragma mark CookieStoreIOSPersistent
 
 CookieStoreIOSPersistent::CookieStoreIOSPersistent(
-    net::CookieMonster::PersistentCookieStore* persistent_store,
-    NetLog* log)
+    net::CookieMonster::PersistentCookieStore* persistent_store)
     : CookieStoreIOS(persistent_store,
-                     std::make_unique<net::NSHTTPSystemCookieStore>(),
-                     log) {}
+                     std::make_unique<net::NSHTTPSystemCookieStore>()) {}
 
 CookieStoreIOSPersistent::CookieStoreIOSPersistent(
     net::CookieMonster::PersistentCookieStore* persistent_store,
-    std::unique_ptr<SystemCookieStore> system_store,
-    NetLog* log)
-    : CookieStoreIOS(persistent_store, std::move(system_store), log) {}
+    std::unique_ptr<SystemCookieStore> system_store)
+    : CookieStoreIOS(persistent_store, std::move(system_store)) {}
 
 CookieStoreIOSPersistent::~CookieStoreIOSPersistent() {}
 
diff --git a/ios/net/cookies/cookie_store_ios_persistent_unittest.mm b/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
index 16acfb0..9cb8f37 100644
--- a/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
@@ -28,7 +28,7 @@
 
 struct InactiveCookieStoreIOSTestTraits {
   static std::unique_ptr<net::CookieStore> Create() {
-    return std::make_unique<CookieStoreIOSPersistent>(nullptr, nullptr);
+    return std::make_unique<CookieStoreIOSPersistent>(nullptr);
   }
 
   static void RunUntilIdle() { base::RunLoop().RunUntilIdle(); }
@@ -77,8 +77,8 @@
         scoped_cookie_store_ios_client_(
             std::make_unique<TestCookieStoreIOSClient>()),
         backend_(new net::TestPersistentCookieStore),
-        store_(std::make_unique<net::CookieStoreIOSPersistent>(backend_.get(),
-                                                               nullptr)) {
+        store_(
+            std::make_unique<net::CookieStoreIOSPersistent>(backend_.get())) {
     cookie_change_subscription_ =
         store_->GetChangeDispatcher().AddCallbackForCookie(
             kTestCookieURL, "abc",
diff --git a/ios/net/cookies/cookie_store_ios_test_util.h b/ios/net/cookies/cookie_store_ios_test_util.h
index fa35188..0331327e 100644
--- a/ios/net/cookies/cookie_store_ios_test_util.h
+++ b/ios/net/cookies/cookie_store_ios_test_util.h
@@ -34,8 +34,7 @@
 
  private:
   // net::CookieMonster::PersistentCookieStore implementation:
-  void Load(const LoadedCallback& loaded_callback,
-            const net::NetLogWithSource& /* net_log */) override;
+  void Load(const LoadedCallback& loaded_callback) override;
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& loaded_callback) override;
   void AddCookie(const net::CanonicalCookie& cc) override;
@@ -44,7 +43,6 @@
   void SetForceKeepSessionState() override;
   void SetBeforeFlushCallback(base::RepeatingClosure callback) override;
   void Flush(base::OnceClosure callback) override;
-  void Close() override;
 
   ~TestPersistentCookieStore() override;
 
diff --git a/ios/net/cookies/cookie_store_ios_test_util.mm b/ios/net/cookies/cookie_store_ios_test_util.mm
index 6bb52a5..8edca9b3 100644
--- a/ios/net/cookies/cookie_store_ios_test_util.mm
+++ b/ios/net/cookies/cookie_store_ios_test_util.mm
@@ -68,9 +68,7 @@
 #pragma mark -
 #pragma mark Private methods
 
-void TestPersistentCookieStore::Load(
-    const LoadedCallback& loaded_callback,
-    const net::NetLogWithSource& /* net_log */) {
+void TestPersistentCookieStore::Load(const LoadedCallback& loaded_callback) {
   loaded_callback_ = loaded_callback;
 }
 
@@ -96,8 +94,6 @@
   flushed_ = true;
 }
 
-void TestPersistentCookieStore::Close() {}
-
 #pragma mark -
 #pragma mark TestCookieStoreIOSClient
 
diff --git a/ios/net/cookies/cookie_store_ios_unittest.mm b/ios/net/cookies/cookie_store_ios_unittest.mm
index 8baedee..f4d0a19 100644
--- a/ios/net/cookies/cookie_store_ios_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_unittest.mm
@@ -32,7 +32,7 @@
 class TestingCookieStoreIOS : public CookieStoreIOS {
  public:
   TestingCookieStoreIOS(std::unique_ptr<SystemCookieStore> system_store)
-      : CookieStoreIOS(std::move(system_store), nullptr),
+      : CookieStoreIOS(std::move(system_store)),
         scoped_cookie_store_ios_client_(
             std::make_unique<TestCookieStoreIOSClient>()) {}
 
@@ -128,8 +128,7 @@
     // object is owned  by store_, this will work as we will not use
     // |system_store_| after |store_| is deleted.
     system_store_ = system_store.get();
-    store_ =
-        std::make_unique<net::CookieStoreIOS>(std::move(system_store), nullptr);
+    store_ = std::make_unique<net::CookieStoreIOS>(std::move(system_store));
     cookie_change_subscription_ =
         store_->GetChangeDispatcher().AddCallbackForCookie(
             kTestCookieURLFooBar, "abc",
@@ -252,7 +251,7 @@
       std::make_unique<TestCookieStoreIOSClient>());
   ClearCookies();
   std::unique_ptr<CookieStoreIOS> cookie_store(std::make_unique<CookieStoreIOS>(
-      std::make_unique<NSHTTPSystemCookieStore>(), nullptr));
+      std::make_unique<NSHTTPSystemCookieStore>()));
 
   // Add a cookie.
   net::CookieOptions options;
diff --git a/ios/web/shell/shell_url_request_context_getter.mm b/ios/web/shell/shell_url_request_context_getter.mm
index 109a9a2..77374c2 100644
--- a/ios/web/shell/shell_url_request_context_getter.mm
+++ b/ios/web/shell/shell_url_request_context_getter.mm
@@ -80,8 +80,7 @@
                 {base::MayBlock(), base::TaskPriority::BACKGROUND}),
             true, nullptr);
     std::unique_ptr<net::CookieStoreIOS> cookie_store(
-        new net::CookieStoreIOSPersistent(persistent_store.get(),
-                                          url_request_context_->net_log()));
+        new net::CookieStoreIOSPersistent(persistent_store.get()));
     storage_->set_cookie_store(std::move(cookie_store));
 
     std::string user_agent =
diff --git a/ios/web_view/internal/web_view_url_request_context_getter.mm b/ios/web_view/internal/web_view_url_request_context_getter.mm
index 7be6251..d97e741 100644
--- a/ios/web_view/internal/web_view_url_request_context_getter.mm
+++ b/ios/web_view/internal/web_view_url_request_context_getter.mm
@@ -79,8 +79,7 @@
                 {base::MayBlock(), base::TaskPriority::BACKGROUND}),
             true, nullptr);
     std::unique_ptr<net::CookieStoreIOS> cookie_store(
-        new net::CookieStoreIOSPersistent(persistent_store.get(),
-                                          url_request_context_->net_log()));
+        new net::CookieStoreIOSPersistent(persistent_store.get()));
     storage_->set_cookie_store(std::move(cookie_store));
 
     std::string user_agent =
diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h
index 316e5a9..a5fad5e 100644
--- a/ipc/ipc_message_start.h
+++ b/ipc/ipc_message_start.h
@@ -58,9 +58,7 @@
   EncryptedMediaMsgStart,
   CacheStorageMsgStart,
   ServiceWorkerMsgStart,
-  EmbeddedWorkerMsgStart,
   CastMsgStart,
-  MediaStreamTrackMetricsHostMsgStart,
   ChromeExtensionMsgStart,
   GinJavaBridgeMsgStart,
   ChromeUtilityPrintingMsgStart,
diff --git a/media/audio/alsa/alsa_input.cc b/media/audio/alsa/alsa_input.cc
index 41324d8..6b11b688 100644
--- a/media/audio/alsa/alsa_input.cc
+++ b/media/audio/alsa/alsa_input.cc
@@ -11,7 +11,6 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/single_thread_task_runner.h"
-#include "base/threading/thread_task_runner_handle.h"
 #include "media/audio/alsa/alsa_output.h"
 #include "media/audio/alsa/alsa_util.h"
 #include "media/audio/alsa/alsa_wrapper.h"
@@ -35,8 +34,7 @@
       device_name_(device_name),
       params_(params),
       bytes_per_buffer_(params.frames_per_buffer() *
-                        (params.channels() * params.bits_per_sample()) /
-                        8),
+                        (params.channels() * params.bits_per_sample()) / 8),
       wrapper_(wrapper),
       buffer_duration_(base::TimeDelta::FromMicroseconds(
           params.frames_per_buffer() * base::Time::kMicrosecondsPerSecond /
@@ -47,8 +45,8 @@
       mixer_element_handle_(NULL),
       read_callback_behind_schedule_(false),
       audio_bus_(AudioBus::Create(params)),
-      weak_factory_(this) {
-}
+      capture_thread_("AlsaInput"),
+      running_(false) {}
 
 AlsaPcmInputStream::~AlsaPcmInputStream() = default;
 
@@ -120,19 +118,25 @@
   if (error < 0) {
     callback_ = NULL;
   } else {
+    base::Thread::Options options;
+    options.priority = base::ThreadPriority::REALTIME_AUDIO;
+    CHECK(capture_thread_.StartWithOptions(options));
+
     // We start reading data half |buffer_duration_| later than when the
     // buffer might have got filled, to accommodate some delays in the audio
     // driver. This could also give us a smooth read sequence going forward.
     base::TimeDelta delay = buffer_duration_ + buffer_duration_ / 2;
     next_read_time_ = base::TimeTicks::Now() + delay;
-    base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+    running_ = true;
+    capture_thread_.task_runner()->PostDelayedTask(
         FROM_HERE,
-        base::Bind(&AlsaPcmInputStream::ReadAudio, weak_factory_.GetWeakPtr()),
+        base::BindOnce(&AlsaPcmInputStream::ReadAudio, base::Unretained(this)),
         delay);
   }
 }
 
 bool AlsaPcmInputStream::Recover(int original_error) {
+  DCHECK(capture_thread_.task_runner()->BelongsToCurrentThread());
   int error = wrapper_->PcmRecover(device_handle_, original_error, 1);
   if (error < 0) {
     // Docs say snd_pcm_recover returns the original error if it is not one
@@ -157,8 +161,23 @@
   return true;
 }
 
+void AlsaPcmInputStream::StopRunningOnCaptureThread() {
+  DCHECK(capture_thread_.IsRunning());
+  if (!capture_thread_.task_runner()->BelongsToCurrentThread()) {
+    capture_thread_.task_runner()->PostTask(
+        FROM_HERE,
+        base::BindOnce(&AlsaPcmInputStream::StopRunningOnCaptureThread,
+                       base::Unretained(this)));
+    return;
+  }
+  running_ = false;
+}
+
 void AlsaPcmInputStream::ReadAudio() {
+  DCHECK(capture_thread_.task_runner()->BelongsToCurrentThread());
   DCHECK(callback_);
+  if (!running_)
+    return;
 
   snd_pcm_sframes_t frames = wrapper_->PcmAvailUpdate(device_handle_);
   if (frames < 0) {  // Potentially recoverable error?
@@ -177,9 +196,9 @@
     }
 
     base::TimeDelta next_check_time = buffer_duration_ / 2;
-    base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+    capture_thread_.task_runner()->PostDelayedTask(
         FROM_HERE,
-        base::Bind(&AlsaPcmInputStream::ReadAudio, weak_factory_.GetWeakPtr()),
+        base::BindOnce(&AlsaPcmInputStream::ReadAudio, base::Unretained(this)),
         next_check_time);
     return;
   }
@@ -215,7 +234,8 @@
                         normalized_volume);
     } else if (frames_read < 0) {
       bool success = Recover(frames_read);
-      LOG(WARNING) << "PcmReadi failed with error " << frames_read << ". "
+      LOG(WARNING) << "PcmReadi failed with error "
+                   << wrapper_->StrError(frames_read) << ". "
                    << (success ? "Successfully" : "Unsuccessfully")
                    << " recovered.";
     } else {
@@ -237,9 +257,9 @@
     delay = base::TimeDelta();
   }
 
-  base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+  capture_thread_.task_runner()->PostDelayedTask(
       FROM_HERE,
-      base::Bind(&AlsaPcmInputStream::ReadAudio, weak_factory_.GetWeakPtr()),
+      base::BindOnce(&AlsaPcmInputStream::ReadAudio, base::Unretained(this)),
       delay);
 }
 
@@ -249,7 +269,8 @@
 
   StopAgc();
 
-  weak_factory_.InvalidateWeakPtrs();  // Cancel the next scheduled read.
+  StopRunningOnCaptureThread();
+  capture_thread_.Stop();
   int error = wrapper_->PcmDrop(device_handle_);
   if (error < 0)
     HandleError("PcmDrop", error);
@@ -259,7 +280,7 @@
 
 void AlsaPcmInputStream::Close() {
   if (device_handle_) {
-    weak_factory_.InvalidateWeakPtrs();  // Cancel the next scheduled read.
+    Stop();
     int error = alsa_util::CloseDevice(wrapper_, device_handle_);
     if (error < 0)
       HandleError("PcmClose", error);
@@ -345,7 +366,8 @@
 
 void AlsaPcmInputStream::HandleError(const char* method, int error) {
   LOG(WARNING) << method << ": " << wrapper_->StrError(error);
-  callback_->OnError();
+  if (callback_)
+    callback_->OnError();
 }
 
 }  // namespace media
diff --git a/media/audio/alsa/alsa_input.h b/media/audio/alsa/alsa_input.h
index 7ce3c40..c30944a 100644
--- a/media/audio/alsa/alsa_input.h
+++ b/media/audio/alsa/alsa_input.h
@@ -14,6 +14,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "base/threading/thread.h"
 #include "base/time/time.h"
 #include "media/audio/agc_audio_stream.h"
 #include "media/audio/audio_io.h"
@@ -65,6 +66,9 @@
   // Recovers from any device errors if possible.
   bool Recover(int error);
 
+  // Set |running_| to false on |capture_thread_|.
+  void StopRunningOnCaptureThread();
+
   // Non-refcounted pointer back to the audio manager.
   // The AudioManager indirectly holds on to stream objects, so we don't
   // want circular references.  Additionally, stream objects live on the audio
@@ -85,9 +89,8 @@
   std::unique_ptr<uint8_t[]> audio_buffer_;
   bool read_callback_behind_schedule_;
   std::unique_ptr<AudioBus> audio_bus_;
-
-  // NOTE: Weak pointers must be invalidated before all other member variables.
-  base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_;
+  base::Thread capture_thread_;
+  bool running_;
 
   DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream);
 };
diff --git a/media/base/media_observer.h b/media/base/media_observer.h
index a7bc673..f6a5efa 100644
--- a/media/base/media_observer.h
+++ b/media/base/media_observer.h
@@ -61,10 +61,6 @@
   // content.
   virtual void OnBecameDominantVisibleContent(bool is_dominant) {}
 
-  // Called when CDM is attached to the media element. The |cdm_context| is
-  // only guaranteed to be valid in this call.
-  virtual void OnSetCdm(CdmContext* cdm_context) = 0;
-
   // Called after demuxer is initialized.
   virtual void OnMetadataChanged(const PipelineMetadata& metadata) = 0;
 
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 3105f51..421702f 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1326,9 +1326,6 @@
   CdmContext* cdm_context = cdm_context_ref->GetCdmContext();
   DCHECK(cdm_context);
 
-  if (observer_)
-    observer_->OnSetCdm(cdm_context);
-
   // Keep the reference to the CDM, as it shouldn't be destroyed until
   // after the pipeline is done with the |cdm_context|.
   pending_cdm_context_ref_ = std::move(cdm_context_ref);
diff --git a/media/remoting/BUILD.gn b/media/remoting/BUILD.gn
index b7dfea0..6b0bc7a2 100644
--- a/media/remoting/BUILD.gn
+++ b/media/remoting/BUILD.gn
@@ -41,20 +41,8 @@
     "courier_renderer_factory.h",
     "metrics.cc",
     "metrics.h",
-    "remoting_cdm.cc",
-    "remoting_cdm.h",
-    "remoting_cdm_context.cc",
-    "remoting_cdm_context.h",
-    "remoting_cdm_controller.cc",
-    "remoting_cdm_controller.h",
-    "remoting_cdm_factory.cc",
-    "remoting_cdm_factory.h",
     "renderer_controller.cc",
     "renderer_controller.h",
-    "shared_session.cc",
-    "shared_session.h",
-    "sink_availability_observer.cc",
-    "sink_availability_observer.h",
   ]
 
   deps = [
diff --git a/media/remoting/courier_renderer.cc b/media/remoting/courier_renderer.cc
index 9a6650cf..672b219 100644
--- a/media/remoting/courier_renderer.cc
+++ b/media/remoting/courier_renderer.cc
@@ -140,26 +140,22 @@
   }
 
   // Establish remoting data pipe connection using main thread.
-  const SharedSession::DataPipeStartCallback data_pipe_callback =
-      base::Bind(&CourierRenderer::OnDataPipeCreatedOnMainThread,
-                 media_task_runner_, weak_factory_.GetWeakPtr(), rpc_broker_);
   main_task_runner_->PostTask(
       FROM_HERE,
-      base::Bind(&RendererController::StartDataPipe, controller_,
-                 base::Passed(&audio_data_pipe), base::Passed(&video_data_pipe),
-                 data_pipe_callback));
+      base::BindOnce(
+          &RendererController::StartDataPipe, controller_,
+          base::Passed(&audio_data_pipe), base::Passed(&video_data_pipe),
+          base::BindOnce(&CourierRenderer::OnDataPipeCreatedOnMainThread,
+                         media_task_runner_, weak_factory_.GetWeakPtr(),
+                         rpc_broker_)));
 }
 
 void CourierRenderer::SetCdm(CdmContext* cdm_context,
                              const CdmAttachedCB& cdm_attached_cb) {
-  VLOG(2) << __func__ << " cdm_id:" << cdm_context->GetCdmId();
   DCHECK(media_task_runner_->BelongsToCurrentThread());
 
-  // TODO(erickung): add implementation once Remote CDM implementation is done.
-  // Right now it returns callback immediately.
-  if (!cdm_attached_cb.is_null()) {
-    cdm_attached_cb.Run(false);
-  }
+  // Media remoting doesn't support encrypted content.
+  NOTIMPLEMENTED();
 }
 
 void CourierRenderer::Flush(const base::Closure& flush_cb) {
diff --git a/media/remoting/courier_renderer_unittest.cc b/media/remoting/courier_renderer_unittest.cc
index f944cbe8..a11a1dc 100644
--- a/media/remoting/courier_renderer_unittest.cc
+++ b/media/remoting/courier_renderer_unittest.cc
@@ -279,8 +279,7 @@
   }
 
   void SetUp() override {
-    controller_ = std::make_unique<RendererController>(
-        FakeRemoterFactory::CreateSharedSession(false));
+    controller_ = FakeRemoterFactory::CreateController(false);
     controller_->OnMetadataChanged(DefaultMetadata());
 
     // Redirect RPC message to CourierRendererTest::OnSendMessageToSink().
diff --git a/media/remoting/end2end_test_renderer.cc b/media/remoting/end2end_test_renderer.cc
index ed21a693..87065b7 100644
--- a/media/remoting/end2end_test_renderer.cc
+++ b/media/remoting/end2end_test_renderer.cc
@@ -69,7 +69,7 @@
 class TestRemoter final : public mojom::Remoter {
  public:
   using SendMessageToSinkCallback =
-      base::Callback<void(const std::vector<uint8_t>& message)>;
+      base::RepeatingCallback<void(const std::vector<uint8_t>& message)>;
   TestRemoter(
       mojom::RemotingSourcePtr source,
       const SendMessageToSinkCallback& send_message_to_sink_cb,
@@ -130,7 +130,7 @@
   DISALLOW_COPY_AND_ASSIGN(TestRemoter);
 };
 
-scoped_refptr<SharedSession> CreateSharedSession(
+std::unique_ptr<RendererController> CreateController(
     const TestRemoter::SendMessageToSinkCallback& send_message_to_sink_cb,
     const TestStreamSender::SendFrameToSinkCallback& send_frame_to_sink_cb) {
   mojom::RemotingSourcePtr remoting_source;
@@ -140,23 +140,23 @@
       std::move(remoting_source), send_message_to_sink_cb,
       send_frame_to_sink_cb);
   mojo::MakeStrongBinding(std::move(test_remoter), mojo::MakeRequest(&remoter));
-  return new SharedSession(std::move(remoting_source_request),
-                           std::move(remoter));
+  return std::make_unique<RendererController>(
+      std::move(remoting_source_request), std::move(remoter));
 }
 
 }  // namespace
 
 End2EndTestRenderer::End2EndTestRenderer(std::unique_ptr<Renderer> renderer)
-    : receiver_rpc_broker_(base::Bind(&End2EndTestRenderer::OnMessageFromSink,
-                                      base::Unretained(this))),
+    : receiver_rpc_broker_(
+          base::BindRepeating(&End2EndTestRenderer::OnMessageFromSink,
+                              base::Unretained(this))),
       receiver_(new Receiver(std::move(renderer), &receiver_rpc_broker_)),
       weak_factory_(this) {
-  shared_session_ =
-      CreateSharedSession(base::Bind(&End2EndTestRenderer::SendMessageToSink,
-                                     weak_factory_.GetWeakPtr()),
-                          base::Bind(&End2EndTestRenderer::SendFrameToSink,
-                                     weak_factory_.GetWeakPtr()));
-  controller_.reset(new RendererController(shared_session_));
+  controller_ = CreateController(
+      base::BindRepeating(&End2EndTestRenderer::SendMessageToSink,
+                          weak_factory_.GetWeakPtr()),
+      base::BindRepeating(&End2EndTestRenderer::SendFrameToSink,
+                          weak_factory_.GetWeakPtr()));
   courier_renderer_.reset(new CourierRenderer(
       base::ThreadTaskRunnerHandle::Get(), controller_->GetWeakPtr(), nullptr));
 }
@@ -215,7 +215,7 @@
 
 void End2EndTestRenderer::OnMessageFromSink(
     std::unique_ptr<std::vector<uint8_t>> message) {
-  shared_session_->OnMessageFromSink(*message);
+  controller_->OnMessageFromSink(*message);
 }
 
 }  // namespace remoting
diff --git a/media/remoting/end2end_test_renderer.h b/media/remoting/end2end_test_renderer.h
index 5ef04b1e..8fa9f6c 100644
--- a/media/remoting/end2end_test_renderer.h
+++ b/media/remoting/end2end_test_renderer.h
@@ -15,7 +15,6 @@
 namespace media {
 namespace remoting {
 
-class SharedSession;
 class RendererController;
 class CourierRenderer;
 class Receiver;
@@ -49,8 +48,6 @@
   // Called when receives RPC messages from |receiver_|.
   void OnMessageFromSink(std::unique_ptr<std::vector<uint8_t>> message);
 
-  // The session that is used by |controller_| to create the data pipes.
-  scoped_refptr<SharedSession> shared_session_;
   std::unique_ptr<RendererController> controller_;
   std::unique_ptr<CourierRenderer> courier_renderer_;
 
diff --git a/media/remoting/fake_remoter.cc b/media/remoting/fake_remoter.cc
index b362c96..fcbfe21 100644
--- a/media/remoting/fake_remoter.cc
+++ b/media/remoting/fake_remoter.cc
@@ -12,7 +12,7 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/buildflag.h"
 #include "media/media_features.h"
-#include "media/remoting/shared_session.h"
+#include "media/remoting/renderer_controller.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -188,7 +188,7 @@
 }
 
 // static
-scoped_refptr<SharedSession> FakeRemoterFactory::CreateSharedSession(
+std::unique_ptr<RendererController> FakeRemoterFactory::CreateController(
     bool start_will_fail) {
   mojom::RemotingSourcePtr remoting_source;
   auto remoting_source_request = mojo::MakeRequest(&remoting_source);
@@ -196,8 +196,8 @@
   FakeRemoterFactory remoter_factory(start_will_fail);
   remoter_factory.Create(std::move(remoting_source),
                          mojo::MakeRequest(&remoter));
-  return new SharedSession(std::move(remoting_source_request),
-                           std::move(remoter));
+  return std::make_unique<RendererController>(
+      std::move(remoting_source_request), std::move(remoter));
 }
 
 }  // namespace remoting
diff --git a/media/remoting/fake_remoter.h b/media/remoting/fake_remoter.h
index b3a0fb4f..34418fc7 100644
--- a/media/remoting/fake_remoter.h
+++ b/media/remoting/fake_remoter.h
@@ -13,7 +13,7 @@
 namespace media {
 namespace remoting {
 
-class SharedSession;
+class RendererController;
 
 class FakeRemotingDataStreamSender : public mojom::RemotingDataStreamSender {
  public:
@@ -92,7 +92,8 @@
   void Create(mojom::RemotingSourcePtr source,
               mojom::RemoterRequest request) override;
 
-  static scoped_refptr<SharedSession> CreateSharedSession(bool start_will_fail);
+  static std::unique_ptr<RendererController> CreateController(
+      bool start_will_fail);
 
  private:
   bool start_will_fail_;
diff --git a/media/remoting/remoting_cdm.cc b/media/remoting/remoting_cdm.cc
deleted file mode 100644
index 20d18cd..0000000
--- a/media/remoting/remoting_cdm.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/remoting_cdm.h"
-
-#include "media/base/cdm_promise.h"
-
-namespace media {
-namespace remoting {
-
-// TODO(xjz): Merge this with erickung's implementation.
-RemotingCdm::RemotingCdm(
-    const std::string& key_system,
-    const GURL& security_origin,
-    const CdmConfig& cdm_config,
-    const SessionMessageCB& session_message_cb,
-    const SessionClosedCB& session_closed_cb,
-    const SessionKeysChangeCB& session_keys_change_cb,
-    const SessionExpirationUpdateCB& session_expiration_update_cb,
-    const CdmCreatedCB& cdm_created_cb,
-    std::unique_ptr<RemotingCdmController> remoting_cdm_controller)
-    : remoting_cdm_controller_(std::move(remoting_cdm_controller)),
-      remoting_cdm_context_(this) {
-  DCHECK(remoting_cdm_controller_);
-
-  // TODO(xjz): Not implemented. Need to merge with erickung's implementation.
-}
-
-RemotingCdm::~RemotingCdm() = default;
-
-void RemotingCdm::SetServerCertificate(
-    const std::vector<uint8_t>& certificate,
-    std::unique_ptr<SimpleCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-void RemotingCdm::CreateSessionAndGenerateRequest(
-    CdmSessionType session_type,
-    EmeInitDataType init_data_type,
-    const std::vector<uint8_t>& init_data,
-    std::unique_ptr<NewSessionCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-void RemotingCdm::LoadSession(CdmSessionType session_type,
-                              const std::string& session_id,
-                              std::unique_ptr<NewSessionCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-void RemotingCdm::UpdateSession(const std::string& session_id,
-                                const std::vector<uint8_t>& response,
-                                std::unique_ptr<SimpleCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-void RemotingCdm::CloseSession(const std::string& session_id,
-                               std::unique_ptr<SimpleCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-void RemotingCdm::RemoveSession(const std::string& session_id,
-                                std::unique_ptr<SimpleCdmPromise> promise) {
-  // TODO(xjz): Merge with erickung's implementation.
-  NOTIMPLEMENTED();
-}
-
-CdmContext* RemotingCdm::GetCdmContext() {
-  return &remoting_cdm_context_;
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/remoting_cdm.h b/media/remoting/remoting_cdm.h
deleted file mode 100644
index 5cfb327f4..0000000
--- a/media/remoting/remoting_cdm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_REMOTING_CDM_H_
-#define MEDIA_REMOTING_REMOTING_CDM_H_
-
-#include "media/base/cdm_factory.h"
-#include "media/base/content_decryption_module.h"
-#include "media/remoting/remoting_cdm_context.h"
-#include "media/remoting/remoting_cdm_controller.h"
-
-namespace media {
-namespace remoting {
-
-// TODO(xjz): Merge this with erickung's implementation.
-// TODO(miu): Execute renaming on all RemotingCdm* classes after erickung's
-// implementation is merged-in.
-class RemotingCdm : public ContentDecryptionModule {
- public:
-  RemotingCdm(const std::string& key_system,
-              const GURL& security_origin,
-              const CdmConfig& cdm_config,
-              const SessionMessageCB& session_message_cb,
-              const SessionClosedCB& session_closed_cb,
-              const SessionKeysChangeCB& session_keys_change_cb,
-              const SessionExpirationUpdateCB& session_expiration_update_cb,
-              const CdmCreatedCB& cdm_created_cb,
-              std::unique_ptr<RemotingCdmController> remoting_cdm_controller);
-
-  // ContentDecryptionModule implementations.
-  void SetServerCertificate(const std::vector<uint8_t>& certificate,
-                            std::unique_ptr<SimpleCdmPromise> promise) override;
-  void CreateSessionAndGenerateRequest(
-      CdmSessionType session_type,
-      EmeInitDataType init_data_type,
-      const std::vector<uint8_t>& init_data,
-      std::unique_ptr<NewSessionCdmPromise> promise) override;
-  void LoadSession(CdmSessionType session_type,
-                   const std::string& session_id,
-                   std::unique_ptr<NewSessionCdmPromise> promise) override;
-  void UpdateSession(const std::string& session_id,
-                     const std::vector<uint8_t>& response,
-                     std::unique_ptr<SimpleCdmPromise> promise) override;
-  void CloseSession(const std::string& session_id,
-                    std::unique_ptr<SimpleCdmPromise> promise) override;
-  void RemoveSession(const std::string& session_id,
-                     std::unique_ptr<SimpleCdmPromise> promise) override;
-  CdmContext* GetCdmContext() override;
-
-  SharedSession* session() const { return remoting_cdm_controller_->session(); }
-
- private:
-  ~RemotingCdm() override;
-
-  const std::unique_ptr<RemotingCdmController> remoting_cdm_controller_;
-  RemotingCdmContext remoting_cdm_context_;
-
-  DISALLOW_COPY_AND_ASSIGN(RemotingCdm);
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_REMOTING_CDM_H_
diff --git a/media/remoting/remoting_cdm_context.cc b/media/remoting/remoting_cdm_context.cc
deleted file mode 100644
index a58d47f..0000000
--- a/media/remoting/remoting_cdm_context.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/remoting_cdm_context.h"
-
-#include "media/remoting/remoting_cdm.h"
-#include "media/remoting/shared_session.h"
-
-namespace media {
-namespace remoting {
-
-namespace {
-// Used as an identifier for RemotingCdmContext::From().
-void* const kClassIdentifier = const_cast<void**>(&kClassIdentifier);
-}  // namespace
-
-// TODO(xjz): Merge this with erickung's implementation.
-RemotingCdmContext::RemotingCdmContext(RemotingCdm* remoting_cdm)
-    : remoting_cdm_(remoting_cdm) {}
-
-RemotingCdmContext::~RemotingCdmContext() = default;
-
-RemotingCdmContext* RemotingCdmContext::From(CdmContext* cdm_context) {
-  if (cdm_context && cdm_context->GetClassIdentifier() == kClassIdentifier)
-    return static_cast<RemotingCdmContext*>(cdm_context);
-  return nullptr;
-}
-
-Decryptor* RemotingCdmContext::GetDecryptor() {
-  // TODO(xjz): Merge with erickung's implementation.
-  return nullptr;
-}
-
-int RemotingCdmContext::GetCdmId() const {
-  // TODO(xjz): Merge with erickung's implementation.
-  return CdmContext::kInvalidCdmId;
-}
-
-void* RemotingCdmContext::GetClassIdentifier() const {
-  return kClassIdentifier;
-}
-
-SharedSession* RemotingCdmContext::GetSharedSession() const {
-  return remoting_cdm_->session();
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/remoting_cdm_context.h b/media/remoting/remoting_cdm_context.h
deleted file mode 100644
index 306dd49..0000000
--- a/media/remoting/remoting_cdm_context.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
-#define MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
-
-#include "media/base/cdm_context.h"
-
-namespace media {
-namespace remoting {
-
-class RemotingCdm;
-class SharedSession;
-
-// TODO(xjz): Merge this with erickung's implementation.
-// TODO(miu): This class should just be merged into RemotingCdm and implement
-// both the CDM and CdmContext interfaces. Also, replace the GetSharedSession()
-// accessor and move it to a new SharedSession::FromCdmContext() function. Then,
-// neither the controller nor renderer can gain direct access to the CDM impl.
-// See discussion in https://codereview.chromium.org/2643253003 for more info.
-class RemotingCdmContext : public CdmContext {
- public:
-  explicit RemotingCdmContext(RemotingCdm* remoting_cdm);
-  ~RemotingCdmContext() override;
-
-  // If |cdm_context| is an instance of RemotingCdmContext, return a type-casted
-  // pointer to it. Otherwise, return nullptr.
-  static RemotingCdmContext* From(CdmContext* cdm_context);
-
-  SharedSession* GetSharedSession() const;
-
-  // CdmContext implementations.
-  Decryptor* GetDecryptor() override;
-  int GetCdmId() const override;
-  void* GetClassIdentifier() const override;
-
- private:
-  RemotingCdm* const remoting_cdm_;  // Outlives this class.
-
-  DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext);
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
diff --git a/media/remoting/remoting_cdm_controller.cc b/media/remoting/remoting_cdm_controller.cc
deleted file mode 100644
index 35282626..0000000
--- a/media/remoting/remoting_cdm_controller.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/remoting_cdm_controller.h"
-
-#include "base/bind.h"
-#include "base/callback_helpers.h"
-#include "base/logging.h"
-#include "base/threading/thread_checker.h"
-
-namespace media {
-namespace remoting {
-
-RemotingCdmController::RemotingCdmController(
-    scoped_refptr<SharedSession> session)
-    : session_(std::move(session)) {
-  session_->AddClient(this);
-}
-
-RemotingCdmController::~RemotingCdmController() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  session_->RemoveClient(this);
-}
-
-void RemotingCdmController::OnStarted(bool success) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  DCHECK(!cdm_check_cb_.is_null());
-  is_remoting_ = success;
-  base::ResetAndReturn(&cdm_check_cb_).Run(success);
-}
-
-void RemotingCdmController::OnSessionStateChanged() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (is_remoting_ && session_->state() != SharedSession::SESSION_STARTING &&
-      session_->state() != SharedSession::SESSION_STARTED) {
-    session_->Shutdown();
-    is_remoting_ = false;
-  }
-}
-
-void RemotingCdmController::ShouldCreateRemotingCdm(
-    const CdmCheckCallback& cb) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  DCHECK(!cb.is_null());
-
-  if (is_remoting_) {
-    cb.Run(true);
-    return;
-  }
-
-  if (!session_->IsRemoteDecryptionAvailable()) {
-    cb.Run(false);
-    return;
-  }
-
-  DCHECK(cdm_check_cb_.is_null());
-  cdm_check_cb_ = cb;
-  session_->StartRemoting(this);
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/remoting_cdm_controller.h b/media/remoting/remoting_cdm_controller.h
deleted file mode 100644
index 6586e73..0000000
--- a/media/remoting/remoting_cdm_controller.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_REMOTING_CDM_CONTROLLER_H_
-#define MEDIA_REMOTING_REMOTING_CDM_CONTROLLER_H_
-
-#include "base/callback.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/thread_checker.h"
-#include "media/remoting/shared_session.h"
-
-namespace media {
-namespace remoting {
-
-// This class controlls whether to start a remoting session to create CDM. The
-// |session_| will be passed to the RendererController when the CDM is attached
-// to a media element.
-class RemotingCdmController final : public SharedSession::Client {
- public:
-  explicit RemotingCdmController(scoped_refptr<SharedSession> session);
-  ~RemotingCdmController();
-
-  // SharedSession::Client implementations.
-  void OnStarted(bool success) override;
-  void OnSessionStateChanged() override;
-
-  // Returns whether we should create remoting CDM via |cb|, which could be run
-  // synchronously or asynchronously, depending on whether the required
-  // information is available now or later.
-  using CdmCheckCallback = base::Callback<void(bool is_remoting)>;
-  void ShouldCreateRemotingCdm(const CdmCheckCallback& cb);
-
-  SharedSession* session() const { return session_.get(); }
-
- private:
-  const scoped_refptr<SharedSession> session_;
-
-  // This callback is run once to report whether to create remoting CDM.
-  CdmCheckCallback cdm_check_cb_;
-
-  // Indicates if the session is in remoting.
-  bool is_remoting_ = false;
-
-  base::ThreadChecker thread_checker_;
-
-  DISALLOW_COPY_AND_ASSIGN(RemotingCdmController);
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_REMOTING_CDM_CONTROLLER_H_
diff --git a/media/remoting/remoting_cdm_factory.cc b/media/remoting/remoting_cdm_factory.cc
deleted file mode 100644
index 3080f9f..0000000
--- a/media/remoting/remoting_cdm_factory.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/remoting_cdm_factory.h"
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/single_thread_task_runner.h"
-#include "media/base/cdm_config.h"
-#include "media/remoting/remoting_cdm.h"
-#include "url/origin.h"
-
-namespace media {
-namespace remoting {
-
-RemotingCdmFactory::RemotingCdmFactory(
-    std::unique_ptr<CdmFactory> default_cdm_factory,
-    mojom::RemoterFactory* remoter_factory,
-    std::unique_ptr<SinkAvailabilityObserver> sink_observer)
-    : default_cdm_factory_(std::move(default_cdm_factory)),
-      remoter_factory_(remoter_factory),
-      sink_observer_(std::move(sink_observer)),
-      weak_factory_(this) {
-  DCHECK(default_cdm_factory_);
-  DCHECK(remoter_factory_);
-  DCHECK(sink_observer_);
-}
-
-RemotingCdmFactory::~RemotingCdmFactory() = default;
-
-std::unique_ptr<RemotingCdmController>
-RemotingCdmFactory::CreateRemotingCdmController() {
-  mojom::RemotingSourcePtr remoting_source;
-  auto remoting_source_request = mojo::MakeRequest(&remoting_source);
-  mojom::RemoterPtr remoter;
-  remoter_factory_->Create(std::move(remoting_source),
-                           mojo::MakeRequest(&remoter));
-  scoped_refptr<SharedSession> session =
-      new SharedSession(std::move(remoting_source_request), std::move(remoter));
-  // HACK: Copy-over the sink availability status from |sink_observer_| before
-  // the RemotingCdmController would naturally get the notification. This is to
-  // avoid the possible delay on OnSinkAvailable() call from browser.
-  if (sink_observer_->IsRemoteDecryptionAvailable())
-    session->OnSinkAvailable(sink_observer_->sink_metadata().Clone());
-  return std::make_unique<RemotingCdmController>(std::move(session));
-}
-
-// TODO(xjz): Replace the callbacks with an interface. http://crbug.com/657940.
-void RemotingCdmFactory::Create(
-    const std::string& key_system,
-    const url::Origin& security_origin,
-    const CdmConfig& cdm_config,
-    const SessionMessageCB& session_message_cb,
-    const SessionClosedCB& session_closed_cb,
-    const SessionKeysChangeCB& session_keys_change_cb,
-    const SessionExpirationUpdateCB& session_expiration_update_cb,
-    const CdmCreatedCB& cdm_created_cb) {
-  if (!sink_observer_->IsRemoteDecryptionAvailable()) {
-    CreateCdm(key_system, security_origin, cdm_config, session_message_cb,
-              session_closed_cb, session_keys_change_cb,
-              session_expiration_update_cb, cdm_created_cb, nullptr, false);
-    return;
-  }
-
-  std::unique_ptr<RemotingCdmController> remoting_cdm_controller =
-      CreateRemotingCdmController();
-  // Get the raw pointer of |remoting_cdm_controller| as it will be invalidated
-  // before calling |ShouldCreateRemotingCdm()| by base::Passed().
-  RemotingCdmController* remoting_cdm_controller_ptr =
-      remoting_cdm_controller.get();
-  remoting_cdm_controller_ptr->ShouldCreateRemotingCdm(base::Bind(
-      &RemotingCdmFactory::CreateCdm, weak_factory_.GetWeakPtr(), key_system,
-      security_origin, cdm_config, session_message_cb, session_closed_cb,
-      session_keys_change_cb, session_expiration_update_cb, cdm_created_cb,
-      base::Passed(&remoting_cdm_controller)));
-}
-
-void RemotingCdmFactory::CreateCdm(
-    const std::string& key_system,
-    const url::Origin& security_origin,
-    const CdmConfig& cdm_config,
-    const SessionMessageCB& session_message_cb,
-    const SessionClosedCB& session_closed_cb,
-    const SessionKeysChangeCB& session_keys_change_cb,
-    const SessionExpirationUpdateCB& session_expiration_update_cb,
-    const CdmCreatedCB& cdm_created_cb,
-    std::unique_ptr<RemotingCdmController> remoting_cdm_controller,
-    bool is_remoting) {
-  if (is_remoting) {
-    VLOG(1) << "Create remoting CDM.";
-    // TODO(xjz): Merge this with erickung's implementation to create remoting
-    // CDM.
-    NOTIMPLEMENTED();
-  } else {
-    VLOG(1) << "Create default CDM.";
-    default_cdm_factory_->Create(key_system, security_origin, cdm_config,
-                                 session_message_cb, session_closed_cb,
-                                 session_keys_change_cb,
-                                 session_expiration_update_cb, cdm_created_cb);
-  }
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/remoting_cdm_factory.h b/media/remoting/remoting_cdm_factory.h
deleted file mode 100644
index 6c04344..0000000
--- a/media/remoting/remoting_cdm_factory.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
-#define MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
-
-#include "base/memory/weak_ptr.h"
-#include "media/base/cdm_factory.h"
-#include "media/mojo/interfaces/remoting.mojom.h"
-#include "media/remoting/remoting_cdm_controller.h"
-#include "media/remoting/sink_availability_observer.h"
-
-namespace media {
-namespace remoting {
-
-// TODO(xjz): Merge this with Eric's implementation.
-class RemotingCdmFactory : public CdmFactory {
- public:
-  // |remoter_factory| is expected to outlive this class.
-  // |sink_observer| monitors the remoting sink availablity, which is used to
-  // initialize SharedSession when created to avoid possible delay of
-  // OnSinkAvailable() call from browser.
-  RemotingCdmFactory(std::unique_ptr<CdmFactory> default_cdm_factory,
-                     mojom::RemoterFactory* remoter_factory,
-                     std::unique_ptr<SinkAvailabilityObserver> sink_observer);
-  ~RemotingCdmFactory() override;
-
-  void Create(const std::string& key_system,
-              const url::Origin& security_origin,
-              const CdmConfig& cdm_config,
-              const SessionMessageCB& session_message_cb,
-              const SessionClosedCB& session_closed_cb,
-              const SessionKeysChangeCB& session_keys_change_cb,
-              const SessionExpirationUpdateCB& session_expiration_update_cb,
-              const CdmCreatedCB& cdm_created_cb) override;
-
- private:
-  std::unique_ptr<RemotingCdmController> CreateRemotingCdmController();
-  void CreateCdm(const std::string& key_system,
-                 const url::Origin& security_origin,
-                 const CdmConfig& cdm_config,
-                 const SessionMessageCB& session_message_cb,
-                 const SessionClosedCB& session_closed_cb,
-                 const SessionKeysChangeCB& session_keys_change_cb,
-                 const SessionExpirationUpdateCB& session_expiration_update_cb,
-                 const CdmCreatedCB& cdm_created_cb,
-                 std::unique_ptr<RemotingCdmController> remoting_cdm_controller,
-                 bool is_remoting);
-
-  const std::unique_ptr<CdmFactory> default_cdm_factory_;
-  mojom::RemoterFactory* const remoter_factory_;  // Outlives this class.
-  std::unique_ptr<SinkAvailabilityObserver> sink_observer_;
-  base::WeakPtrFactory<RemotingCdmFactory> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(RemotingCdmFactory);
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
diff --git a/media/remoting/renderer_controller.cc b/media/remoting/renderer_controller.cc
index 384b2dc..79e82aca 100644
--- a/media/remoting/renderer_controller.cc
+++ b/media/remoting/renderer_controller.cc
@@ -13,8 +13,6 @@
 #include "build/build_config.h"
 #include "build/buildflag.h"
 #include "media/media_features.h"
-#include "media/remoting/remoting_cdm.h"
-#include "media/remoting/remoting_cdm_context.h"
 
 #if defined(OS_ANDROID)
 #include "media/base/android/media_codec_util.h"
@@ -105,65 +103,97 @@
 
 }  // namespace
 
-RendererController::RendererController(scoped_refptr<SharedSession> session)
-    : session_(std::move(session)),
+RendererController::RendererController(
+    mojom::RemotingSourceRequest source_request,
+    mojom::RemoterPtr remoter)
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
+    : rpc_broker_(base::BindRepeating(&RendererController::SendMessageToSink,
+                                      base::Unretained(this))),
+#else
+    :
+#endif
+      binding_(this, std::move(source_request)),
+      remoter_(std::move(remoter)),
       clock_(base::DefaultTickClock::GetInstance()),
       weak_factory_(this) {
-  session_->AddClient(this);
+  DCHECK(remoter_);
 }
 
 RendererController::~RendererController() {
   DCHECK(thread_checker_.CalledOnValidThread());
-  metrics_recorder_.WillStopSession(MEDIA_ELEMENT_DESTROYED);
-  session_->RemoveClient(this);
+
+  CancelDelayedStart();
+  if (remote_rendering_started_) {
+    metrics_recorder_.WillStopSession(MEDIA_ELEMENT_DESTROYED);
+    remoter_->Stop(mojom::RemotingStopReason::UNEXPECTED_FAILURE);
+  }
 }
 
-void RendererController::OnStarted(bool success) {
+void RendererController::OnSinkAvailable(
+    mojom::RemotingSinkMetadataPtr metadata) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  if (success) {
-    if (remote_rendering_started_) {
-      metrics_recorder_.DidStartSession();
-      DCHECK(client_);
-      client_->SwitchToRemoteRenderer(session_->sink_name());
-    } else {
-      session_->StopRemoting(this);
-    }
-  } else {
-    VLOG(1) << "Failed to start remoting.";
-    remote_rendering_started_ = false;
+  sink_metadata_ = *metadata;
+
+  if (!HasFeatureCapability(mojom::RemotingSinkFeature::RENDERING)) {
+    OnSinkGone();
+    return;
+  }
+  UpdateAndMaybeSwitch(SINK_AVAILABLE, UNKNOWN_STOP_TRIGGER);
+}
+
+void RendererController::OnSinkGone() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  // Prevent the clients to start any future remoting sessions. Won't affect the
+  // behavior of the currently-running session (if any).
+  sink_metadata_ = mojom::RemotingSinkMetadata();
+}
+
+void RendererController::OnStarted() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  VLOG(1) << "Remoting started successively.";
+  if (remote_rendering_started_) {
+    metrics_recorder_.DidStartSession();
+    DCHECK(client_);
+    client_->SwitchToRemoteRenderer(sink_metadata_.friendly_name);
+  }
+}
+
+void RendererController::OnStartFailed(mojom::RemotingStartFailReason reason) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  VLOG(1) << "Failed to start remoting:" << reason;
+  if (remote_rendering_started_) {
     metrics_recorder_.WillStopSession(START_RACE);
+    remote_rendering_started_ = false;
   }
 }
 
-void RendererController::OnSessionStateChanged() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  UpdateFromSessionState(SINK_AVAILABLE,
-                         GetStopTrigger(session_->get_last_stop_reason()));
-}
-
-void RendererController::UpdateFromSessionState(StartTrigger start_trigger,
-                                                StopTrigger stop_trigger) {
-  VLOG(1) << "UpdateFromSessionState: " << session_->state();
-  UpdateAndMaybeSwitch(start_trigger, stop_trigger);
-}
-
-bool RendererController::IsRemoteSinkAvailable() const {
+void RendererController::OnStopped(mojom::RemotingStopReason reason) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  switch (session_->state()) {
-    case SharedSession::SESSION_CAN_START:
-    case SharedSession::SESSION_STARTING:
-    case SharedSession::SESSION_STARTED:
-      return true;
-    case SharedSession::SESSION_UNAVAILABLE:
-    case SharedSession::SESSION_STOPPING:
-    case SharedSession::SESSION_PERMANENTLY_STOPPED:
-      return false;
+  VLOG(1) << "Remoting stopped: " << reason;
+  OnSinkGone();
+  UpdateAndMaybeSwitch(UNKNOWN_START_TRIGGER, GetStopTrigger(reason));
+}
+
+void RendererController::OnMessageFromSink(
+    const std::vector<uint8_t>& message) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
+  std::unique_ptr<pb::RpcMessage> rpc(new pb::RpcMessage());
+  if (!rpc->ParseFromArray(message.data(), message.size())) {
+    VLOG(1) << "corrupted Rpc message";
+    OnSinkGone();
+    UpdateAndMaybeSwitch(UNKNOWN_START_TRIGGER, RPC_INVALID);
+    return;
   }
 
-  NOTREACHED();
-  return false;  // To suppress compiler warning on Windows.
+  rpc_broker_.ProcessMessageFromRemote(std::move(rpc));
+#endif
 }
 
 void RendererController::OnBecameDominantVisibleContent(bool is_dominant) {
@@ -179,20 +209,6 @@
   UpdateAndMaybeSwitch(BECAME_DOMINANT_CONTENT, BECAME_AUXILIARY_CONTENT);
 }
 
-void RendererController::OnSetCdm(CdmContext* cdm_context) {
-  VLOG(2) << __func__;
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  auto* remoting_cdm_context = RemotingCdmContext::From(cdm_context);
-  if (!remoting_cdm_context)
-    return;
-
-  session_->RemoveClient(this);
-  session_ = remoting_cdm_context->GetSharedSession();
-  session_->AddClient(this);
-  UpdateFromSessionState(CDM_READY, DECRYPTION_ERROR);
-}
-
 void RendererController::OnRemotePlaybackDisabled(bool disabled) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
@@ -202,21 +218,48 @@
 }
 
 #if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-base::WeakPtr<RpcBroker> RendererController::GetRpcBroker() const {
+base::WeakPtr<RpcBroker> RendererController::GetRpcBroker() {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  return session_->rpc_broker()->GetWeakPtr();
+  return rpc_broker_.GetWeakPtr();
 }
 #endif
 
 void RendererController::StartDataPipe(
     std::unique_ptr<mojo::DataPipe> audio_data_pipe,
     std::unique_ptr<mojo::DataPipe> video_data_pipe,
-    const SharedSession::DataPipeStartCallback& done_callback) {
+    DataPipeStartCallback done_callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(!done_callback.is_null());
 
-  session_->StartDataPipe(std::move(audio_data_pipe),
-                          std::move(video_data_pipe), done_callback);
+  bool audio = audio_data_pipe != nullptr;
+  bool video = video_data_pipe != nullptr;
+  if (!audio && !video) {
+    LOG(ERROR) << "No audio nor video to establish data pipe";
+    std::move(done_callback)
+        .Run(mojom::RemotingDataStreamSenderPtrInfo(),
+             mojom::RemotingDataStreamSenderPtrInfo(),
+             mojo::ScopedDataPipeProducerHandle(),
+             mojo::ScopedDataPipeProducerHandle());
+    return;
+  }
+  mojom::RemotingDataStreamSenderPtr audio_stream_sender;
+  mojom::RemotingDataStreamSenderPtr video_stream_sender;
+  remoter_->StartDataStreams(audio ? std::move(audio_data_pipe->consumer_handle)
+                                   : mojo::ScopedDataPipeConsumerHandle(),
+                             video ? std::move(video_data_pipe->consumer_handle)
+                                   : mojo::ScopedDataPipeConsumerHandle(),
+                             audio ? mojo::MakeRequest(&audio_stream_sender)
+                                   : mojom::RemotingDataStreamSenderRequest(),
+                             video ? mojo::MakeRequest(&video_stream_sender)
+                                   : mojom::RemotingDataStreamSenderRequest());
+  std::move(done_callback)
+      .Run(audio_stream_sender.PassInterface(),
+           video_stream_sender.PassInterface(),
+           audio ? std::move(audio_data_pipe->producer_handle)
+                 : mojo::ScopedDataPipeProducerHandle(),
+           video ? std::move(video_data_pipe->producer_handle)
+                 : mojo::ScopedDataPipeProducerHandle());
 }
 
 void RendererController::OnMetadataChanged(const PipelineMetadata& metadata) {
@@ -229,12 +272,6 @@
   const bool is_video_codec_supported = has_video() && IsVideoCodecSupported();
   metrics_recorder_.OnPipelineMetadataChanged(metadata);
 
-  is_encrypted_ = false;
-  if (has_video())
-    is_encrypted_ |= metadata.video_decoder_config.is_encrypted();
-  if (has_audio())
-    is_encrypted_ |= metadata.audio_decoder_config.is_encrypted();
-
   StartTrigger start_trigger = UNKNOWN_START_TRIGGER;
   if (!was_audio_codec_supported && is_audio_codec_supported)
     start_trigger = SUPPORTED_AUDIO_CODEC;
@@ -299,19 +336,19 @@
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(has_video());
 
+  // Media Remoting doesn't support encrypted media.
+  if (pipeline_metadata_.video_decoder_config.is_encrypted())
+    return false;
+
   switch (pipeline_metadata_.video_decoder_config.codec()) {
     case VideoCodec::kCodecH264:
-      return session_->HasVideoCapability(
-          mojom::RemotingSinkVideoCapability::CODEC_H264);
+      return HasVideoCapability(mojom::RemotingSinkVideoCapability::CODEC_H264);
     case VideoCodec::kCodecVP8:
-      return session_->HasVideoCapability(
-          mojom::RemotingSinkVideoCapability::CODEC_VP8);
+      return HasVideoCapability(mojom::RemotingSinkVideoCapability::CODEC_VP8);
     case VideoCodec::kCodecVP9:
-      return session_->HasVideoCapability(
-          mojom::RemotingSinkVideoCapability::CODEC_VP9);
+      return HasVideoCapability(mojom::RemotingSinkVideoCapability::CODEC_VP9);
     case VideoCodec::kCodecHEVC:
-      return session_->HasVideoCapability(
-          mojom::RemotingSinkVideoCapability::CODEC_HEVC);
+      return HasVideoCapability(mojom::RemotingSinkVideoCapability::CODEC_HEVC);
     default:
       VLOG(2) << "Remoting does not support video codec: "
               << pipeline_metadata_.video_decoder_config.codec();
@@ -323,13 +360,15 @@
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(has_audio());
 
+  // Media Remoting doesn't support encrypted media.
+  if (pipeline_metadata_.audio_decoder_config.is_encrypted())
+    return false;
+
   switch (pipeline_metadata_.audio_decoder_config.codec()) {
     case AudioCodec::kCodecAAC:
-      return session_->HasAudioCapability(
-          mojom::RemotingSinkAudioCapability::CODEC_AAC);
+      return HasAudioCapability(mojom::RemotingSinkAudioCapability::CODEC_AAC);
     case AudioCodec::kCodecOpus:
-      return session_->HasAudioCapability(
-          mojom::RemotingSinkAudioCapability::CODEC_OPUS);
+      return HasAudioCapability(mojom::RemotingSinkAudioCapability::CODEC_OPUS);
     case AudioCodec::kCodecMP3:
     case AudioCodec::kCodecPCM:
     case AudioCodec::kCodecVorbis:
@@ -344,7 +383,7 @@
     case AudioCodec::kCodecPCM_ALAW:
     case AudioCodec::kCodecALAC:
     case AudioCodec::kCodecAC3:
-      return session_->HasAudioCapability(
+      return HasAudioCapability(
           mojom::RemotingSinkAudioCapability::CODEC_BASELINE_SET);
     default:
       VLOG(2) << "Remoting does not support audio codec: "
@@ -376,36 +415,9 @@
     return false;  // No way to switch to the remoting renderer.
   }
 
-  const SharedSession::SessionState state = session_->state();
-  if (is_encrypted_) {
-    // Due to technical limitations when playing encrypted content, once a
-    // remoting session has been started, playback cannot be resumed locally
-    // without reloading the page, so leave the CourierRenderer in-place to
-    // avoid having the default renderer attempt and fail to play the content.
-    //
-    // TODO(miu): Revisit this once more of the encrypted-remoting impl is
-    // in-place. For example, this will prevent metrics from recording session
-    // stop reasons.
-    return state == SharedSession::SESSION_STARTED ||
-           state == SharedSession::SESSION_STOPPING ||
-           state == SharedSession::SESSION_PERMANENTLY_STOPPED;
-  }
-
   if (permanently_disable_remoting_)
     return false;
 
-  switch (state) {
-    case SharedSession::SESSION_UNAVAILABLE:
-      return false;  // Cannot remote media without a remote sink.
-    case SharedSession::SESSION_CAN_START:
-    case SharedSession::SESSION_STARTING:
-    case SharedSession::SESSION_STARTED:
-      break;  // Media remoting is possible, assuming other requirments are met.
-    case SharedSession::SESSION_STOPPING:
-    case SharedSession::SESSION_PERMANENTLY_STOPPED:
-      return false;  // Use local rendering after stopping remoting.
-  }
-
   if (!IsAudioOrVideoSupported())
     return false;
 
@@ -433,15 +445,13 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   bool should_be_remoting = CanBeRemoting();
-  if (!is_encrypted_ && client_)
+  if (client_)
     client_->ActivateViewportIntersectionMonitoring(should_be_remoting);
 
-  // Normally, being the dominant visible content is the signal that starts
-  // remote rendering. However, current technical limitations require encrypted
-  // content be remoted without waiting for a user signal.
-  if (!is_encrypted_)
-    should_be_remoting &=
-        (is_dominant_content_ && !encountered_renderer_fatal_error_);
+  // Being the dominant visible content is the signal that starts remote
+  // rendering.
+  should_be_remoting &=
+      (is_dominant_content_ && !encountered_renderer_fatal_error_);
 
   if ((remote_rendering_started_ ||
        delayed_start_stability_timer_.IsRunning()) == should_be_remoting)
@@ -449,12 +459,6 @@
 
   DCHECK(client_);
 
-  if (is_encrypted_) {
-    DCHECK(should_be_remoting);
-    StartRemoting(start_trigger);
-    return;
-  }
-
   // Only switch to remoting when media is playing. Since the renderer is
   // created when video starts loading/playing, receiver will display a black
   // screen before video starts playing if switching to remoting when paused.
@@ -470,16 +474,11 @@
     CancelDelayedStart();
   } else {
     remote_rendering_started_ = false;
-    // For encrypted content, it's only valid to switch to remoting renderer,
-    // and never back to the local renderer. The RemotingCdmController will
-    // force-stop the session when remoting has ended; so no need to call
-    // StopRemoting() from here.
-    DCHECK(!is_encrypted_);
     DCHECK_NE(UNKNOWN_STOP_TRIGGER, stop_trigger);
     metrics_recorder_.WillStopSession(stop_trigger);
     client_->SwitchToLocalRenderer(GetSwitchReason(stop_trigger));
     VLOG(2) << "Request to stop remoting: stop_trigger=" << stop_trigger;
-    session_->StopRemoting(this);
+    remoter_->Stop(mojom::RemotingStopReason::LOCAL_PLAYBACK);
   }
 }
 
@@ -487,12 +486,11 @@
     StartTrigger start_trigger) {
   DCHECK(!delayed_start_stability_timer_.IsRunning());
   DCHECK(!remote_rendering_started_);
-  DCHECK(!is_encrypted_);
   delayed_start_stability_timer_.Start(
       FROM_HERE, kDelayedStart,
-      base::Bind(&RendererController::OnDelayedStartTimerFired,
-                 base::Unretained(this), start_trigger,
-                 client_->DecodedFrameCount(), clock_->NowTicks()));
+      base::BindRepeating(&RendererController::OnDelayedStartTimerFired,
+                          base::Unretained(this), start_trigger,
+                          client_->DecodedFrameCount(), clock_->NowTicks()));
 }
 
 void RendererController::CancelDelayedStart() {
@@ -505,7 +503,6 @@
     base::TimeTicks delayed_start_time) {
   DCHECK(is_dominant_content_);
   DCHECK(!remote_rendering_started_);
-  DCHECK(!is_encrypted_);
 
   base::TimeDelta elapsed = clock_->NowTicks() - delayed_start_time;
   DCHECK(!elapsed.is_zero());
@@ -517,8 +514,7 @@
         frame_rate * pipeline_metadata_.natural_size.GetArea();
     if ((pixel_per_sec > kPixelPerSec4K) ||
         ((pixel_per_sec > kPixelPerSec2K) &&
-         !session_->HasVideoCapability(
-             mojom::RemotingSinkVideoCapability::SUPPORT_4K))) {
+         !HasVideoCapability(mojom::RemotingSinkVideoCapability::SUPPORT_4K))) {
       VLOG(1) << "Media remoting is not supported: frame_rate = " << frame_rate
               << " resolution = " << pipeline_metadata_.natural_size.ToString();
       permanently_disable_remoting_ = true;
@@ -526,21 +522,13 @@
     }
   }
 
-  StartRemoting(start_trigger);
-}
-
-void RendererController::StartRemoting(StartTrigger start_trigger) {
   DCHECK(client_);
   remote_rendering_started_ = true;
-  if (session_->state() == SharedSession::SESSION_PERMANENTLY_STOPPED) {
-    client_->SwitchToRemoteRenderer(session_->sink_name());
-    return;
-  }
   DCHECK_NE(UNKNOWN_START_TRIGGER, start_trigger);
   metrics_recorder_.WillStartSession(start_trigger);
   // |MediaObserverClient::SwitchToRemoteRenderer()| will be called after
   // remoting is started successfully.
-  session_->StartRemoting(this);
+  remoter_->Start();
 }
 
 void RendererController::OnRendererFatalError(StopTrigger stop_trigger) {
@@ -561,8 +549,42 @@
   DCHECK(!client_);
 
   client_ = client;
-  if (!is_encrypted_)
-    client_->ActivateViewportIntersectionMonitoring(CanBeRemoting());
+  client_->ActivateViewportIntersectionMonitoring(CanBeRemoting());
+}
+
+bool RendererController::HasVideoCapability(
+    mojom::RemotingSinkVideoCapability capability) const {
+#if defined(OS_ANDROID)
+  return true;
+#else
+  return std::find(std::begin(sink_metadata_.video_capabilities),
+                   std::end(sink_metadata_.video_capabilities),
+                   capability) != std::end(sink_metadata_.video_capabilities);
+#endif
+}
+
+bool RendererController::HasAudioCapability(
+    mojom::RemotingSinkAudioCapability capability) const {
+#if defined(OS_ANDROID)
+  return true;
+#else
+  return std::find(std::begin(sink_metadata_.audio_capabilities),
+                   std::end(sink_metadata_.audio_capabilities),
+                   capability) != std::end(sink_metadata_.audio_capabilities);
+#endif
+}
+
+bool RendererController::HasFeatureCapability(
+    mojom::RemotingSinkFeature capability) const {
+  return std::find(std::begin(sink_metadata_.features),
+                   std::end(sink_metadata_.features),
+                   capability) != std::end(sink_metadata_.features);
+}
+
+void RendererController::SendMessageToSink(
+    std::unique_ptr<std::vector<uint8_t>> message) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  remoter_->SendMessageToSink(*message);
 }
 
 }  // namespace remoting
diff --git a/media/remoting/renderer_controller.h b/media/remoting/renderer_controller.h
index db2ca77..ea1c6868 100644
--- a/media/remoting/renderer_controller.h
+++ b/media/remoting/renderer_controller.h
@@ -10,12 +10,18 @@
 #include "base/callback.h"
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
+#include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "build/buildflag.h"
 #include "media/base/media_observer.h"
 #include "media/media_features.h"
+#include "media/mojo/interfaces/remoting.mojom.h"
 #include "media/remoting/metrics.h"
-#include "media/remoting/shared_session.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
+#include "media/remoting/rpc_broker.h"  // nogncheck
+#endif
 
 namespace base {
 class TickClock;
@@ -25,26 +31,25 @@
 
 namespace remoting {
 
-class RpcBroker;
-
-// This class:
-// 1) Implements the SharedSession::Client;
-// 2) Monitors player events as a MediaObserver;
-// 3) May trigger the switch of the media renderer between local playback
-// and remoting.
-class RendererController final : public SharedSession::Client,
+// This class monitors player events as a MediaObserver and may trigger the
+// switch of the media renderer between local playback and remoting.
+class RendererController final : public mojom::RemotingSource,
                                  public MediaObserver {
  public:
-  explicit RendererController(scoped_refptr<SharedSession> session);
+  RendererController(mojom::RemotingSourceRequest source_request,
+                     mojom::RemoterPtr remoter);
   ~RendererController() override;
 
-  // SharedSession::Client implementation.
-  void OnStarted(bool success) override;
-  void OnSessionStateChanged() override;
+  // mojom::RemotingSource implementations.
+  void OnSinkAvailable(mojom::RemotingSinkMetadataPtr metadata) override;
+  void OnSinkGone() override;
+  void OnStarted() override;
+  void OnStartFailed(mojom::RemotingStartFailReason reason) override;
+  void OnMessageFromSink(const std::vector<uint8_t>& message) override;
+  void OnStopped(mojom::RemotingStopReason reason) override;
 
   // MediaObserver implementation.
   void OnBecameDominantVisibleContent(bool is_dominant) override;
-  void OnSetCdm(CdmContext* cdm_context) override;
   void OnMetadataChanged(const PipelineMetadata& metadata) override;
   void OnRemotePlaybackDisabled(bool disabled) override;
   void OnPlaying() override;
@@ -63,15 +68,17 @@
     return remote_rendering_started_;
   }
 
+  using DataPipeStartCallback =
+      base::OnceCallback<void(mojom::RemotingDataStreamSenderPtrInfo audio,
+                              mojom::RemotingDataStreamSenderPtrInfo video,
+                              mojo::ScopedDataPipeProducerHandle audio_handle,
+                              mojo::ScopedDataPipeProducerHandle video_handle)>;
   void StartDataPipe(std::unique_ptr<mojo::DataPipe> audio_data_pipe,
                      std::unique_ptr<mojo::DataPipe> video_data_pipe,
-                     const SharedSession::DataPipeStartCallback& done_callback);
-
-  // Used by CourierRenderer to query the session state.
-  SharedSession* session() const { return session_.get(); }
+                     DataPipeStartCallback done_callback);
 
 #if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-  base::WeakPtr<RpcBroker> GetRpcBroker() const;
+  base::WeakPtr<RpcBroker> GetRpcBroker();
 #endif
 
   // Called by CourierRenderer when it encountered a fatal error. This will
@@ -101,7 +108,6 @@
 
   bool IsVideoCodecSupported() const;
   bool IsAudioCodecSupported() const;
-  bool IsRemoteSinkAvailable() const;
   bool IsAudioOrVideoSupported() const;
 
   // Returns true if all of the technical requirements for the media pipeline
@@ -133,15 +139,29 @@
                                 unsigned decoded_frame_count_before_delay,
                                 base::TimeTicks delayed_start_time);
 
-  // Helper to request the media pipeline switch to the remoting renderer.
-  void StartRemoting(StartTrigger start_trigger);
+  // Queries on remoting sink capabilities.
+  bool HasVideoCapability(mojom::RemotingSinkVideoCapability capability) const;
+  bool HasAudioCapability(mojom::RemotingSinkAudioCapability capability) const;
+  bool HasFeatureCapability(mojom::RemotingSinkFeature capability) const;
+
+  // Callback from RpcBroker when sending message to remote sink.
+  void SendMessageToSink(std::unique_ptr<std::vector<uint8_t>> message);
+
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
+  // Handles dispatching of incoming and outgoing RPC messages.
+  RpcBroker rpc_broker_;
+#endif
+
+  const mojo::Binding<mojom::RemotingSource> binding_;
+  const mojom::RemoterPtr remoter_;
+
+  // When the sink is available for remoting, this describes its metadata. When
+  // not available, this is empty. Updated by OnSinkAvailable/Gone().
+  mojom::RemotingSinkMetadata sink_metadata_;
 
   // Indicates whether remoting is started.
   bool remote_rendering_started_ = false;
 
-  // Indicates whether audio or video is encrypted.
-  bool is_encrypted_ = false;
-
   // Indicates whether remote playback is currently disabled. This starts out as
   // true, and should be updated at least once via a call to
   // OnRemotePlaybackDisabled() at some point in the future. A web page
@@ -171,10 +191,6 @@
   // controller.
   bool permanently_disable_remoting_ = false;
 
-  // This is initially the SharedSession passed to the ctor, and might be
-  // replaced with a different instance later if OnSetCdm() is called.
-  scoped_refptr<SharedSession> session_;
-
   // This is used to check all the methods are called on the current thread in
   // debug builds.
   base::ThreadChecker thread_checker_;
diff --git a/media/remoting/renderer_controller_unittest.cc b/media/remoting/renderer_controller_unittest.cc
index 3e66955..8bac585c 100644
--- a/media/remoting/renderer_controller_unittest.cc
+++ b/media/remoting/renderer_controller_unittest.cc
@@ -18,7 +18,6 @@
 #include "media/base/test_helpers.h"
 #include "media/base/video_decoder_config.h"
 #include "media/remoting/fake_remoter.h"
-#include "media/remoting/remoting_cdm.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -37,14 +36,6 @@
   return data;
 }
 
-PipelineMetadata EncryptedMetadata() {
-  PipelineMetadata data;
-  data.has_audio = true;
-  data.has_video = true;
-  data.video_decoder_config = TestVideoConfig::NormalEncrypted();
-  return data;
-}
-
 const std::string kDefaultReceiver = "TestingChromeCast";
 
 mojom::RemotingSinkMetadata GetDefaultSinkMetadata(bool enable) {
@@ -71,7 +62,9 @@
 class RendererControllerTest : public ::testing::Test,
                                public MediaObserverClient {
  public:
-  RendererControllerTest() = default;
+  RendererControllerTest()
+      : controller_(FakeRemoterFactory::CreateController(false)) {}
+
   ~RendererControllerTest() override = default;
 
   void TearDown() final { RunUntilIdle(); }
@@ -105,12 +98,10 @@
   void CreateCdm(bool is_remoting) { is_remoting_cdm_ = is_remoting; }
 
   void InitializeControllerAndBecomeDominant(
-      const scoped_refptr<SharedSession> shared_session,
       const PipelineMetadata& pipeline_metadata,
       const mojom::RemotingSinkMetadata& sink_metadata) {
     EXPECT_FALSE(is_rendering_remotely_);
     EXPECT_TRUE(sink_name_.empty());
-    controller_ = std::make_unique<RendererController>(shared_session);
     controller_->clock_ = &clock_;
     clock_.Advance(base::TimeDelta::FromSeconds(1));
     controller_->SetClient(this);
@@ -118,7 +109,7 @@
     EXPECT_FALSE(is_rendering_remotely_);
     EXPECT_FALSE(activate_viewport_intersection_monitoring_);
     EXPECT_FALSE(disable_pipeline_suspend_);
-    shared_session->OnSinkAvailable(sink_metadata.Clone());
+    controller_->OnSinkAvailable(sink_metadata.Clone());
     RunUntilIdle();
     EXPECT_FALSE(is_rendering_remotely_);
     EXPECT_FALSE(disable_pipeline_suspend_);
@@ -195,10 +186,7 @@
 };
 
 TEST_F(RendererControllerTest, ToggleRendererOnDominantChange) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
                                         GetDefaultSinkMetadata(true));
   DelayedStartEnds();
   RunUntilIdle();
@@ -210,38 +198,9 @@
   ExpectInLocalRendering();
 }
 
-TEST_F(RendererControllerTest, ToggleRendererOnSinkCapabilities) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
-                                        GetDefaultSinkMetadata(false));
-  // An available sink that does not support remote rendering should not cause
-  // the controller to toggle remote rendering on.
-  ExpectInLocalRendering();
-  shared_session->OnSinkGone();  // Bye-bye useless sink!
-  RunUntilIdle();
-  ExpectInLocalRendering();
-  // A sink that *does* support remote rendering *does* cause the controller to
-  // toggle remote rendering on.
-  shared_session->OnSinkAvailable(GetDefaultSinkMetadata(true).Clone());
-  RunUntilIdle();
-  EXPECT_TRUE(activate_viewport_intersection_monitoring_);
-  EXPECT_FALSE(is_rendering_remotely_);
-  controller_->OnBecameDominantVisibleContent(true);
-  RunUntilIdle();
-  ExpectInDelayedStart();
-  DelayedStartEnds();
-  RunUntilIdle();
-  ExpectInRemoting();  // All requirements now satisfied.
-}
-
 TEST_F(RendererControllerTest, ToggleRendererOnDisableChange) {
   EXPECT_FALSE(is_rendering_remotely_);
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
                                         GetDefaultSinkMetadata(true));
   ExpectInDelayedStart();
   DelayedStartEnds();
@@ -256,34 +215,51 @@
 }
 
 TEST_F(RendererControllerTest, NotStartForShortContent) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
   duration_in_sec_ = 30;
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
                                         GetDefaultSinkMetadata(true));
   ExpectInLocalRendering();
 }
 
 #if !defined(OS_ANDROID)
 
+TEST_F(RendererControllerTest, ToggleRendererOnSinkCapabilities) {
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
+                                        GetDefaultSinkMetadata(false));
+  // An available sink that does not support remote rendering should not cause
+  // the controller to toggle remote rendering on.
+  ExpectInLocalRendering();
+  controller_->OnSinkGone();  // Bye-bye useless sink!
+  RunUntilIdle();
+  ExpectInLocalRendering();
+  // A sink that *does* support remote rendering *does* cause the controller to
+  // toggle remote rendering on.
+  controller_->OnSinkAvailable(GetDefaultSinkMetadata(true).Clone());
+  RunUntilIdle();
+  EXPECT_TRUE(activate_viewport_intersection_monitoring_);
+  EXPECT_FALSE(is_rendering_remotely_);
+  controller_->OnBecameDominantVisibleContent(true);
+  RunUntilIdle();
+  ExpectInDelayedStart();
+  DelayedStartEnds();
+  RunUntilIdle();
+  ExpectInRemoting();  // All requirements now satisfied.
+}
+
 TEST_F(RendererControllerTest, WithVP9VideoCodec) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP9),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP9),
                                         GetDefaultSinkMetadata(true));
   // An available sink that does not support VP9 video codec should not cause
   // the controller to toggle remote rendering on.
   ExpectInLocalRendering();
 
-  shared_session->OnSinkGone();  // Bye-bye useless sink!
+  controller_->OnSinkGone();  // Bye-bye useless sink!
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
   sink_metadata.video_capabilities.push_back(
       mojom::RemotingSinkVideoCapability::CODEC_VP9);
   // A sink that *does* support VP9 video codec *does* cause the controller to
   // toggle remote rendering on.
-  shared_session->OnSinkAvailable(sink_metadata.Clone());
+  controller_->OnSinkAvailable(sink_metadata.Clone());
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds();
@@ -292,16 +268,13 @@
 }
 
 TEST_F(RendererControllerTest, WithHEVCVideoCodec) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecHEVC),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecHEVC),
                                         GetDefaultSinkMetadata(true));
   // An available sink that does not support HEVC video codec should not cause
   // the controller to toggle remote rendering on.
   ExpectInLocalRendering();
 
-  shared_session->OnSinkGone();  // Bye-bye useless sink!
+  controller_->OnSinkGone();  // Bye-bye useless sink!
   RunUntilIdle();
   ExpectInLocalRendering();
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
@@ -309,7 +282,7 @@
       mojom::RemotingSinkVideoCapability::CODEC_HEVC);
   // A sink that *does* support HEVC video codec *does* cause the controller to
   // toggle remote rendering on.
-  shared_session->OnSinkAvailable(sink_metadata.Clone());
+  controller_->OnSinkAvailable(sink_metadata.Clone());
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds();
@@ -318,20 +291,18 @@
 }
 
 TEST_F(RendererControllerTest, WithAACAudioCodec) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
   const AudioDecoderConfig audio_config = AudioDecoderConfig(
       AudioCodec::kCodecAAC, kSampleFormatPlanarF32, CHANNEL_LAYOUT_STEREO,
       44100, EmptyExtraData(), Unencrypted());
   PipelineMetadata pipeline_metadata = DefaultMetadata(VideoCodec::kCodecVP8);
   pipeline_metadata.audio_decoder_config = audio_config;
-  InitializeControllerAndBecomeDominant(shared_session, pipeline_metadata,
+  InitializeControllerAndBecomeDominant(pipeline_metadata,
                                         GetDefaultSinkMetadata(true));
   // An available sink that does not support AAC audio codec should not cause
   // the controller to toggle remote rendering on.
   ExpectInLocalRendering();
 
-  shared_session->OnSinkGone();  // Bye-bye useless sink!
+  controller_->OnSinkGone();  // Bye-bye useless sink!
   RunUntilIdle();
   ExpectInLocalRendering();
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
@@ -339,7 +310,7 @@
       mojom::RemotingSinkAudioCapability::CODEC_AAC);
   // A sink that *does* support AAC audio codec *does* cause the controller to
   // toggle remote rendering on.
-  shared_session->OnSinkAvailable(sink_metadata.Clone());
+  controller_->OnSinkAvailable(sink_metadata.Clone());
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds();
@@ -348,27 +319,25 @@
 }
 
 TEST_F(RendererControllerTest, WithOpusAudioCodec) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
   const AudioDecoderConfig audio_config = AudioDecoderConfig(
       AudioCodec::kCodecOpus, kSampleFormatPlanarF32, CHANNEL_LAYOUT_STEREO,
       44100, EmptyExtraData(), Unencrypted());
   PipelineMetadata pipeline_metadata = DefaultMetadata(VideoCodec::kCodecVP8);
   pipeline_metadata.audio_decoder_config = audio_config;
-  InitializeControllerAndBecomeDominant(shared_session, pipeline_metadata,
+  InitializeControllerAndBecomeDominant(pipeline_metadata,
                                         GetDefaultSinkMetadata(true));
   // An available sink that does not support Opus audio codec should not cause
   // the controller to toggle remote rendering on.
   ExpectInLocalRendering();
 
-  shared_session->OnSinkGone();  // Bye-bye useless sink!
+  controller_->OnSinkGone();  // Bye-bye useless sink!
   RunUntilIdle();
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
   sink_metadata.audio_capabilities.push_back(
       mojom::RemotingSinkAudioCapability::CODEC_OPUS);
   // A sink that *does* support Opus audio codec *does* cause the controller to
   // toggle remote rendering on.
-  shared_session->OnSinkAvailable(sink_metadata.Clone());
+  controller_->OnSinkAvailable(sink_metadata.Clone());
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds();
@@ -377,10 +346,7 @@
 }
 
 TEST_F(RendererControllerTest, StartFailedWithHighFrameRate) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
                                         GetDefaultSinkMetadata(true));
   RunUntilIdle();
   ExpectInDelayedStart();
@@ -390,13 +356,11 @@
 }
 
 TEST_F(RendererControllerTest, StartSuccessWithHighFrameRate) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
   sink_metadata.video_capabilities.push_back(
       mojom::RemotingSinkVideoCapability::SUPPORT_4K);
-  InitializeControllerAndBecomeDominant(
-      shared_session, DefaultMetadata(VideoCodec::kCodecVP8), sink_metadata);
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
+                                        sink_metadata);
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds(60);
@@ -405,11 +369,9 @@
 }
 
 TEST_F(RendererControllerTest, PacingTooSlowly) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
   mojom::RemotingSinkMetadata sink_metadata = GetDefaultSinkMetadata(true);
-  InitializeControllerAndBecomeDominant(
-      shared_session, DefaultMetadata(VideoCodec::kCodecVP8), sink_metadata);
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
+                                        sink_metadata);
   RunUntilIdle();
   ExpectInDelayedStart();
   DelayedStartEnds(false);
@@ -418,7 +380,7 @@
   controller_->OnRendererFatalError(StopTrigger::PACING_TOO_SLOWLY);
   RunUntilIdle();
   ExpectInLocalRendering();
-  shared_session->OnSinkAvailable(sink_metadata.Clone());
+  controller_->OnSinkAvailable(sink_metadata.Clone());
   RunUntilIdle();
   controller_->OnBecameDominantVisibleContent(false);
   RunUntilIdle();
@@ -431,10 +393,8 @@
 #endif  // OS_ANDROID
 
 TEST_F(RendererControllerTest, StartFailed) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(true);
-  InitializeControllerAndBecomeDominant(shared_session,
-                                        DefaultMetadata(VideoCodec::kCodecVP8),
+  controller_ = FakeRemoterFactory::CreateController(true);
+  InitializeControllerAndBecomeDominant(DefaultMetadata(VideoCodec::kCodecVP8),
                                         GetDefaultSinkMetadata(true));
   RunUntilIdle();
   ExpectInDelayedStart();
@@ -443,120 +403,5 @@
   ExpectInLocalRendering();
 }
 
-TEST_F(RendererControllerTest, EncryptedWithRemotingCdm) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session, EncryptedMetadata(),
-                                        GetDefaultSinkMetadata(true));
-  EXPECT_FALSE(is_rendering_remotely_);
-
-  const scoped_refptr<SharedSession> cdm_shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  std::unique_ptr<RemotingCdmController> cdm_controller =
-      std::make_unique<RemotingCdmController>(cdm_shared_session);
-  cdm_shared_session->OnSinkAvailable(GetDefaultSinkMetadata(true).Clone());
-  cdm_controller->ShouldCreateRemotingCdm(
-      base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
-  RunUntilIdle();
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_TRUE(is_remoting_cdm_);
-
-  // Create a RemotingCdm with |cdm_controller|.
-  const scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
-      std::string(), GURL(), CdmConfig(), SessionMessageCB(), SessionClosedCB(),
-      SessionKeysChangeCB(), SessionExpirationUpdateCB(), CdmCreatedCB(),
-      std::move(cdm_controller));
-  std::unique_ptr<RemotingCdmContext> remoting_cdm_context =
-      std::make_unique<RemotingCdmContext>(remoting_cdm.get());
-  controller_->OnSetCdm(remoting_cdm_context.get());
-  RunUntilIdle();
-  EXPECT_TRUE(is_rendering_remotely_);
-
-  // For encrypted contents, becoming/exiting dominant has no effect.
-  controller_->OnBecameDominantVisibleContent(true);
-  RunUntilIdle();
-  EXPECT_TRUE(is_rendering_remotely_);
-  EXPECT_FALSE(IsInDelayedStart());
-  controller_->OnBecameDominantVisibleContent(false);
-  RunUntilIdle();
-  EXPECT_TRUE(is_rendering_remotely_);
-  EXPECT_FALSE(IsInDelayedStart());
-
-  EXPECT_NE(SharedSession::SESSION_PERMANENTLY_STOPPED,
-            controller_->session()->state());
-  cdm_shared_session->OnSinkGone();
-  cdm_shared_session->OnStopped(mojom::RemotingStopReason::ROUTE_TERMINATED);
-  RunUntilIdle();
-  EXPECT_EQ(SharedSession::SESSION_PERMANENTLY_STOPPED,
-            controller_->session()->state());
-  // Don't switch renderer in this case. Still using the remoting renderer to
-  // show the failure interstitial.
-  EXPECT_TRUE(is_rendering_remotely_);
-}
-
-TEST_F(RendererControllerTest, EncryptedWithLocalCdm) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session, EncryptedMetadata(),
-                                        GetDefaultSinkMetadata(true));
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_FALSE(IsInDelayedStart());
-
-  const scoped_refptr<SharedSession> cdm_shared_session =
-      FakeRemoterFactory::CreateSharedSession(true);
-  std::unique_ptr<RemotingCdmController> cdm_controller =
-      std::make_unique<RemotingCdmController>(cdm_shared_session);
-  cdm_shared_session->OnSinkAvailable(GetDefaultSinkMetadata(true).Clone());
-  cdm_controller->ShouldCreateRemotingCdm(
-      base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
-  RunUntilIdle();
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_FALSE(is_remoting_cdm_);
-  EXPECT_FALSE(IsInDelayedStart());
-}
-
-TEST_F(RendererControllerTest, EncryptedWithFailedRemotingCdm) {
-  const scoped_refptr<SharedSession> shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  InitializeControllerAndBecomeDominant(shared_session, EncryptedMetadata(),
-                                        GetDefaultSinkMetadata(true));
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_FALSE(IsInDelayedStart());
-
-  const scoped_refptr<SharedSession> cdm_shared_session =
-      FakeRemoterFactory::CreateSharedSession(false);
-  std::unique_ptr<RemotingCdmController> cdm_controller =
-      std::make_unique<RemotingCdmController>(cdm_shared_session);
-  cdm_shared_session->OnSinkAvailable(GetDefaultSinkMetadata(true).Clone());
-  cdm_controller->ShouldCreateRemotingCdm(
-      base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
-  RunUntilIdle();
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_TRUE(is_remoting_cdm_);
-  EXPECT_FALSE(IsInDelayedStart());
-
-  cdm_shared_session->OnSinkGone();
-  cdm_shared_session->OnStopped(mojom::RemotingStopReason::ROUTE_TERMINATED);
-  RunUntilIdle();
-  EXPECT_FALSE(is_rendering_remotely_);
-  EXPECT_NE(SharedSession::SESSION_PERMANENTLY_STOPPED,
-            controller_->session()->state());
-
-  const scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
-      std::string(), GURL(), CdmConfig(), SessionMessageCB(), SessionClosedCB(),
-      SessionKeysChangeCB(), SessionExpirationUpdateCB(), CdmCreatedCB(),
-      std::move(cdm_controller));
-  std::unique_ptr<RemotingCdmContext> remoting_cdm_context =
-      std::make_unique<RemotingCdmContext>(remoting_cdm.get());
-  controller_->OnSetCdm(remoting_cdm_context.get());
-  RunUntilIdle();
-  // Switch to using the remoting renderer, even when the remoting CDM session
-  // was already terminated, to show the failure interstitial.
-  EXPECT_TRUE(is_rendering_remotely_);
-  EXPECT_FALSE(IsInDelayedStart());
-  EXPECT_EQ(SharedSession::SESSION_PERMANENTLY_STOPPED,
-            controller_->session()->state());
-}
-
 }  // namespace remoting
 }  // namespace media
diff --git a/media/remoting/shared_session.cc b/media/remoting/shared_session.cc
deleted file mode 100644
index 45f93a2..0000000
--- a/media/remoting/shared_session.cc
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/shared_session.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "build/build_config.h"
-#include "build/buildflag.h"
-#include "media/media_features.h"
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-#include "media/remoting/proto_utils.h"  // nogncheck
-#endif
-
-namespace media {
-namespace remoting {
-
-SharedSession::SharedSession(mojom::RemotingSourceRequest source_request,
-                             mojom::RemoterPtr remoter)
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-    : rpc_broker_(base::Bind(&SharedSession::SendMessageToSink,
-                             base::Unretained(this))),
-#else
-    :
-#endif
-      binding_(this, std::move(source_request)),
-      remoter_(std::move(remoter)) {
-  DCHECK(remoter_);
-}
-
-SharedSession::~SharedSession() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (!clients_.empty()) {
-    Shutdown();
-    clients_.clear();
-  }
-}
-
-bool SharedSession::HasVideoCapability(
-    mojom::RemotingSinkVideoCapability capability) const {
-#if defined(OS_ANDROID)
-  return true;
-#else
-  return std::find(std::begin(sink_metadata_.video_capabilities),
-                   std::end(sink_metadata_.video_capabilities),
-                   capability) != std::end(sink_metadata_.video_capabilities);
-#endif
-}
-
-bool SharedSession::HasAudioCapability(
-    mojom::RemotingSinkAudioCapability capability) const {
-#if defined(OS_ANDROID)
-  return true;
-#else
-  return std::find(std::begin(sink_metadata_.audio_capabilities),
-                   std::end(sink_metadata_.audio_capabilities),
-                   capability) != std::end(sink_metadata_.audio_capabilities);
-#endif
-}
-
-bool SharedSession::HasFeatureCapability(
-    mojom::RemotingSinkFeature capability) const {
-  return std::find(std::begin(sink_metadata_.features),
-                   std::end(sink_metadata_.features),
-                   capability) != std::end(sink_metadata_.features);
-}
-
-bool SharedSession::IsRemoteDecryptionAvailable() const {
-  return HasFeatureCapability(mojom::RemotingSinkFeature::CONTENT_DECRYPTION);
-}
-
-void SharedSession::OnSinkAvailable(mojom::RemotingSinkMetadataPtr metadata) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  sink_metadata_ = *metadata;
-
-  if (!HasFeatureCapability(mojom::RemotingSinkFeature::RENDERING)) {
-    OnSinkGone();
-    return;
-  }
-  if (state_ == SESSION_UNAVAILABLE)
-    UpdateAndNotifyState(SESSION_CAN_START);
-}
-
-void SharedSession::OnSinkGone() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  // Prevent the clients to start any future remoting sessions. Won't affect the
-  // behavior of the currently-running session (if any).
-  sink_metadata_ = mojom::RemotingSinkMetadata();
-  if (state_ == SESSION_CAN_START)
-    state_ = SESSION_UNAVAILABLE;
-}
-
-void SharedSession::OnStarted() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  VLOG(1) << "Remoting started successively.";
-  if (clients_.empty() || state_ == SESSION_PERMANENTLY_STOPPED ||
-      state_ == SESSION_STOPPING) {
-    for (Client* client : clients_)
-      client->OnStarted(false);
-    return;
-  }
-  for (Client* client : clients_)
-    client->OnStarted(true);
-  state_ = SESSION_STARTED;
-}
-
-void SharedSession::OnStartFailed(mojom::RemotingStartFailReason reason) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  VLOG(1) << "Failed to start remoting:" << reason;
-  for (Client* client : clients_)
-    client->OnStarted(false);
-  if (state_ == SESSION_PERMANENTLY_STOPPED)
-    return;
-  state_ = SESSION_UNAVAILABLE;
-}
-
-void SharedSession::OnStopped(mojom::RemotingStopReason reason) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  VLOG(1) << "Remoting stopped: " << reason;
-  stop_reason_ = reason;
-  if (state_ == SESSION_PERMANENTLY_STOPPED)
-    return;
-  // This call will stop the current remoting session if started.
-  UpdateAndNotifyState(SESSION_UNAVAILABLE);
-}
-
-void SharedSession::OnMessageFromSink(const std::vector<uint8_t>& message) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-  std::unique_ptr<pb::RpcMessage> rpc(new pb::RpcMessage());
-  if (!rpc->ParseFromArray(message.data(), message.size())) {
-    VLOG(1) << "corrupted Rpc message";
-    Shutdown();
-    return;
-  }
-
-  rpc_broker_.ProcessMessageFromRemote(std::move(rpc));
-#endif
-}
-
-void SharedSession::UpdateAndNotifyState(SessionState state) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (state_ == state)
-    return;
-  state_ = state;
-  for (Client* client : clients_)
-    client->OnSessionStateChanged();
-}
-
-void SharedSession::StartRemoting(Client* client) {
-  DCHECK(std::find(clients_.begin(), clients_.end(), client) != clients_.end());
-
-  switch (state_) {
-    case SESSION_CAN_START:
-      remoter_->Start();
-      UpdateAndNotifyState(SESSION_STARTING);
-      break;
-    case SESSION_STARTING:
-      break;
-    case SESSION_STARTED:
-      client->OnStarted(true);
-      break;
-    case SESSION_STOPPING:
-    case SESSION_UNAVAILABLE:
-    case SESSION_PERMANENTLY_STOPPED:
-      client->OnStarted(false);
-      break;
-  }
-}
-
-void SharedSession::StopRemoting(Client* client) {
-  DCHECK(std::find(clients_.begin(), clients_.end(), client) != clients_.end());
-
-  VLOG(1) << "SharedSession::StopRemoting: " << state_;
-
-  if (state_ != SESSION_STARTING && state_ != SESSION_STARTED)
-    return;
-
-  remoter_->Stop(mojom::RemotingStopReason::LOCAL_PLAYBACK);
-  UpdateAndNotifyState(SESSION_STOPPING);
-}
-
-void SharedSession::AddClient(Client* client) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  DCHECK(std::find(clients_.begin(), clients_.end(), client) == clients_.end());
-
-  clients_.push_back(client);
-}
-
-void SharedSession::RemoveClient(Client* client) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  auto it = std::find(clients_.begin(), clients_.end(), client);
-  DCHECK(it != clients_.end());
-
-  clients_.erase(it);
-  if (clients_.empty() &&
-      (state_ == SESSION_STARTED || state_ == SESSION_STARTING)) {
-    remoter_->Stop(mojom::RemotingStopReason::SOURCE_GONE);
-    state_ = SESSION_STOPPING;
-  }
-}
-
-void SharedSession::Shutdown() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (state_ == SESSION_STARTED || state_ == SESSION_STARTING)
-    remoter_->Stop(mojom::RemotingStopReason::UNEXPECTED_FAILURE);
-  UpdateAndNotifyState(SESSION_PERMANENTLY_STOPPED);
-}
-
-void SharedSession::StartDataPipe(
-    std::unique_ptr<mojo::DataPipe> audio_data_pipe,
-    std::unique_ptr<mojo::DataPipe> video_data_pipe,
-    const DataPipeStartCallback& done_callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  DCHECK(!done_callback.is_null());
-
-  bool audio = audio_data_pipe != nullptr;
-  bool video = video_data_pipe != nullptr;
-  if (!audio && !video) {
-    LOG(ERROR) << "No audio nor video to establish data pipe";
-    done_callback.Run(mojom::RemotingDataStreamSenderPtrInfo(),
-                      mojom::RemotingDataStreamSenderPtrInfo(),
-                      mojo::ScopedDataPipeProducerHandle(),
-                      mojo::ScopedDataPipeProducerHandle());
-    return;
-  }
-  mojom::RemotingDataStreamSenderPtr audio_stream_sender;
-  mojom::RemotingDataStreamSenderPtr video_stream_sender;
-  remoter_->StartDataStreams(audio ? std::move(audio_data_pipe->consumer_handle)
-                                   : mojo::ScopedDataPipeConsumerHandle(),
-                             video ? std::move(video_data_pipe->consumer_handle)
-                                   : mojo::ScopedDataPipeConsumerHandle(),
-                             audio ? mojo::MakeRequest(&audio_stream_sender)
-                                   : mojom::RemotingDataStreamSenderRequest(),
-                             video ? mojo::MakeRequest(&video_stream_sender)
-                                   : mojom::RemotingDataStreamSenderRequest());
-  done_callback.Run(audio_stream_sender.PassInterface(),
-                    video_stream_sender.PassInterface(),
-                    audio ? std::move(audio_data_pipe->producer_handle)
-                          : mojo::ScopedDataPipeProducerHandle(),
-                    video ? std::move(video_data_pipe->producer_handle)
-                          : mojo::ScopedDataPipeProducerHandle());
-}
-
-void SharedSession::SendMessageToSink(
-    std::unique_ptr<std::vector<uint8_t>> message) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  remoter_->SendMessageToSink(*message);
-}
-
-void SharedSession::EstimateTransmissionCapacity(
-    mojom::Remoter::EstimateTransmissionCapacityCallback callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  remoter_->EstimateTransmissionCapacity(std::move(callback));
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/shared_session.h b/media/remoting/shared_session.h
deleted file mode 100644
index ccbb1ac..0000000
--- a/media/remoting/shared_session.h
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_SHARED_SESSION_H_
-#define MEDIA_REMOTING_SHARED_SESSION_H_
-
-#include <vector>
-
-#include "base/callback.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/thread_checker.h"
-#include "build/buildflag.h"
-#include "media/media_features.h"
-#include "media/mojo/interfaces/remoting.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-#include "media/remoting/rpc_broker.h"  // nogncheck
-#endif
-
-namespace media {
-namespace remoting {
-
-// A single shared remoting session for multiple clients. The session will
-// start remoting when receiving the first request. Once remoting is started,
-// it will be stopped when any of the following happens:
-// 1) Receives the request from any client to stop remoting.
-// 2) Remote sink is gone.
-// 3) Any client requests to permanently terminate the session.
-// 4) All clients are destroyed.
-//
-// This class is ref-counted because, in some cases, an instance will have
-// shared ownership between RendererController and RemotingCdmController.
-class SharedSession final : public mojom::RemotingSource,
-                            public base::RefCountedThreadSafe<SharedSession> {
- public:
-  // State transition diagram:
-  //
-  // .--> SESSION_UNAVAILABLE
-  // |          |      ^
-  // |          V      |
-  // |     SESSION_CAN_START
-  // |          |
-  // |          V
-  // | .---SESSION_STARTING --.
-  // | |        |             |
-  // | |        V             |
-  // | |   SESSION_STARTED----|
-  // | |        |             |
-  // | |        V             |
-  // | '-> SESSION_STOPPING   |
-  // '-----'    |             |
-  //            V             V
-  //    SESSION_PERMANENTLY_STOPPED
-  enum SessionState {
-    // Remoting sink is not available. Can't start remoting.
-    SESSION_UNAVAILABLE,
-    // Remoting sink is available, Can start remoting.
-    SESSION_CAN_START,
-    // Starting a remoting session.
-    SESSION_STARTING,
-    // Remoting session is successively started.
-    SESSION_STARTED,
-    // Stopping the session.
-    SESSION_STOPPING,
-    // Remoting session is permanently stopped. This state indicates that the
-    // video stack cannot continue operation. For example, if a remoting session
-    // involving CDM content was stopped, there is no way to continue playback
-    // because the CDM is required but is no longer available.
-    SESSION_PERMANENTLY_STOPPED,
-  };
-
-  class Client {
-   public:
-    // Get notified whether the remoting session is successively started.
-    virtual void OnStarted(bool success) = 0;
-    // Get notified when session state changes.
-    virtual void OnSessionStateChanged() = 0;
-  };
-
-  SharedSession(mojom::RemotingSourceRequest source_request,
-                mojom::RemoterPtr remoter);
-
-  // Get the current session state.
-  SessionState state() const {
-    DCHECK(thread_checker_.CalledOnValidThread());
-    return state_;
-  }
-
-  // Get the last stop reason reported by OnStopped().
-  mojom::RemotingStopReason get_last_stop_reason() const {
-    return stop_reason_;
-  }
-
-  const std::string& sink_name() const { return sink_metadata_.friendly_name; }
-
-  // Queries on remoting sink capabilities.
-  bool HasVideoCapability(mojom::RemotingSinkVideoCapability capability) const;
-  bool HasAudioCapability(mojom::RemotingSinkAudioCapability capability) const;
-  bool HasFeatureCapability(mojom::RemotingSinkFeature capability) const;
-  bool IsRemoteDecryptionAvailable() const;
-
-  // RemotingSource implementations.
-  void OnSinkAvailable(mojom::RemotingSinkMetadataPtr metadata) override;
-  void OnSinkGone() override;
-  void OnStarted() override;
-  void OnStartFailed(mojom::RemotingStartFailReason reason) override;
-  void OnMessageFromSink(const std::vector<uint8_t>& message) override;
-  void OnStopped(mojom::RemotingStopReason reason) override;
-
-  using DataPipeStartCallback =
-      base::Callback<void(mojom::RemotingDataStreamSenderPtrInfo audio,
-                          mojom::RemotingDataStreamSenderPtrInfo video,
-                          mojo::ScopedDataPipeProducerHandle audio_handle,
-                          mojo::ScopedDataPipeProducerHandle video_handle)>;
-  void StartDataPipe(std::unique_ptr<mojo::DataPipe> audio_data_pipe,
-                     std::unique_ptr<mojo::DataPipe> video_data_pipe,
-                     const DataPipeStartCallback& done_callback);
-
-  // Requests to start remoting. Will try start a remoting session if not
-  // started yet. |client| will get informed whether the session is
-  // successifully started throught OnStarted().
-  void StartRemoting(Client* client);
-
-  // Requests to stop the current remoting session if started. When the session
-  // is stopping, all clients will get notified.
-  void StopRemoting(Client* client);
-
-  // Permanently terminates the current remoting session.
-  void Shutdown();
-
-  // Add/remove a client to/from |clients_|.
-  // Note: Clients can only added/removed through these methods.
-  // Remoting session will be stopped if all clients are gone.
-  void AddClient(Client* client);
-  void RemoveClient(Client* client);
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-  RpcBroker* rpc_broker() { return &rpc_broker_; }
-#endif
-
-  void EstimateTransmissionCapacity(
-      mojom::Remoter::EstimateTransmissionCapacityCallback callback);
-
- private:
-  friend class base::RefCountedThreadSafe<SharedSession>;
-  ~SharedSession() override;
-
-  // Updates the current session state and notifies all the clients if state
-  // changes.
-  void UpdateAndNotifyState(SessionState state);
-
-  // Callback from RpcBroker when sending message to remote sink.
-  void SendMessageToSink(std::unique_ptr<std::vector<uint8_t>> message);
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING_RPC)
-  // Handles dispatching of incoming and outgoing RPC messages.
-  RpcBroker rpc_broker_;
-#endif
-
-  const mojo::Binding<mojom::RemotingSource> binding_;
-  const mojom::RemoterPtr remoter_;
-
-  // When the sink is available for remoting, this describes its metadata. When
-  // not available, this is empty. Updated by OnSinkAvailable/Gone().
-  mojom::RemotingSinkMetadata sink_metadata_;
-
-  // The current state.
-  SessionState state_ = SESSION_UNAVAILABLE;
-
-  // Clients are added/removed to/from this list by calling Add/RemoveClient().
-  // All the clients are not belong to this class. They are supposed to call
-  // RemoveClient() before they are gone.
-  std::vector<Client*> clients_;
-
-  mojom::RemotingStopReason stop_reason_ =
-      mojom::RemotingStopReason::LOCAL_PLAYBACK;
-
-  // This is used to check all the methods are called on the current thread in
-  // debug builds.
-  base::ThreadChecker thread_checker_;
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_SHARED_SESSION_H_
diff --git a/media/remoting/sink_availability_observer.cc b/media/remoting/sink_availability_observer.cc
deleted file mode 100644
index 94eadea..0000000
--- a/media/remoting/sink_availability_observer.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/remoting/sink_availability_observer.h"
-
-namespace media {
-namespace remoting {
-
-SinkAvailabilityObserver::SinkAvailabilityObserver(
-    mojom::RemotingSourceRequest source_request,
-    mojom::RemoterPtr remoter)
-    : binding_(this, std::move(source_request)), remoter_(std::move(remoter)) {}
-
-SinkAvailabilityObserver::~SinkAvailabilityObserver() = default;
-
-bool SinkAvailabilityObserver::IsRemoteDecryptionAvailable() const {
-  return std::find(std::begin(sink_metadata_.features),
-                   std::end(sink_metadata_.features),
-                   mojom::RemotingSinkFeature::CONTENT_DECRYPTION) !=
-         std::end(sink_metadata_.features);
-}
-
-void SinkAvailabilityObserver::OnSinkAvailable(
-    mojom::RemotingSinkMetadataPtr metadata) {
-  sink_metadata_ = *metadata;
-}
-
-void SinkAvailabilityObserver::OnSinkGone() {
-  sink_metadata_ = mojom::RemotingSinkMetadata();
-}
-
-}  // namespace remoting
-}  // namespace media
diff --git a/media/remoting/sink_availability_observer.h b/media/remoting/sink_availability_observer.h
deleted file mode 100644
index a8b15802..0000000
--- a/media/remoting/sink_availability_observer.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_SINK_AVAILABILITY_OBSERVER_H_
-#define MEDIA_REMOTING_SINK_AVAILABILITY_OBSERVER_H_
-
-#include "media/mojo/interfaces/remoting.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
-
-namespace media {
-namespace remoting {
-
-// Implements the RemotingSource interface for the sole purpose of monitoring
-// sink availability status.
-class SinkAvailabilityObserver final : public mojom::RemotingSource {
- public:
-  SinkAvailabilityObserver(mojom::RemotingSourceRequest source_request,
-                           mojom::RemoterPtr remoter);
-  ~SinkAvailabilityObserver() override;
-
-  const mojom::RemotingSinkMetadata& sink_metadata() const {
-    return sink_metadata_;
-  }
-
-  bool IsRemoteDecryptionAvailable() const;
-
-  // RemotingSource implementations.
-  void OnSinkAvailable(mojom::RemotingSinkMetadataPtr metadata) override;
-  void OnSinkGone() override;
-  void OnStarted() override {}
-  void OnStartFailed(mojom::RemotingStartFailReason reason) override {}
-  void OnMessageFromSink(const std::vector<uint8_t>& message) override {}
-  void OnStopped(mojom::RemotingStopReason reason) override {}
-
- private:
-  const mojo::Binding<mojom::RemotingSource> binding_;
-  const mojom::RemoterPtr remoter_;
-
-  // When the sink is available for remoting, this describes its metadata. When
-  // not available, this is empty. Updated by OnSinkAvailable/Gone().
-  mojom::RemotingSinkMetadata sink_metadata_;
-
-  DISALLOW_COPY_AND_ASSIGN(SinkAvailabilityObserver);
-};
-
-}  // namespace remoting
-}  // namespace media
-
-#endif  // MEDIA_REMOTING_SINK_AVAILABILITY_OBSERVER_H_
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 140f8df..db2c8a9 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -620,8 +620,6 @@
       "cookies/cookie_monster.h",
       "cookies/cookie_monster_change_dispatcher.cc",
       "cookies/cookie_monster_change_dispatcher.h",
-      "cookies/cookie_monster_netlog_params.cc",
-      "cookies/cookie_monster_netlog_params.h",
       "cookies/cookie_options.cc",
       "cookies/cookie_options.h",
       "cookies/cookie_store.cc",
diff --git a/net/cookies/cookie_change_dispatcher.cc b/net/cookies/cookie_change_dispatcher.cc
index c6cdf324..4bb4e5f 100644
--- a/net/cookies/cookie_change_dispatcher.cc
+++ b/net/cookies/cookie_change_dispatcher.cc
@@ -6,34 +6,6 @@
 
 namespace net {
 
-const char* CookieChangeCauseToString(CookieChangeCause cause) {
-  const char* cause_string = "INVALID";
-  switch (cause) {
-    case CookieChangeCause::INSERTED:
-      cause_string = "inserted";
-      break;
-    case CookieChangeCause::EXPLICIT:
-      cause_string = "explicit";
-      break;
-    case CookieChangeCause::UNKNOWN_DELETION:
-      cause_string = "unknown";
-      break;
-    case CookieChangeCause::OVERWRITE:
-      cause_string = "overwrite";
-      break;
-    case CookieChangeCause::EXPIRED:
-      cause_string = "expired";
-      break;
-    case CookieChangeCause::EVICTED:
-      cause_string = "evicted";
-      break;
-    case CookieChangeCause::EXPIRED_OVERWRITE:
-      cause_string = "expired_overwrite";
-      break;
-  }
-  return cause_string;
-}
-
 bool CookieChangeCauseIsDeletion(CookieChangeCause cause) {
   return cause != CookieChangeCause::INSERTED;
 }
diff --git a/net/cookies/cookie_change_dispatcher.h b/net/cookies/cookie_change_dispatcher.h
index c05a6db5..8b48c04 100644
--- a/net/cookies/cookie_change_dispatcher.h
+++ b/net/cookies/cookie_change_dispatcher.h
@@ -38,12 +38,9 @@
   EXPIRED_OVERWRITE
 };
 
-// Return a string corresponding to the change cause.  For debugging/logging.
-NET_EXPORT const char* CookieChangeCauseToString(CookieChangeCause cause);
-
 // Returns whether |cause| is one that could be a reason for deleting a cookie.
 // This function assumes that ChangeCause::EXPLICIT is a reason for deletion.
-NET_EXPORT bool CookieChangeCauseIsDeletion(CookieChangeCause cause);
+bool NET_EXPORT CookieChangeCauseIsDeletion(CookieChangeCause cause);
 
 // Called when a cookie is changed in a CookieStore.
 //
diff --git a/net/cookies/cookie_constants.cc b/net/cookies/cookie_constants.cc
index 14140d3..b618261 100644
--- a/net/cookies/cookie_constants.cc
+++ b/net/cookies/cookie_constants.cc
@@ -17,7 +17,6 @@
 
 const char kSameSiteLax[] = "lax";
 const char kSameSiteStrict[] = "strict";
-const char kSameSiteDefault[] = "default";
 
 }  // namespace
 
@@ -48,18 +47,6 @@
   return COOKIE_PRIORITY_DEFAULT;
 }
 
-std::string CookieSameSiteToString(CookieSameSite same_site) {
-  switch (same_site) {
-    case CookieSameSite::LAX_MODE:
-      return kSameSiteLax;
-    case CookieSameSite::STRICT_MODE:
-      return kSameSiteStrict;
-    case CookieSameSite::DEFAULT_MODE:
-      return kSameSiteDefault;
-  }
-  return "INVALID";
-}
-
 CookieSameSite StringToCookieSameSite(const std::string& same_site) {
   if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteLax))
     return CookieSameSite::LAX_MODE;
diff --git a/net/cookies/cookie_constants.h b/net/cookies/cookie_constants.h
index 4f573fb..61e1c0a0 100644
--- a/net/cookies/cookie_constants.h
+++ b/net/cookies/cookie_constants.h
@@ -30,17 +30,13 @@
 
 // Returns the Set-Cookie header priority token corresponding to |priority|.
 //
-// Deprecated; only use for debugging/logging.
+// TODO(mkwst): Remove this once its callsites are refactored.
 NET_EXPORT std::string CookiePriorityToString(CookiePriority priority);
 
 // Converts the Set-Cookie header priority token |priority| to a CookiePriority.
 // Defaults to COOKIE_PRIORITY_DEFAULT for empty or unrecognized strings.
 NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority);
 
-// Returns a string corresponding to the value of the |same_site| token.
-// Intended only for debugging/logging.
-NET_EXPORT std::string CookieSameSiteToString(CookieSameSite same_site);
-
 // Converst the Set-Cookie header SameSite token |same_site| to a
 // CookieSameSite. Defaults to CookieSameSite::DEFAULT_MODE for empty or
 // unrecognized strings.
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index e496a18..1bf1b6e5c 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -62,10 +62,8 @@
 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
 #include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_monster_change_dispatcher.h"
-#include "net/cookies/cookie_monster_netlog_params.h"
 #include "net/cookies/cookie_util.h"
 #include "net/cookies/parsed_cookie.h"
-#include "net/log/net_log.h"
 #include "net/ssl/channel_id_service.h"
 #include "url/origin.h"
 
@@ -332,36 +330,30 @@
 
 }  // namespace
 
-CookieMonster::CookieMonster(PersistentCookieStore* store, NetLog* log)
+CookieMonster::CookieMonster(PersistentCookieStore* store)
     : CookieMonster(
           store,
           nullptr,
-          log,
           base::TimeDelta::FromSeconds(kDefaultAccessUpdateThresholdSeconds)) {}
 
 CookieMonster::CookieMonster(PersistentCookieStore* store,
-                             ChannelIDService* channel_id_service,
-                             NetLog* log)
+                             ChannelIDService* channel_id_service)
     : CookieMonster(
           store,
           channel_id_service,
-          log,
           base::TimeDelta::FromSeconds(kDefaultAccessUpdateThresholdSeconds)) {}
 
 CookieMonster::CookieMonster(PersistentCookieStore* store,
-                             NetLog* log,
                              base::TimeDelta last_access_threshold)
-    : CookieMonster(store, nullptr, log, last_access_threshold) {}
+    : CookieMonster(store, nullptr, last_access_threshold) {}
 
 CookieMonster::CookieMonster(PersistentCookieStore* store,
                              ChannelIDService* channel_id_service,
-                             NetLog* log,
                              base::TimeDelta last_access_threshold)
     : initialized_(false),
       started_fetching_all_cookies_(false),
       finished_fetching_all_cookies_(false),
       seen_global_task_(false),
-      net_log_(NetLogWithSource::Make(log, NetLogSourceType::COOKIE_STORE)),
       store_(store),
       last_access_threshold_(last_access_threshold),
       channel_id_service_(channel_id_service),
@@ -383,10 +375,6 @@
         base::Bind(&ChannelIDStore::Flush,
                    base::Unretained(channel_id_service_->GetChannelIDStore())));
   }
-  net_log_.BeginEvent(
-      NetLogEventType::COOKIE_STORE_ALIVE,
-      base::BindRepeating(&NetLogCookieMonsterConstructorCallback,
-                          store != nullptr, channel_id_service != nullptr));
 }
 
 // Asynchronous CookieMonster API
@@ -555,9 +543,6 @@
 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(!initialized_);
-  net_log_.AddEvent(
-      NetLogEventType::COOKIE_STORE_SESSION_PERSISTENCE,
-      NetLog::BoolCallback("persistence", persist_session_cookies));
   persist_session_cookies_ = persist_session_cookies;
 }
 
@@ -587,13 +572,6 @@
     store_->SetBeforeFlushCallback(base::Closure());
   }
 
-  // Trigger shutdown processing on the persistent store while
-  // it still has access to the cookie NetLogWithSource.
-  if (store_)
-    store_->Close();
-
-  net_log_.EndEvent(NetLogEventType::COOKIE_STORE_ALIVE);
-
   // TODO(mmenke): Does it really make sense to run
   // CookieChanged callbacks when the CookieStore is destroyed?
   for (CookieMap::iterator cookie_it = cookies_.begin();
@@ -843,8 +821,7 @@
   // We bind in the current time so that we can report the wall-clock time for
   // loading cookies.
   store_->Load(base::Bind(&CookieMonster::OnLoaded,
-                          weak_ptr_factory_.GetWeakPtr(), TimeTicks::Now()),
-               net_log_);
+                          weak_ptr_factory_.GetWeakPtr(), TimeTicks::Now()));
 }
 
 void CookieMonster::OnLoaded(
@@ -1145,10 +1122,6 @@
       skipped_secure_cookie = true;
       histogram_cookie_delete_equivalent_->Add(
           COOKIE_DELETE_EQUIVALENT_SKIPPING_SECURE);
-      net_log_.AddEvent(
-          NetLogEventType::COOKIE_STORE_COOKIE_REJECTED_SECURE,
-          base::BindRepeating(&NetLogCookieMonsterCookieRejectedSecure, cc,
-                              &ecc));
       // If the cookie is equivalent to the new cookie and wouldn't have been
       // skipped for being HTTP-only, record that it is a skipped secure cookie
       // that would have been deleted otherwise.
@@ -1169,10 +1142,6 @@
           << "Duplicate equivalent cookies found, cookie store is corrupted.";
       if (skip_httponly && cc->IsHttpOnly()) {
         skipped_httponly = true;
-        net_log_.AddEvent(
-            NetLogEventType::COOKIE_STORE_COOKIE_REJECTED_HTTPONLY,
-            base::BindRepeating(&NetLogCookieMonsterCookieRejectedHttponly, cc,
-                                &ecc));
       } else {
         histogram_cookie_delete_equivalent_->Add(
             COOKIE_DELETE_EQUIVALENT_FOUND);
@@ -1198,10 +1167,6 @@
   DCHECK(thread_checker_.CalledOnValidThread());
   CanonicalCookie* cc_ptr = cc.get();
 
-  net_log_.AddEvent(NetLogEventType::COOKIE_STORE_COOKIE_ADDED,
-                    base::BindRepeating(&NetLogCookieMonsterCookieAdded,
-                                        cc.get(), sync_to_store));
-
   if ((cc_ptr->IsPersistent() || persist_session_cookies_) && store_.get() &&
       sync_to_store)
     store_->AddCookie(*cc_ptr);
@@ -1376,16 +1341,10 @@
                         << ", cause:" << deletion_cause
                         << ", cc: " << cc->DebugString();
 
-  ChangeCausePair mapping = kChangeCauseMapping[deletion_cause];
-  if (deletion_cause != DELETE_COOKIE_DONT_RECORD) {
-    net_log_.AddEvent(NetLogEventType::COOKIE_STORE_COOKIE_DELETED,
-                      base::BindRepeating(&NetLogCookieMonsterCookieDeleted, cc,
-                                          mapping.cause, sync_to_store));
-  }
-
   if ((cc->IsPersistent() || persist_session_cookies_) && store_.get() &&
       sync_to_store)
     store_->DeleteCookie(*cc);
+  ChangeCausePair mapping = kChangeCauseMapping[deletion_cause];
   change_dispatcher_.DispatchChange(*cc, mapping.cause, mapping.notify);
   cookies_.erase(it);
 }
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 9ea3d27..083c194 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -30,7 +30,6 @@
 #include "net/cookies/cookie_constants.h"
 #include "net/cookies/cookie_monster_change_dispatcher.h"
 #include "net/cookies/cookie_store.h"
-#include "net/log/net_log_with_source.h"
 #include "url/gurl.h"
 
 namespace base {
@@ -133,21 +132,16 @@
   // this class, but it must remain valid for the duration of the cookie
   // monster's existence. If |store| is NULL, then no backing store will be
   // updated.
-  // |log| must outlive the CookieMonster.
-  CookieMonster(PersistentCookieStore* store, NetLog* log);
+  explicit CookieMonster(PersistentCookieStore* store);
 
   // Like above, but includes a non-owning pointer |channel_id_service| for the
   // corresponding ChannelIDService used with this CookieStore. The
   // |channel_id_service| must outlive the CookieMonster.
-  // |log| must outlive the CookieMonster.
   CookieMonster(PersistentCookieStore* store,
-                ChannelIDService* channel_id_service,
-                NetLog* log);
+                ChannelIDService* channel_id_service);
 
   // Only used during unit testing.
-  // |log| must outlive the CookieMonster.
   CookieMonster(PersistentCookieStore* store,
-                NetLog* log,
                 base::TimeDelta last_access_threshold);
 
   ~CookieMonster() override;
@@ -214,7 +208,6 @@
  private:
   CookieMonster(PersistentCookieStore* store,
                 ChannelIDService* channel_id_service,
-                NetLog* log,
                 base::TimeDelta last_access_threshold);
 
   // For garbage collection constants.
@@ -621,8 +614,6 @@
   // for typical use.
   bool seen_global_task_;
 
-  NetLogWithSource net_log_;
-
   scoped_refptr<PersistentCookieStore> store_;
 
   base::Time last_time_seen_;
@@ -677,11 +668,7 @@
   // that are not yet returned to CookieMonster by previous priority loads.
   //
   // |loaded_callback| may not be NULL.
-  // |net_log| is a NetLogWithSource that may be copied if the persistent
-  // store wishes to log NetLog events.  Any copied NetLogWithSource may
-  // not be used after Close() is called.
-  virtual void Load(const LoadedCallback& loaded_callback,
-                    const NetLogWithSource& net_log) = 0;
+  virtual void Load(const LoadedCallback& loaded_callback) = 0;
 
   // Does a priority load of all cookies for the domain key (eTLD+1). The
   // callback will return all the cookies that are not yet returned by previous
@@ -709,16 +696,6 @@
   // NULL.
   virtual void Flush(base::OnceClosure callback) = 0;
 
-  // Shut down the persistent store, doing any final processing.  All of the
-  // above calls will be no-ops after this call, except for Load() and
-  // LoadCookiesForKey(), which will call their callback methods with
-  // an empty vector of CanonicalCookies.
-  // This method call must be called before any NetLog referenced through the
-  // NetLogWithSource passed to the constructor is destroyed.  If there is
-  // no such reference, Close() does not need to be called explicitly.
-  // Instead, implementations should call it from the destructor.
-  virtual void Close() = 0;
-
  protected:
   PersistentCookieStore() {}
   virtual ~PersistentCookieStore() {}
diff --git a/net/cookies/cookie_monster_netlog_params.cc b/net/cookies/cookie_monster_netlog_params.cc
deleted file mode 100644
index e4f358c2..0000000
--- a/net/cookies/cookie_monster_netlog_params.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/cookies/cookie_monster_netlog_params.h"
-
-#include "net/cookies/cookie_constants.h"
-#include "net/cookies/cookie_store.h"
-
-namespace net {
-
-std::unique_ptr<base::Value> NetLogCookieMonsterConstructorCallback(
-    bool persistent_store,
-    bool channel_id_service,
-    NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("persistent_store", base::Value(persistent_store));
-  dict->SetKey("channel_id_service", base::Value(channel_id_service));
-  return dict;
-}
-
-std::unique_ptr<base::Value> NetLogCookieMonsterCookieAdded(
-    const CanonicalCookie* cookie,
-    bool sync_requested,
-    NetLogCaptureMode capture_mode) {
-  if (!capture_mode.include_cookies_and_credentials())
-    return nullptr;
-
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("name", base::Value(cookie->Name()));
-  dict->SetKey("value", base::Value(cookie->Value()));
-  dict->SetKey("domain", base::Value(cookie->Domain()));
-  dict->SetKey("path", base::Value(cookie->Path()));
-  dict->SetKey("httponly", base::Value(cookie->IsHttpOnly()));
-  dict->SetKey("secure", base::Value(cookie->IsSecure()));
-  dict->SetKey("priority",
-               base::Value(CookiePriorityToString(cookie->Priority())));
-  dict->SetKey("same_site",
-               base::Value(CookieSameSiteToString(cookie->SameSite())));
-  dict->SetKey("is_persistent", base::Value(cookie->IsPersistent()));
-  dict->SetKey("sync_requested", base::Value(sync_requested));
-  return dict;
-}
-
-std::unique_ptr<base::Value> NetLogCookieMonsterCookieDeleted(
-    const CanonicalCookie* cookie,
-    CookieChangeCause cause,
-    bool sync_requested,
-    NetLogCaptureMode capture_mode) {
-  if (!capture_mode.include_cookies_and_credentials())
-    return nullptr;
-
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("name", base::Value(cookie->Name()));
-  dict->SetKey("value", base::Value(cookie->Value()));
-  dict->SetKey("domain", base::Value(cookie->Domain()));
-  dict->SetKey("path", base::Value(cookie->Path()));
-  dict->SetKey("is_persistent", base::Value(cookie->IsPersistent()));
-  dict->SetKey("deletion_cause", base::Value(CookieChangeCauseToString(cause)));
-  dict->SetKey("sync_requested", base::Value(sync_requested));
-  return dict;
-}
-
-std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedSecure(
-    const CanonicalCookie* old_cookie,
-    const CanonicalCookie* new_cookie,
-    NetLogCaptureMode capture_mode) {
-  if (!capture_mode.include_cookies_and_credentials())
-    return nullptr;
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("name", base::Value(old_cookie->Name()));
-  dict->SetKey("domain", base::Value(old_cookie->Domain()));
-  dict->SetKey("oldpath", base::Value(old_cookie->Path()));
-  dict->SetKey("newpath", base::Value(new_cookie->Path()));
-  dict->SetKey("oldvalue", base::Value(old_cookie->Value()));
-  dict->SetKey("newvalue", base::Value(new_cookie->Value()));
-  return dict;
-}
-
-std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedHttponly(
-    const CanonicalCookie* old_cookie,
-    const CanonicalCookie* new_cookie,
-    NetLogCaptureMode capture_mode) {
-  if (!capture_mode.include_cookies_and_credentials())
-    return nullptr;
-  std::unique_ptr<base::Value> dict =
-      std::make_unique<base::Value>(base::Value::Type::DICTIONARY);
-  dict->SetKey("name", base::Value(old_cookie->Name()));
-  dict->SetKey("domain", base::Value(old_cookie->Domain()));
-  dict->SetKey("path", base::Value(old_cookie->Path()));
-  dict->SetKey("oldvalue", base::Value(old_cookie->Value()));
-  dict->SetKey("newvalue", base::Value(new_cookie->Value()));
-  return dict;
-}
-
-}  // namespace net
diff --git a/net/cookies/cookie_monster_netlog_params.h b/net/cookies/cookie_monster_netlog_params.h
deleted file mode 100644
index a7eb27e..0000000
--- a/net/cookies/cookie_monster_netlog_params.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_
-#define NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_
-
-#include <memory>
-
-#include "base/values.h"
-#include "net/base/net_export.h"
-#include "net/cookies/canonical_cookie.h"
-#include "net/cookies/cookie_change_dispatcher.h"
-#include "net/cookies/cookie_monster.h"
-#include "net/cookies/cookie_store.h"
-#include "net/log/net_log_capture_mode.h"
-
-namespace net {
-
-// Returns a Value containing NetLog parameters for constructing
-// a CookieMonster.
-NET_EXPORT std::unique_ptr<base::Value> NetLogCookieMonsterConstructorCallback(
-    bool persistent_store,
-    bool channel_id_service,
-    NetLogCaptureMode capture_mode);
-
-// Returns a Value containing NetLog parameters for adding a cookie.
-NET_EXPORT std::unique_ptr<base::Value> NetLogCookieMonsterCookieAdded(
-    const CanonicalCookie* cookie,
-    bool sync_requested,
-    NetLogCaptureMode capture_mode);
-
-// Returns a Value containing NetLog parameters for deleting a cookie.
-NET_EXPORT std::unique_ptr<base::Value> NetLogCookieMonsterCookieDeleted(
-    const CanonicalCookie* cookie,
-    CookieChangeCause cause,
-    bool sync_requested,
-    NetLogCaptureMode capture_mode);
-
-// Returns a Value containing NetLog parameters for when a cookie addition
-// is rejected because of a conflict with a secure cookie.
-NET_EXPORT std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedSecure(
-    const CanonicalCookie* old_cookie,
-    const CanonicalCookie* new_cookie,
-    NetLogCaptureMode capture_mode);
-
-// Returns a Value containing NetLog parameters for when a cookie addition
-// is rejected because of a conflict with an httponly cookie.
-NET_EXPORT std::unique_ptr<base::Value>
-NetLogCookieMonsterCookieRejectedHttponly(const CanonicalCookie* old_cookie,
-                                          const CanonicalCookie* new_cookie,
-                                          NetLogCaptureMode capture_mode);
-
-}  // namespace net
-
-#endif  // NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_
diff --git a/net/cookies/cookie_monster_perftest.cc b/net/cookies/cookie_monster_perftest.cc
index c20f5ff..b209476 100644
--- a/net/cookies/cookie_monster_perftest.cc
+++ b/net/cookies/cookie_monster_perftest.cc
@@ -135,7 +135,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestAddCookiesOnSingleHost) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   std::vector<std::string> cookies;
   for (int i = 0; i < kNumCookies; i++) {
     cookies.push_back(base::StringPrintf("a%03d=b", i));
@@ -168,7 +168,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestAddCookieOnManyHosts) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   std::string cookie(kCookieLine);
   std::vector<GURL> gurls;  // just wanna have ffffuunnn
   for (int i = 0; i < kNumCookies; ++i) {
@@ -201,7 +201,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestDomainTree) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   GetCookieListCallback getCookieListCallback;
   SetCookieCallback setCookieCallback;
   const char domain_cookie_format_tree[] = "a=b; domain=%s";
@@ -257,7 +257,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestDomainLine) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   SetCookieCallback setCookieCallback;
   GetCookieListCallback getCookieListCallback;
   std::vector<std::string> domain_list;
@@ -318,7 +318,7 @@
 
   store->SetLoadExpectation(true, std::move(initial_cookies));
 
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Import will happen on first access.
   GURL gurl("www.foo.com");
@@ -332,7 +332,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestGetKey) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   base::PerfTimeLogger timer("Cookie_monster_get_key");
   for (int i = 0; i < kNumCookies; i++)
     cm->GetKey("www.foo.com");
diff --git a/net/cookies/cookie_monster_store_test.cc b/net/cookies/cookie_monster_store_test.cc
index fed5abc..66f1812e 100644
--- a/net/cookies/cookie_monster_store_test.cc
+++ b/net/cookies/cookie_monster_store_test.cc
@@ -42,8 +42,7 @@
   load_result_.swap(result);
 }
 
-void MockPersistentCookieStore::Load(const LoadedCallback& loaded_callback,
-                                     const NetLogWithSource& /* net_log */) {
+void MockPersistentCookieStore::Load(const LoadedCallback& loaded_callback) {
   if (store_load_commands_) {
     commands_.push_back(
         CookieStoreCommand(CookieStoreCommand::LOAD, loaded_callback, ""));
@@ -67,7 +66,7 @@
     return;
   }
   if (!loaded_) {
-    Load(loaded_callback, NetLogWithSource());
+    Load(loaded_callback);
   } else {
     std::vector<std::unique_ptr<CanonicalCookie>> empty_cookies;
     base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -96,8 +95,6 @@
                                                   std::move(callback));
 }
 
-void MockPersistentCookieStore::Close() {}
-
 void MockPersistentCookieStore::SetForceKeepSessionState() {
 }
 
@@ -142,8 +139,7 @@
 }
 
 void MockSimplePersistentCookieStore::Load(
-    const LoadedCallback& loaded_callback,
-    const NetLogWithSource& /* net_log */) {
+    const LoadedCallback& loaded_callback) {
   std::vector<std::unique_ptr<CanonicalCookie>> out_cookies;
 
   for (auto it = cookies_.begin(); it != cookies_.end(); it++)
@@ -158,7 +154,7 @@
     const std::string& key,
     const LoadedCallback& loaded_callback) {
   if (!loaded_) {
-    Load(loaded_callback, NetLogWithSource());
+    Load(loaded_callback);
   } else {
     std::vector<std::unique_ptr<CanonicalCookie>> empty_cookies;
     base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -196,8 +192,6 @@
                                                   std::move(callback));
 }
 
-void MockSimplePersistentCookieStore::Close() {}
-
 void MockSimplePersistentCookieStore::SetForceKeepSessionState() {
 }
 
@@ -244,7 +238,7 @@
     store->AddCookie(*cc);
   }
 
-  return std::make_unique<CookieMonster>(store.get(), nullptr);
+  return std::make_unique<CookieMonster>(store.get());
 }
 
 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() = default;
diff --git a/net/cookies/cookie_monster_store_test.h b/net/cookies/cookie_monster_store_test.h
index bce10d0e..6d8a833 100644
--- a/net/cookies/cookie_monster_store_test.h
+++ b/net/cookies/cookie_monster_store_test.h
@@ -88,8 +88,7 @@
 
   const CommandList& commands() const { return commands_; }
 
-  void Load(const LoadedCallback& loaded_callback,
-            const NetLogWithSource& /* net_log */) override;
+  void Load(const LoadedCallback& loaded_callback) override;
 
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& loaded_callback) override;
@@ -104,8 +103,6 @@
 
   void Flush(base::OnceClosure callback) override;
 
-  void Close() override;
-
   void SetForceKeepSessionState() override;
 
  protected:
@@ -145,8 +142,7 @@
  public:
   MockSimplePersistentCookieStore();
 
-  void Load(const LoadedCallback& loaded_callback,
-            const NetLogWithSource& /* net_log */) override;
+  void Load(const LoadedCallback& loaded_callback) override;
 
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& loaded_callback) override;
@@ -161,8 +157,6 @@
 
   void Flush(base::OnceClosure callback) override;
 
-  void Close() override;
-
   void SetForceKeepSessionState() override;
 
  protected:
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 4826f7d..599a633 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -56,9 +56,7 @@
 class NewMockPersistentCookieStore
     : public CookieMonster::PersistentCookieStore {
  public:
-  MOCK_METHOD2(Load,
-               void(const LoadedCallback& loaded_callback,
-                    const NetLogWithSource& net_log));
+  MOCK_METHOD1(Load, void(const LoadedCallback& loaded_callback));
   MOCK_METHOD2(LoadCookiesForKey,
                void(const std::string& key,
                     const LoadedCallback& loaded_callback));
@@ -71,7 +69,6 @@
       base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
                                                     std::move(callback));
   }
-  void Close() override {}
   MOCK_METHOD0(SetForceKeepSessionState, void());
 
  private:
@@ -110,7 +107,7 @@
 
 struct CookieMonsterTestTraits {
   static std::unique_ptr<CookieStore> Create() {
-    return std::make_unique<CookieMonster>(nullptr, nullptr);
+    return std::make_unique<CookieMonster>(nullptr);
   }
 
   static void RunUntilIdle() { base::RunLoop().RunUntilIdle(); }
@@ -379,7 +376,7 @@
         (domain_max_cookies + domain_purge_cookies) * 2;
     // Add a bunch of cookies on a single host, should purge them.
     {
-      std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+      std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
       for (int i = 0; i < more_than_enough_cookies; ++i) {
         std::string cookie = base::StringPrintf("a%03d=b", i);
         EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), cookie));
@@ -396,7 +393,7 @@
     // between them.  We shouldn't go above kDomainMaxCookies for both together.
     GURL url_google_specific(http_www_foo_.Format("http://www.gmail.%D"));
     {
-      std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+      std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
       for (int i = 0; i < more_than_enough_cookies; ++i) {
         std::string cookie_general = base::StringPrintf("a%03d=b", i);
         EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), cookie_general));
@@ -574,7 +571,7 @@
     std::unique_ptr<CookieMonster> cm;
 
     if (alt_host_entries == nullptr) {
-      cm.reset(new CookieMonster(nullptr, nullptr));
+      cm.reset(new CookieMonster(nullptr));
     } else {
       // When generating all of these cookies on alternate hosts, they need to
       // be all older than the max "safe" date for GC, which is currently 30
@@ -619,7 +616,7 @@
     DCHECK_EQ(150U, CookieMonster::kDomainMaxCookies -
                         CookieMonster::kDomainPurgeCookies);
 
-    std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+    std::unique_ptr<CookieMonster> cm(new CookieMonster(NULL));
 
     // Each test case adds 181 cookies, so 31 cookies are evicted.
     // Cookie same priority, repeated for each priority.
@@ -682,7 +679,7 @@
     DCHECK_EQ(150U, CookieMonster::kDomainMaxCookies -
                         CookieMonster::kDomainPurgeCookies);
 
-    std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+    std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
 
     // Each test case adds 181 cookies, so 31 cookies are evicted.
     // Cookie same priority, repeated for each priority.
@@ -739,7 +736,7 @@
     DCHECK_EQ(150U, CookieMonster::kDomainMaxCookies -
                         CookieMonster::kDomainPurgeCookies);
 
-    std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+    std::unique_ptr<CookieMonster> cm(new CookieMonster(NULL));
 
     // Each test case adds 180 secure cookies, and some non-secure cookie. The
     // secure cookies take priority, so the non-secure cookie is removed, along
@@ -845,7 +842,7 @@
   // Function for creating a CM with a number of cookies in it,
   // no store (and hence no ability to affect access time).
   CookieMonster* CreateMonsterForGC(int num_cookies) {
-    CookieMonster* cm(new CookieMonster(nullptr, nullptr));
+    CookieMonster* cm(new CookieMonster(NULL));
     for (int i = 0; i < num_cookies; i++) {
       SetCookie(cm, GURL(base::StringPrintf("http://h%05d.izzle", i)), "a=1");
     }
@@ -970,7 +967,7 @@
  protected:
   DeferredCookieTaskTest() : expect_load_called_(false) {
     persistent_store_ = new NewMockPersistentCookieStore();
-    cookie_monster_.reset(new CookieMonster(persistent_store_.get(), nullptr));
+    cookie_monster_.reset(new CookieMonster(persistent_store_.get()));
   }
 
   // Defines a cookie to be returned from PersistentCookieStore::Load
@@ -1023,7 +1020,7 @@
     // Make sure the |load_run_loop_| is not reused.
     CHECK(!expect_load_called_);
     expect_load_called_ = true;
-    EXPECT_CALL(*persistent_store_.get(), Load(testing::_, testing::_))
+    EXPECT_CALL(*persistent_store_.get(), Load(testing::_))
         .WillOnce(testing::DoAll(testing::SaveArg<0>(&loaded_callback_),
                                  QuitRunLoop(&load_run_loop_)));
   }
@@ -1366,7 +1363,7 @@
 
 TEST_F(CookieMonsterTest, TestCookieDeleteAll) {
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
   CookieOptions options;
   options.set_include_httponly();
 
@@ -1397,7 +1394,7 @@
 }
 
 TEST_F(CookieMonsterTest, TestCookieDeleteAllCreatedBetweenTimestamps) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   Time now = Time::Now();
 
   // Nothing has been added so nothing should be deleted.
@@ -1442,7 +1439,7 @@
 
 TEST_F(CookieMonsterTest,
        TestCookieDeleteAllCreatedBetweenTimestampsWithPredicate) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   Time now = Time::Now();
 
   CanonicalCookie test_cookie;
@@ -1535,7 +1532,7 @@
 
 TEST_F(CookieMonsterTest, TestLastAccess) {
   std::unique_ptr<CookieMonster> cm(
-      new CookieMonster(nullptr, nullptr, kLastAccessThreshold));
+      new CookieMonster(nullptr, kLastAccessThreshold));
 
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "A=B"));
   const Time last_access_date(GetFirstCookieAccessDate(cm.get()));
@@ -1589,8 +1586,8 @@
 }
 
 TEST_F(CookieMonsterTest, SetCookieableSchemes) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
-  std::unique_ptr<CookieMonster> cm_foo(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
+  std::unique_ptr<CookieMonster> cm_foo(new CookieMonster(nullptr));
 
   // Only cm_foo should allow foo:// cookies.
   std::vector<std::string> schemes;
@@ -1608,7 +1605,7 @@
 
 TEST_F(CookieMonsterTest, GetAllCookiesForURL) {
   std::unique_ptr<CookieMonster> cm(
-      new CookieMonster(nullptr, nullptr, kLastAccessThreshold));
+      new CookieMonster(nullptr, kLastAccessThreshold));
 
   // Create an httponly cookie.
   CookieOptions options;
@@ -1675,7 +1672,7 @@
 }
 
 TEST_F(CookieMonsterTest, GetAllCookiesForURLPathMatching) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   CookieOptions options;
 
   EXPECT_TRUE(SetCookieWithOptions(cm.get(), www_foo_foo_.url(),
@@ -1713,7 +1710,7 @@
 }
 
 TEST_F(CookieMonsterTest, CookieSorting) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
 
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "B=B1; path=/"));
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "B=B2; path=/foo"));
@@ -1737,7 +1734,7 @@
 }
 
 TEST_F(CookieMonsterTest, InheritCreationDate) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
 
   base::Time the_not_so_distant_past(base::Time::Now() -
                                      base::TimeDelta::FromSeconds(1000));
@@ -1767,7 +1764,7 @@
 }
 
 TEST_F(CookieMonsterTest, DeleteCookieByName) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
 
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "A=A1; path=/"));
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "A=A2; path=/foo"));
@@ -1843,7 +1840,7 @@
   // Inject our initial cookies into the mock PersistentCookieStore.
   store->SetLoadExpectation(true, std::move(initial_cookies));
 
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Verify that duplicates were not imported for path "/".
   // (If this had failed, GetCookies() would have also returned X=1, X=2, X=4).
@@ -1899,7 +1896,7 @@
   // Inject our initial cookies into the mock PersistentCookieStore.
   store->SetLoadExpectation(true, std::move(initial_cookies));
 
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   CookieList list(GetAllCookies(cm.get()));
   EXPECT_EQ(2U, list.size());
@@ -1913,7 +1910,7 @@
 
 TEST_F(CookieMonsterTest, PredicateSeesAllCookies) {
   const std::string kTrueValue = "A";
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   // We test that we can see all cookies with our predicate. This includes
   // host, http_only, host secure, and all domain cookies.
   CookiePredicate value_matcher = base::Bind(&CookieValuePredicate, kTrueValue);
@@ -1933,7 +1930,7 @@
 }
 
 TEST_F(CookieMonsterTest, UniqueCreationTime) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   CookieOptions options;
 
   // Add in three cookies through every public interface to the
@@ -1983,7 +1980,7 @@
 // Mainly a test of GetEffectiveDomain, or more specifically, of the
 // expected behavior of GetEffectiveDomain within the CookieMonster.
 TEST_F(CookieMonsterTest, GetKey) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
 
   // This test is really only interesting if GetKey() actually does something.
   EXPECT_EQ("foo.com", cm->GetKey("www.foo.com"));
@@ -2027,8 +2024,7 @@
 
   // Create new cookies and flush them to the store.
   {
-    std::unique_ptr<CookieMonster> cmout(
-        new CookieMonster(store.get(), nullptr));
+    std::unique_ptr<CookieMonster> cmout(new CookieMonster(store.get()));
     for (const CookiesInputInfo* p = input_info;
          p < &input_info[arraysize(input_info)]; p++) {
       EXPECT_TRUE(SetCanonicalCookie(
@@ -2047,8 +2043,7 @@
 
   // Create a new cookie monster and make sure that everything is correct
   {
-    std::unique_ptr<CookieMonster> cmin(
-        new CookieMonster(store.get(), nullptr));
+    std::unique_ptr<CookieMonster> cmin(new CookieMonster(store.get()));
     CookieList cookies(GetAllCookies(cmin.get()));
     ASSERT_EQ(2u, cookies.size());
     // Ordering is path length, then creation time.  So second cookie
@@ -2078,7 +2073,7 @@
 TEST_F(CookieMonsterTest, CookieListOrdering) {
   // Put a random set of cookies into a monster and make sure
   // they're returned in the right order.
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   EXPECT_TRUE(
       SetCookie(cm.get(), GURL("http://d.c.b.a.foo.com/aa/x.html"), "c=1"));
   EXPECT_TRUE(SetCookie(cm.get(), GURL("http://b.a.foo.com/aa/bb/cc/x.html"),
@@ -2216,7 +2211,7 @@
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
   store->set_store_load_commands(true);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Get all cookies task that queues a task to set a cookie when executed.
   ResultSavingCookieCallback<bool> set_cookie_callback;
@@ -2270,7 +2265,7 @@
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
   store->set_store_load_commands(true);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   ResultSavingCookieCallback<uint32_t> delete_callback;
   cm->DeleteAllAsync(base::Bind(&ResultSavingCookieCallback<uint32_t>::Run,
@@ -2310,7 +2305,7 @@
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
   store->set_store_load_commands(true);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   GetCookieListCallback get_cookie_list_callback1;
   cm->GetAllCookiesAsync(
@@ -2363,7 +2358,7 @@
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
   store->set_store_load_commands(true);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Get all cookies task that queues a task to set a cookie when executed.
   ResultSavingCookieCallback<bool> set_cookie_callback;
@@ -2412,8 +2407,7 @@
  public:
   FlushablePersistentStore() : flush_count_(0) {}
 
-  void Load(const LoadedCallback& loaded_callback,
-            const NetLogWithSource& /* net_log */) override {
+  void Load(const LoadedCallback& loaded_callback) override {
     std::vector<std::unique_ptr<CanonicalCookie>> out_cookies;
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE, base::Bind(loaded_callback, base::Passed(&out_cookies)));
@@ -2421,7 +2415,7 @@
 
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& loaded_callback) override {
-    Load(loaded_callback, NetLogWithSource());
+    Load(loaded_callback);
   }
 
   void AddCookie(const CanonicalCookie&) override {}
@@ -2438,8 +2432,6 @@
 
   int flush_count() { return flush_count_; }
 
-  void Close() override {}
-
  private:
   ~FlushablePersistentStore() override = default;
 
@@ -2468,7 +2460,7 @@
 TEST_F(CookieMonsterTest, FlushStore) {
   scoped_refptr<CallbackCounter> counter(new CallbackCounter());
   scoped_refptr<FlushablePersistentStore> store(new FlushablePersistentStore());
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   ASSERT_EQ(0, store->flush_count());
   ASSERT_EQ(0, counter->callback_count());
@@ -2503,7 +2495,7 @@
   ASSERT_EQ(2, counter->callback_count());
 
   // If there's no backing store, FlushStore() is always a safe no-op.
-  cm.reset(new CookieMonster(nullptr, nullptr));
+  cm.reset(new CookieMonster(nullptr));
   GetAllCookies(cm.get());  // Force init.
   cm->FlushStore(base::Closure());
   base::RunLoop().RunUntilIdle();
@@ -2527,12 +2519,12 @@
   EXPECT_CALL(*store, SetBeforeFlushCallback(testing::_)).Times(2);
 
   std::unique_ptr<CookieMonster> cm(
-      new CookieMonster(store.get(), channel_id_service.get(), nullptr));
+      new CookieMonster(store.get(), channel_id_service.get()));
 }
 
 TEST_F(CookieMonsterTest, SetAllCookies) {
   scoped_refptr<FlushablePersistentStore> store(new FlushablePersistentStore());
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
   cm->SetPersistSessionCookies(true);
 
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "U=V; path=/"));
@@ -2581,7 +2573,7 @@
 // works).
 TEST_F(CookieMonsterTest, DeleteAll) {
   scoped_refptr<FlushablePersistentStore> store(new FlushablePersistentStore());
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
   cm->SetPersistSessionCookies(true);
 
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(), "X=Y; path=/"));
@@ -2592,7 +2584,7 @@
 }
 
 TEST_F(CookieMonsterTest, HistogramCheck) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   // Should match call in InitializeHistograms, but doesn't really matter
   // since the histogram should have been initialized by the CM construction
   // above.
@@ -2634,7 +2626,7 @@
 // CookieStore if the "persist session cookies" option is on.
 TEST_F(CookieMonsterTest, PersistSessionCookies) {
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
   cm->SetPersistSessionCookies(true);
 
   // All cookies set with SetCookie are session cookies.
@@ -2670,7 +2662,7 @@
 // Test the commands sent to the persistent cookie store.
 TEST_F(CookieMonsterTest, PersisentCookieStorageTest) {
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Add a cookie.
   EXPECT_TRUE(SetCookie(cm.get(), http_www_foo_.url(),
@@ -2739,7 +2731,7 @@
   // Inject our initial cookies into the mock PersistentCookieStore.
   store->SetLoadExpectation(true, std::move(initial_cookies));
 
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   EXPECT_EQ("foo=bar; hello=world", GetCookies(cm.get(), url));
 }
@@ -2750,7 +2742,7 @@
   const std::string cookie_source_histogram = "Cookie.CookieSourceScheme";
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   histograms.ExpectTotalCount(cookie_source_histogram, 0);
 
@@ -2812,7 +2804,7 @@
   const std::string cookie_source_histogram = "Cookie.CookieDeleteEquivalent";
 
   scoped_refptr<MockPersistentCookieStore> store(new MockPersistentCookieStore);
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get(), nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(store.get()));
 
   // Set a secure cookie from a secure origin
   EXPECT_TRUE(SetCookie(cm.get(), https_www_foo_.url(), "A=B; Secure"));
@@ -2904,7 +2896,7 @@
 }
 
 TEST_F(CookieMonsterTest, SetSecureCookies) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   GURL http_url("http://www.foo.com");
   GURL http_superdomain_url("http://foo.com");
   GURL https_url("https://www.foo.com");
@@ -3107,7 +3099,7 @@
 // Tests that strict secure cookies doesn't trip equivalent cookie checks
 // accidentally. Regression test for https://crbug.com/569943.
 TEST_F(CookieMonsterTest, EquivalentCookies) {
-  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  std::unique_ptr<CookieMonster> cm(new CookieMonster(nullptr));
   GURL http_url("http://www.foo.com");
   GURL http_superdomain_url("http://foo.com");
   GURL https_url("https://www.foo.com");
@@ -3130,7 +3122,7 @@
   CookieMonsterNotificationTest()
       : test_url_("http://www.foo.com/foo"),
         store_(new MockPersistentCookieStore),
-        monster_(new CookieMonster(store_.get(), nullptr)) {}
+        monster_(new CookieMonster(store_.get())) {}
 
   ~CookieMonsterNotificationTest() override = default;
 
@@ -3162,7 +3154,7 @@
 
   // Bind it to a CookieMonster
   std::unique_ptr<CookieMonster> monster(
-      std::make_unique<CookieMonster>(store.get(), nullptr));
+      std::make_unique<CookieMonster>(store.get()));
 
   // Trigger load dispatch and confirm it.
   monster->GetAllCookiesAsync(CookieStore::GetCookieListCallback());
diff --git a/net/cookies/cookie_store_test_helpers.cc b/net/cookies/cookie_store_test_helpers.cc
index 42c6357..57573da4 100644
--- a/net/cookies/cookie_store_test_helpers.cc
+++ b/net/cookies/cookie_store_test_helpers.cc
@@ -63,7 +63,7 @@
 }
 
 DelayedCookieMonster::DelayedCookieMonster()
-    : cookie_monster_(new CookieMonster(nullptr, nullptr, nullptr)),
+    : cookie_monster_(new CookieMonster(nullptr, nullptr)),
       did_run_(false),
       result_(false) {}
 
diff --git a/net/data/websocket/OWNERS b/net/data/websocket/OWNERS
index 4546121..d5f5069 100644
--- a/net/data/websocket/OWNERS
+++ b/net/data/websocket/OWNERS
@@ -1,5 +1,4 @@
 ricea@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
index c9eaeb0..3c076e1b 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -28,7 +28,6 @@
 #include "net/cookies/cookie_constants.h"
 #include "net/cookies/cookie_util.h"
 #include "net/extras/sqlite/cookie_crypto_delegate.h"
-#include "net/log/net_log.h"
 #include "sql/error_delegate_util.h"
 #include "sql/meta_table.h"
 #include "sql/statement.h"
@@ -129,7 +128,7 @@
 
   // Commit any pending operations and close the database.  This must be called
   // before the object is destructed.
-  void Close(base::OnceClosure callback);
+  void Close(const base::Closure& callback);
 
   // Post background delete of all cookies that match |cookies|.
   void DeleteAllInList(const std::list<CookieOrigin>& cookies);
@@ -222,7 +221,7 @@
   // Commit our pending operations to the database.
   void Commit();
   // Close() executed on the background runner.
-  void InternalBackgroundClose(base::OnceClosure callback);
+  void InternalBackgroundClose(const base::Closure& callback);
 
   void DeleteSessionCookiesOnStartup();
 
@@ -562,7 +561,7 @@
 void SQLitePersistentCookieStore::Backend::FlushAndNotifyInBackground(
     base::OnceClosure callback) {
   Commit();
-  if (callback)
+  if (!callback.is_null())
     PostClientTask(FROM_HERE, std::move(callback));
 }
 
@@ -1292,19 +1291,19 @@
 // Fire off a close message to the background runner.  We could still have a
 // pending commit timer or Load operations holding references on us, but if/when
 // this fires we will already have been cleaned up and it will be ignored.
-void SQLitePersistentCookieStore::Backend::Close(base::OnceClosure callback) {
+void SQLitePersistentCookieStore::Backend::Close(
+    const base::Closure& callback) {
   if (background_task_runner_->RunsTasksInCurrentSequence()) {
-    InternalBackgroundClose(std::move(callback));
+    InternalBackgroundClose(callback);
   } else {
     // Must close the backend on the background runner.
-    PostBackgroundTask(FROM_HERE,
-                       base::BindOnce(&Backend::InternalBackgroundClose, this,
-                                      std::move(callback)));
+    PostBackgroundTask(FROM_HERE, base::Bind(&Backend::InternalBackgroundClose,
+                                             this, callback));
   }
 }
 
 void SQLitePersistentCookieStore::Backend::InternalBackgroundClose(
-    base::OnceClosure callback) {
+    const base::Closure& callback) {
   DCHECK(background_task_runner_->RunsTasksInCurrentSequence());
   // Commit any pending operations
   Commit();
@@ -1313,8 +1312,8 @@
   db_.reset();
 
   // We're clean now.
-  if (callback)
-    std::move(callback).Run();
+  if (!callback.is_null())
+    callback.Run();
 }
 
 void SQLitePersistentCookieStore::Backend::DatabaseErrorCallback(
@@ -1456,7 +1455,8 @@
                            client_task_runner,
                            background_task_runner,
                            restore_old_session_cookies,
-                           crypto_delegate)) {}
+                           crypto_delegate)) {
+}
 
 void SQLitePersistentCookieStore::DeleteAllInList(
     const std::list<CookieOrigin>& cookies) {
@@ -1464,66 +1464,33 @@
     backend_->DeleteAllInList(cookies);
 }
 
-void SQLitePersistentCookieStore::Close() {
+void SQLitePersistentCookieStore::Close(const base::Closure& callback) {
   if (backend_) {
-    net_log_.AddEvent(
-        NetLogEventType::COOKIE_STORE_PERSISTENT_CLOSED,
-        NetLog::StringCallback("type", "SQLitePersistentCookieStore"));
-
-    backend_->Close(base::OnceClosure());
+    backend_->Close(callback);
 
     // We release our reference to the Backend, though it will probably still
     // have a reference if the background runner has not run
     // Backend::InternalBackgroundClose() yet.
     backend_ = nullptr;
   }
-  // Guarantee that the underlying NetLog won't be accessed after this point,
-  // as reference counting may mean that |*this| survives its consumer.
-  net_log_ = NetLogWithSource();
 }
 
-void SQLitePersistentCookieStore::Load(const LoadedCallback& loaded_callback,
-                                       const NetLogWithSource& net_log) {
-  DCHECK(loaded_callback);
-  net_log_ = net_log;
-  if (backend_) {
-    net_log_.AddEvent(NetLogEventType::COOKIE_STORE_GLOBAL_LOAD_STARTED);
-    backend_->Load(
-        // Note that this implicitly takes advantage of this class being
-        // referenced counted to make sure that loaded_callback will
-        // actually be called.  If this class is ever converted over
-        // to a WeakPtr<> pattern (as TODO it should be) this will need
-        // to be replaced by a more complex pattern that guarantees
-        // loaded_callback being called even if the class has been
-        // destroyed.
-        base::BindRepeating(&SQLitePersistentCookieStore::CompleteLoad, this,
-                            loaded_callback));
-  } else {
+void SQLitePersistentCookieStore::Load(const LoadedCallback& loaded_callback) {
+  DCHECK(!loaded_callback.is_null());
+  if (backend_)
+    backend_->Load(loaded_callback);
+  else
     loaded_callback.Run(std::vector<std::unique_ptr<CanonicalCookie>>());
-  }
 }
 
 void SQLitePersistentCookieStore::LoadCookiesForKey(
     const std::string& key,
     const LoadedCallback& loaded_callback) {
-  DCHECK(loaded_callback);
-  if (backend_) {
-    net_log_.AddEvent(NetLogEventType::COOKIE_STORE_KEY_LOAD_STARTED,
-                      NetLog::StringCallback("domain", &key));
-    backend_->LoadCookiesForKey(
-        // Note that this implicitly takes advantage of this class being
-        // referenced counted to make sure that loaded_callback will
-        // actually be called.  If this class is ever converted over
-        // to a WeakPtr<> pattern (as TODO it should be) this will need
-        // to be replaced by a more complex pattern that guarantees
-        // loaded_callback being called even if the class has been
-        // destroyed.
-        key,
-        base::BindRepeating(&SQLitePersistentCookieStore::CompleteKeyedLoad,
-                            this, key, loaded_callback));
-  } else {
+  DCHECK(!loaded_callback.is_null());
+  if (backend_)
+    backend_->LoadCookiesForKey(key, loaded_callback);
+  else
     loaded_callback.Run(std::vector<std::unique_ptr<CanonicalCookie>>());
-  }
 }
 
 void SQLitePersistentCookieStore::AddCookie(const CanonicalCookie& cc) {
@@ -1558,23 +1525,7 @@
 }
 
 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() {
-  Close();
-}
-
-void SQLitePersistentCookieStore::CompleteLoad(
-    const LoadedCallback& callback,
-    std::vector<std::unique_ptr<CanonicalCookie>> cookie_list) {
-  callback.Run(std::move(cookie_list));
-  net_log_.AddEvent(NetLogEventType::COOKIE_STORE_GLOBAL_LOAD_COMPLETED);
-}
-
-void SQLitePersistentCookieStore::CompleteKeyedLoad(
-    const std::string& key,
-    const LoadedCallback& callback,
-    std::vector<std::unique_ptr<CanonicalCookie>> cookie_list) {
-  callback.Run(std::move(cookie_list));
-  net_log_.AddEvent(NetLogEventType::COOKIE_STORE_KEY_LOAD_COMPLETED,
-                    NetLog::StringCallback("domain", &key));
+  Close(base::Closure());
 }
 
 }  // namespace net
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.h b/net/extras/sqlite/sqlite_persistent_cookie_store.h
index b92f7cb..f1a14f48 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.h
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "net/cookies/cookie_monster.h"
-#include "net/log/net_log_with_source.h"
 
 namespace base {
 class FilePath;
@@ -48,9 +47,15 @@
   // Deletes the cookies whose origins match those given in |cookies|.
   void DeleteAllInList(const std::list<CookieOrigin>& cookies);
 
+  // Closes the database backend and fires |callback| on the worker
+  // thread. After Close() is called, further calls to the
+  // PersistentCookieStore methods will do nothing, with Load() and
+  // LoadCookiesForKey() additionally calling their callback methods
+  // with an empty vector of CanonicalCookies.
+  void Close(const base::Closure& callback);
+
   // CookieMonster::PersistentCookieStore:
-  void Load(const LoadedCallback& loaded_callback,
-            const NetLogWithSource& /* net_log */) override;
+  void Load(const LoadedCallback& loaded_callback) override;
   void LoadCookiesForKey(const std::string& key,
                          const LoadedCallback& callback) override;
   void AddCookie(const CanonicalCookie& cc) override;
@@ -59,23 +64,14 @@
   void SetForceKeepSessionState() override;
   void SetBeforeFlushCallback(base::RepeatingClosure callback) override;
   void Flush(base::OnceClosure callback) override;
-  void Close() override;
 
  private:
   ~SQLitePersistentCookieStore() override;
-  void CompleteLoad(const LoadedCallback& callback,
-                    std::vector<std::unique_ptr<CanonicalCookie>> cookie_list);
-  void CompleteKeyedLoad(
-      const std::string& key,
-      const LoadedCallback& callback,
-      std::vector<std::unique_ptr<CanonicalCookie>> cookie_list);
 
   class Backend;
 
   scoped_refptr<Backend> backend_;
 
-  NetLogWithSource net_log_;
-
   DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);
 };
 
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc b/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc
index f7bc91d..47a1aa23 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc
@@ -20,7 +20,6 @@
 #include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_constants.h"
 #include "net/extras/sqlite/cookie_crypto_delegate.h"
-#include "net/log/net_log_with_source.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/perf/perf_test.h"
 #include "url/gurl.h"
@@ -67,8 +66,7 @@
 
   void Load() {
     store_->Load(base::Bind(&SQLitePersistentCookieStorePerfTest::OnLoaded,
-                            base::Unretained(this)),
-                 net_log_);
+                            base::Unretained(this)));
     loaded_event_.Wait();
   }
 
@@ -154,7 +152,6 @@
   base::ScopedTempDir temp_dir_;
   scoped_refptr<SQLitePersistentCookieStore> store_;
   base::Time perf_measurement_start_;
-  NetLogWithSource net_log_;
 };
 
 // Test the performance of priority load of cookies for a specific domain key
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
index c88ff65..5f6caf4a 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
@@ -108,9 +108,8 @@
 
   void Load(CanonicalCookieVector* cookies) {
     EXPECT_FALSE(loaded_event_.IsSignaled());
-    store_->Load(base::BindRepeating(&SQLitePersistentCookieStoreTest::OnLoaded,
-                                     base::Unretained(this)),
-                 NetLogWithSource());
+    store_->Load(base::Bind(&SQLitePersistentCookieStoreTest::OnLoaded,
+                            base::Unretained(this)));
     loaded_event_.Wait();
     cookies->swap(cookies_);
   }
@@ -311,8 +310,7 @@
       FROM_HERE, base::Bind(&SQLitePersistentCookieStoreTest::WaitOnDBEvent,
                             base::Unretained(this)));
   store_->Load(base::Bind(&SQLitePersistentCookieStoreTest::OnLoaded,
-                          base::Unretained(this)),
-               NetLogWithSource());
+                          base::Unretained(this)));
   t += base::TimeDelta::FromMicroseconds(10);
   AddCookieWithExpiration("A", "B", "c.com", "/", t, base::Time());
   base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
@@ -340,8 +338,7 @@
       temp_dir_.GetPath().Append(kCookieFilename), client_task_runner_,
       background_task_runner_, true, nullptr);
   store_->Load(base::Bind(&SQLitePersistentCookieStoreTest::OnLoaded,
-                          base::Unretained(this)),
-               NetLogWithSource());
+                          base::Unretained(this)));
   loaded_event_.Wait();
   ASSERT_EQ(4u, cookies_.size());
   cookies_.clear();
@@ -378,8 +375,7 @@
       FROM_HERE, base::Bind(&SQLitePersistentCookieStoreTest::WaitOnDBEvent,
                             base::Unretained(this)));
   store_->Load(base::Bind(&SQLitePersistentCookieStoreTest::OnLoaded,
-                          base::Unretained(this)),
-               NetLogWithSource());
+                          base::Unretained(this)));
   base::RunLoop run_loop;
   store_->LoadCookiesForKey(
       "aaa.com", base::Bind(&SQLitePersistentCookieStoreTest::OnKeyLoaded,
@@ -886,14 +882,12 @@
 
   // Create the cookie store, but immediately close it.
   Create(false, false);
-  store_->Close();
+  store_->Close(base::Closure());
 
   // Expect any attempt to call Load() to synchronously respond with an empty
   // vector of cookies after we've Close()d the database.
   bool was_called_with_no_cookies = false;
-  store_->Load(
-      base::BindRepeating(WasCalledWithNoCookies, &was_called_with_no_cookies),
-      NetLogWithSource());
+  store_->Load(base::Bind(WasCalledWithNoCookies, &was_called_with_no_cookies));
   EXPECT_TRUE(was_called_with_no_cookies);
 
   // Same with trying to load a specific cookie.
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index aca3e65..7c069f0 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -137,7 +137,7 @@
     proxy_ssl_config_.rev_checking_enabled = false;
   }
 
-  if (request_info->method != "POST") {
+  if (HttpUtil::IsMethodSafe(request_info->method)) {
     can_send_early_data_ = true;
   }
 
diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h
index eede2dd..e23f2e6 100644
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -3219,106 +3219,3 @@
 // This event is created when the HostCachePersistenceManager starts the timer
 // for writing a cache change to prefs.
 EVENT_TYPE(HOST_CACHE_PERSISTENCE_START_TIMER)
-
-// -----------------------------------------------------------------------------
-// CookieStore related events
-// -----------------------------------------------------------------------------
-
-// Event emitted on store creation/deletion
-//  {
-//    "persistent_store": <Whether there is an attached persistent store>,
-//    "channel_id_services": <Whether there is an attached channel id service>,
-//  }
-EVENT_TYPE(COOKIE_STORE_ALIVE)
-
-// Event emitted on cookie addition
-//  {
-//    "name": <Name of the cookie added>
-//    "value": <Value of the cookie added>
-//    "domain": <Domain of the cookie added>
-//    "path": <Path of the cookie added>
-//    "is_persistent": <Whether or not the cookie is persistent>
-//    "sync_requested": <Whether sync to the backing store was requested>
-//  }
-EVENT_TYPE(COOKIE_STORE_COOKIE_ADDED)
-
-// Event emitted on cookie deletion
-//  {
-//    "name": <Name of the cookie added>
-//    "value": <Value of the cookie added>
-//    "domain": <Domain of the cookie added>
-//    "path": <Path of the cookie added>
-//    "deletion_cause": <Reason the cookie was deleted>
-//    "httponly": <httponly field of the cookie>
-//    "secure": <If the cookie is a secure cookie>
-//    "priority": <priority of the cookie>
-//    "samesite": <SameSite setting for the cookie>
-//    "is_persistent": <Whether or not the cookie is persistent>
-//    "sync_requested": <Whether sync to the backing store was requested>
-//  }
-EVENT_TYPE(COOKIE_STORE_COOKIE_DELETED)
-
-// Event emitted on rejection of a cookie addition because of a conflict
-// with a secure cookie that would have been deleted.
-//  {
-//    "name": <Name of the cookies>
-//    "domain": <Domain of the cookies>
-//    "oldpath": <Path of the cookie that would have been deleted>
-//    "newpath": <Path of the cookie that would have been added>
-//    "oldvalue": <Value of the cookie that would have been deleted>
-//    "newvalue": <Value of the cookie that would have been added>
-//  }
-EVENT_TYPE(COOKIE_STORE_COOKIE_REJECTED_SECURE)
-
-// Event emitted on rejection of a cookie addition because of a conflict
-// with an httponly cookie.
-//  {
-//    "name": <Name of the cookies>
-//    "domain": <Domain of the cookies>
-//    "path": <Path of the cookies>
-//    "oldvalue": <Value of the cookie that would have been deleted>
-//    "newvalue": <Value of the cookie that would have been added>
-//  }
-EVENT_TYPE(COOKIE_STORE_COOKIE_REJECTED_HTTPONLY)
-
-// Event emitted on setting store session persistence
-//  {
-//    "persistence" : <Session persistence setting for the store>
-//  }
-EVENT_TYPE(COOKIE_STORE_SESSION_PERSISTENCE)
-
-// Event emitted when a particular origin is removed from the persistent
-// store on shutdown.
-//  {
-//    "origin": <Origin being filtered>
-//    "secure": <Secure status of origin>
-//  }
-EVENT_TYPE(COOKIE_STORE_ORIGIN_FILTERED)
-
-// Event emitted when the persistent database load is started.
-//  {
-//  }
-EVENT_TYPE(COOKIE_STORE_GLOBAL_LOAD_STARTED)
-
-// Event emitted when the persistent database load is completed.
-//  {
-//  }
-EVENT_TYPE(COOKIE_STORE_GLOBAL_LOAD_COMPLETED)
-
-// Event emitted when load for a particular key is started.
-//  {
-//    "domain": <Domain to be loaded>
-//  }
-EVENT_TYPE(COOKIE_STORE_KEY_LOAD_STARTED)
-
-// Event emitted when load for a particular key is completed.
-//  {
-//    "domain": <Domain to be loaded>
-//  }
-EVENT_TYPE(COOKIE_STORE_KEY_LOAD_COMPLETED)
-
-// Event emitted when a persistent store has been closed.
-//  {
-//    "type": <Classname of persistent cookie store>
-//  }
-EVENT_TYPE(COOKIE_STORE_PERSISTENT_CLOSED)
diff --git a/net/log/net_log_source_type_list.h b/net/log/net_log_source_type_list.h
index e4c1d932..31e484b 100644
--- a/net/log/net_log_source_type_list.h
+++ b/net/log/net_log_source_type_list.h
@@ -41,4 +41,3 @@
 SOURCE_TYPE(QUIC_STREAM_FACTORY_JOB)
 SOURCE_TYPE(HTTP_SERVER_PROPERTIES)
 SOURCE_TYPE(HOST_CACHE_PERSISTENCE_MANAGER)
-SOURCE_TYPE(COOKIE_STORE)
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.cc b/net/quic/chromium/bidirectional_stream_quic_impl.cc
index e809c3e1..599bdf6 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl.cc
@@ -12,6 +12,7 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/timer/timer.h"
 #include "net/http/bidirectional_stream_request_info.h"
+#include "net/http/http_util.h"
 #include "net/quic/core/quic_connection.h"
 #include "net/quic/platform/api/quic_string_piece.h"
 #include "net/socket/next_proto.h"
@@ -81,7 +82,7 @@
 
   // TODO(https://crbug.com/656607): Add proper annotation here.
   int rv = session_->RequestStream(
-      request_info_->method == "POST",
+      !HttpUtil::IsMethodSafe(request_info_->method),
       base::Bind(&BidirectionalStreamQuicImpl::OnStreamReady,
                  weak_factory_.GetWeakPtr()),
       NO_TRAFFIC_ANNOTATION_BUG_656607);
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
index 79794cd..11cfc67 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
@@ -1465,84 +1465,6 @@
       delegate->GetTotalReceivedBytes());
 }
 
-TEST_P(BidirectionalStreamQuicImplTest, PutRequest) {
-  SetRequest("PUT", "/", DEFAULT_PRIORITY);
-  size_t spdy_request_headers_frame_length;
-  AddWrite(ConstructRequestHeadersPacket(1, !kFin, DEFAULT_PRIORITY,
-                                         &spdy_request_headers_frame_length));
-  AddWrite(ConstructDataPacket(2, kIncludeVersion, kFin, 0, kUploadData,
-                               &client_maker_));
-  AddWrite(ConstructClientAckPacket(3, 3, 1, 1));
-
-  Initialize();
-
-  BidirectionalStreamRequestInfo request;
-  request.method = "PUT";
-  request.url = GURL("http://www.google.com/");
-  request.end_stream_on_headers = false;
-  request.priority = DEFAULT_PRIORITY;
-
-  scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  std::unique_ptr<TestDelegateBase> delegate(
-      new TestDelegateBase(read_buffer.get(), kReadBufferSize));
-  delegate->Start(&request, net_log().bound(),
-                  session()->CreateHandle(destination_));
-  delegate->WaitUntilNextCallback(kOnStreamReady);
-
-  // Send a DATA frame.
-  scoped_refptr<StringIOBuffer> buf(new StringIOBuffer(kUploadData));
-
-  delegate->SendData(buf, buf->size(), true);
-  delegate->WaitUntilNextCallback(kOnDataSent);
-
-  // Server acks the request.
-  ProcessPacket(ConstructServerAckPacket(1, 0, 0, 0));
-
-  // Server sends the response headers.
-  SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
-  size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
-  ProcessPacket(ConstructResponseHeadersPacket(
-      2, !kFin, std::move(response_headers),
-      &spdy_response_headers_frame_length, &offset));
-
-  delegate->WaitUntilNextCallback(kOnHeadersReceived);
-  TestCompletionCallback cb;
-  int rv = delegate->ReadData(cb.callback());
-  EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
-  EXPECT_EQ("200", delegate->response_headers().find(":status")->second);
-  const char kResponseBody[] = "Hello world!";
-  // Server sends data.
-  ProcessPacket(
-      ConstructServerDataPacket(3, !kIncludeVersion, !kFin, 0, kResponseBody));
-
-  EXPECT_EQ(static_cast<int>(strlen(kResponseBody)), cb.WaitForResult());
-
-  size_t spdy_trailers_frame_length;
-  SpdyHeaderBlock trailers;
-  trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
-  // Server sends trailers.
-  ProcessPacket(ConstructResponseTrailersPacket(
-      4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
-
-  delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
-  EXPECT_EQ(trailers, delegate->trailers());
-  EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
-
-  EXPECT_EQ(1, delegate->on_data_read_count());
-  EXPECT_EQ(1, delegate->on_data_sent_count());
-  EXPECT_EQ(kProtoQUIC, delegate->GetProtocol());
-  EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length +
-                                 strlen(kUploadData)),
-            delegate->GetTotalSentBytes());
-  EXPECT_EQ(
-      static_cast<int64_t>(spdy_response_headers_frame_length +
-                           strlen(kResponseBody) + spdy_trailers_frame_length),
-      delegate->GetTotalReceivedBytes());
-}
-
 TEST_P(BidirectionalStreamQuicImplTest, InterleaveReadDataAndSendData) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index 50092af8..c8e6c5d 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -1774,12 +1774,10 @@
   if (packet->packet_number < sent_packet_manager_.GetLargestSentPacket()) {
     QUIC_BUG << "Attempt to write packet:" << packet->packet_number
              << " after:" << sent_packet_manager_.GetLargestSentPacket();
-    CloseConnection(QUIC_INTERNAL_ERROR, "Packet written out of order.",
-                    ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
-
     UMA_HISTOGRAM_COUNTS_1000("Net.QuicSession.NumQueuedPacketsAtOutOfOrder",
                               queued_packets_.size());
-
+    CloseConnection(QUIC_INTERNAL_ERROR, "Packet written out of order.",
+                    ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
     RecordInternalErrorLocation(QUIC_CONNECTION_WRITE_PACKET);
     return true;
   }
diff --git a/net/spdy/chromium/spdy_network_transaction_unittest.cc b/net/spdy/chromium/spdy_network_transaction_unittest.cc
index 99e86e55..9092511 100644
--- a/net/spdy/chromium/spdy_network_transaction_unittest.cc
+++ b/net/spdy/chromium/spdy_network_transaction_unittest.cc
@@ -29,6 +29,7 @@
 #include "net/http/http_network_session.h"
 #include "net/http/http_network_session_peer.h"
 #include "net/http/http_network_transaction.h"
+#include "net/http/http_response_info.h"
 #include "net/http/http_server_properties.h"
 #include "net/http/http_transaction_test_util.h"
 #include "net/log/net_log_event_type.h"
diff --git a/net/spdy/chromium/spdy_test_util_common.cc b/net/spdy/chromium/spdy_test_util_common.cc
index ff573ab..23320ce6 100644
--- a/net/spdy/chromium/spdy_test_util_common.cc
+++ b/net/spdy/chromium/spdy_test_util_common.cc
@@ -99,8 +99,7 @@
   for (int i = 0; i < extra_header_count; i++) {
     SpdyStringPiece key(extra_headers[i * 2]);
     SpdyStringPiece value(extra_headers[i * 2 + 1]);
-    DCHECK(!key.empty()) << "Empty header key.";
-    DCHECK(!value.empty()) << "Empty header value.";
+    DCHECK(!key.empty()) << "Header key must not be empty.";
     headers->AppendValueOrAddHeader(key, value);
   }
 }
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 9d8f225f..442addd2 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -449,8 +449,7 @@
     storage->set_cookie_store(std::move(cookie_store_));
     storage->set_channel_id_service(std::move(channel_id_service_));
   } else {
-    std::unique_ptr<CookieStore> cookie_store(
-        new CookieMonster(nullptr, nullptr));
+    std::unique_ptr<CookieStore> cookie_store(new CookieMonster(nullptr));
     std::unique_ptr<ChannelIDService> channel_id_service(
         new ChannelIDService(new DefaultChannelIDStore(NULL)));
     cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
diff --git a/net/url_request/url_request_netlog_params.h b/net/url_request/url_request_netlog_params.h
index 11be7db..2d672f5 100644
--- a/net/url_request/url_request_netlog_params.h
+++ b/net/url_request/url_request_netlog_params.h
@@ -27,7 +27,7 @@
 NET_EXPORT std::unique_ptr<base::Value> NetLogURLRequestConstructorCallback(
     const GURL* url,
     RequestPriority priority,
-    NetLogCaptureMode capture_mode);
+    NetLogCaptureMode /* capture_mode */);
 
 // Returns a Value containing NetLog parameters for starting a URLRequest.
 NET_EXPORT std::unique_ptr<base::Value> NetLogURLRequestStartCallback(
@@ -35,7 +35,7 @@
     const std::string* method,
     int load_flags,
     int64_t upload_id,
-    NetLogCaptureMode capture_mode);
+    NetLogCaptureMode /* capture_mode */);
 
 }  // namespace net
 
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 108d764..23c7038 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -100,8 +100,7 @@
   }
   // In-memory cookie store.
   if (!cookie_store())
-    context_storage_.set_cookie_store(
-        std::make_unique<CookieMonster>(nullptr, nullptr));
+    context_storage_.set_cookie_store(std::make_unique<CookieMonster>(nullptr));
 
   // In-memory Channel ID service.  Must be created before the
   // HttpNetworkSession.
diff --git a/net/websockets/OWNERS b/net/websockets/OWNERS
index 74c62dc..d5f5069 100644
--- a/net/websockets/OWNERS
+++ b/net/websockets/OWNERS
@@ -1,4 +1,3 @@
-tyoshino@chromium.org
 ricea@chromium.org
 yhirano@chromium.org
 
diff --git a/net/websockets/websocket_basic_stream_adapters_test.cc b/net/websockets/websocket_basic_stream_adapters_test.cc
index 9e6f764..9a800ff 100644
--- a/net/websockets/websocket_basic_stream_adapters_test.cc
+++ b/net/websockets/websocket_basic_stream_adapters_test.cc
@@ -318,7 +318,7 @@
 
   void AddSSLSocketData() {
     ssl_.ssl_info.cert =
-        ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
+        ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
     ASSERT_TRUE(ssl_.ssl_info.cert);
     session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_);
   }
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index 7c45da2..31c13e9b1 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -51,17 +51,6 @@
 
 enum HandshakeStreamType { BASIC_HANDSHAKE_STREAM, HTTP2_HANDSHAKE_STREAM };
 
-std::string WebSocketExtraHeadersToString(WebSocketExtraHeaders headers) {
-  std::string answer;
-  for (const auto& header : headers) {
-    answer.append(header.first);
-    answer.append(": ");
-    answer.append(header.second);
-    answer.append("\r\n");
-  }
-  return answer;
-}
-
 // This class encapsulates the details of creating a mock ClientSocketHandle.
 class MockClientSocketHandleFactory {
  public:
@@ -214,7 +203,7 @@
 
         SSLSocketDataProvider ssl(ASYNC, OK);
         ssl.ssl_info.cert =
-            ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
+            ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
 
         SpdySessionDependencies session_deps;
         session_deps.socket_factory->AddSocketDataProvider(&data);
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index f22756c..1bae49e7 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -15,6 +15,7 @@
 #include "net/base/url_util.h"
 #include "net/http/http_request_headers.h"
 #include "net/http/http_response_headers.h"
+#include "net/http/http_response_info.h"
 #include "net/http/http_status_code.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "net/url_request/redirect_info.h"
@@ -329,6 +330,20 @@
   }
   const int response_code = request->GetResponseCode();
   DVLOG(3) << "OnResponseStarted (response code " << response_code << ")";
+
+  if (request->response_info().connection_info ==
+      HttpResponseInfo::CONNECTION_INFO_HTTP2) {
+    if (response_code == HTTP_OK) {
+      result_ = CONNECTED;
+      owner_->PerformUpgrade();
+      return;
+    }
+
+    result_ = FAILED;
+    owner_->ReportFailure(net_error);
+    return;
+  }
+
   switch (response_code) {
     case HTTP_SWITCHING_PROTOCOLS:
       result_ = CONNECTED;
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index def32a2..881d43e 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -17,6 +17,7 @@
 #include "base/metrics/statistics_recorder.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
+#include "base/test/histogram_tester.h"
 #include "base/timer/mock_timer.h"
 #include "base/timer/timer.h"
 #include "net/base/net_errors.h"
@@ -25,6 +26,8 @@
 #include "net/proxy_resolution/proxy_service.h"
 #include "net/socket/client_socket_handle.h"
 #include "net/socket/socket_test_util.h"
+#include "net/spdy/chromium/spdy_test_util_common.h"
+#include "net/spdy/core/spdy_protocol.h"
 #include "net/test/cert_test_util.h"
 #include "net/test/gtest_util.h"
 #include "net/test/test_data_directory.h"
@@ -38,11 +41,16 @@
 #include "url/gurl.h"
 #include "url/origin.h"
 
-using net::test::IsOk;
+using ::net::test::IsError;
+using ::net::test::IsOk;
+using ::testing::TestWithParam;
+using ::testing::Values;
 
 namespace net {
 namespace {
 
+enum HandshakeStreamType { BASIC_HANDSHAKE_STREAM, HTTP2_HANDSHAKE_STREAM };
+
 // Simple builder for a SequencedSocketData object to save repetitive code.
 // It always sets the connect data to MockConnect(SYNCHRONOUS, OK), so it cannot
 // be used in tests where the connect fails. In practice, those tests never have
@@ -72,25 +80,18 @@
       : MockTimer(retain_user_task, is_repeating) {}
 };
 
-static url::Origin LocalhostOrigin() {
-  return url::Origin::Create(GURL("http://localhost/"));
+static url::Origin Origin() {
+  return url::Origin::Create(GURL("http://www.example.org/"));
 }
 
-static GURL LocalhostUrl() {
-  return GURL("http://localhost/foobar");
+static GURL Url() {
+  return GURL("http://www.example.org/foobar");
 }
 
-static url::Origin GoogleOrigin() {
-  return url::Origin::Create(GURL("http://google.com/"));
-}
-
-static GURL GoogleUrl() {
-  return GURL("http://google.com/foobar");
-}
-
-class WebSocketStreamCreateTest : public ::testing::Test,
+class WebSocketStreamCreateTest : public TestWithParam<HandshakeStreamType>,
                                   public WebSocketStreamCreateTestBase {
- public:
+ protected:
+  WebSocketStreamCreateTest() : stream_type_(GetParam()), sequence_number_(0) {}
   ~WebSocketStreamCreateTest() override {
     // Permit any endpoint locks to be released.
     stream_request_.reset();
@@ -98,29 +99,18 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  void CreateAndConnectCustomResponse(
-      const std::string& socket_url,
-      const std::string& socket_host,
-      const std::string& socket_path,
-      const std::vector<std::string>& sub_protocols,
-      const url::Origin& origin,
-      const GURL& site_for_cookies,
-      const std::string& send_additional_request_headers,
-      const std::string& extra_request_headers,
-      const std::string& response_body,
-      std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
-    url_request_context_host_.SetExpectations(
-        WebSocketStandardRequest(socket_path, socket_host, origin,
-                                 send_additional_request_headers,
-                                 extra_request_headers),
-        response_body);
-    CreateAndConnectStream(GURL(socket_url), sub_protocols, origin,
-                           site_for_cookies, send_additional_request_headers,
-                           std::move(timer));
+  void AddSSLData() {
+    auto ssl_data = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
+    ssl_data->ssl_info.cert =
+        ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
+    if (stream_type_ == HTTP2_HANDSHAKE_STREAM)
+      ssl_data->next_proto = kProtoHTTP2;
+    ASSERT_TRUE(ssl_data->ssl_info.cert.get());
+    url_request_context_host_.AddSSLSocketDataProvider(std::move(ssl_data));
   }
 
-  // |extra_request_headers| and |extra_response_headers| must end in "\r\n" or
-  // errors like "Unable to perform synchronous IO while stopped" will occur.
+  // Set up mock data and start websockets request, either for WebSocket
+  // upgraded from an HTTP/1 connection, or for a WebSocket request over HTTP/2.
   void CreateAndConnectStandard(
       const std::string& socket_url,
       const std::string& socket_host,
@@ -128,17 +118,200 @@
       const std::vector<std::string>& sub_protocols,
       const url::Origin& origin,
       const GURL& site_for_cookies,
-      const std::string& send_additional_request_headers,
-      const std::string& extra_request_headers,
-      const std::string& extra_response_headers,
-      std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
-    CreateAndConnectCustomResponse(
-        socket_url, socket_host, socket_path, sub_protocols, origin,
-        site_for_cookies, send_additional_request_headers,
-        extra_request_headers,
-        WebSocketStandardResponse(extra_response_headers), std::move(timer));
+      const WebSocketExtraHeaders& send_additional_request_headers,
+      const WebSocketExtraHeaders& extra_request_headers,
+      const WebSocketExtraHeaders& extra_response_headers,
+      std::unique_ptr<base::Timer> timer = {},
+      const std::string& additional_data = {}) {
+    if (stream_type_ == BASIC_HANDSHAKE_STREAM) {
+      url_request_context_host_.SetExpectations(
+          WebSocketStandardRequest(
+              socket_path, socket_host, origin,
+              WebSocketExtraHeadersToString(send_additional_request_headers),
+              WebSocketExtraHeadersToString(extra_request_headers)),
+          WebSocketStandardResponse(
+              WebSocketExtraHeadersToString(extra_response_headers)) +
+              additional_data);
+      CreateAndConnectStream(
+          GURL(socket_url), sub_protocols, origin, site_for_cookies,
+          WebSocketExtraHeadersToString(send_additional_request_headers),
+          std::move(timer));
+      return;
+    }
+
+    DCHECK_EQ(stream_type_, HTTP2_HANDSHAKE_STREAM);
+
+    // TODO(bnc): Find a way to clear
+    // spdy_session_pool.enable_sending_initial_data_ to avoid sending
+    // connection preface, initial settings, and window update.
+
+    // HTTP/2 connection preface.
+    frames_.push_back(
+        SpdySerializedFrame(const_cast<char*>(kHttp2ConnectionHeaderPrefix),
+                            kHttp2ConnectionHeaderPrefixSize,
+                            /* owns_buffer = */ false));
+    AddWrite(&frames_.back());
+
+    // Server advertises WebSockets over HTTP/2 support.
+    SettingsMap read_settings;
+    read_settings[SETTINGS_ENABLE_CONNECT_PROTOCOL] = 1;
+    frames_.push_back(spdy_util_.ConstructSpdySettings(read_settings));
+    AddRead(&frames_.back());
+
+    // Initial SETTINGS frame.
+    SettingsMap write_settings;
+    write_settings[SETTINGS_HEADER_TABLE_SIZE] = kSpdyMaxHeaderTableSize;
+    write_settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
+        kSpdyMaxConcurrentPushedStreams;
+    write_settings[SETTINGS_INITIAL_WINDOW_SIZE] = 6 * 1024 * 1024;
+    frames_.push_back(spdy_util_.ConstructSpdySettings(write_settings));
+    AddWrite(&frames_.back());
+
+    // Initial window update frame.
+    frames_.push_back(spdy_util_.ConstructSpdyWindowUpdate(0, 0x00ef0001));
+    AddWrite(&frames_.back());
+
+    // SETTINGS ACK sent as a response to server's SETTINGS frame.
+    frames_.push_back(spdy_util_.ConstructSpdySettingsAck());
+    AddWrite(&frames_.back());
+
+    // First request.  This is necessary, because a WebSockets request currently
+    // does not open a new HTTP/2 connection, it only uses an existing one.
+    const char* const kExtraRequestHeaders[] = {
+        "user-agent",      "",        "accept-encoding", "gzip, deflate",
+        "accept-language", "en-us,fr"};
+    frames_.push_back(spdy_util_.ConstructSpdyGet(
+        kExtraRequestHeaders, arraysize(kExtraRequestHeaders) / 2, 1,
+        DEFAULT_PRIORITY));
+    AddWrite(&frames_.back());
+
+    // SETTINGS ACK frame sent by the server in response to the client's
+    // initial SETTINGS frame.
+    frames_.push_back(spdy_util_.ConstructSpdySettingsAck());
+    AddRead(&frames_.back());
+
+    // Response headers to first request.
+    frames_.push_back(spdy_util_.ConstructSpdyGetReply(nullptr, 0, 1));
+    AddRead(&frames_.back());
+
+    // Response body to first request.
+    frames_.push_back(spdy_util_.ConstructSpdyDataFrame(1, true));
+    AddRead(&frames_.back());
+
+    // First request is closed.
+    spdy_util_.UpdateWithStreamDestruction(1);
+
+    // WebSocket request.
+    SpdyHeaderBlock request_headers =
+        WebSocketHttp2Request(socket_path, "www.example.org:443",
+                              "http://www.example.org", extra_request_headers);
+    frames_.push_back(spdy_util_.ConstructSpdyHeaders(
+        3, std::move(request_headers), DEFAULT_PRIORITY, false));
+    AddWrite(&frames_.back());
+
+    // Response to WebSocket request.
+    std::vector<std::string> extra_response_header_keys;
+    std::vector<const char*> extra_response_headers_vector;
+    for (const auto& extra_header : extra_response_headers) {
+      // Save a lowercase copy of the header key.
+      extra_response_header_keys.push_back(
+          base::ToLowerASCII(extra_header.first));
+      // Save a pointer to this lowercase copy.
+      extra_response_headers_vector.push_back(
+          extra_response_header_keys.back().c_str());
+      // Save a pointer to the original header value provided by the caller.
+      extra_response_headers_vector.push_back(extra_header.second.c_str());
+    }
+    frames_.push_back(spdy_util_.ConstructSpdyGetReply(
+        extra_response_headers_vector.data(),
+        extra_response_headers_vector.size() / 2, 3));
+    AddRead(&frames_.back());
+
+    // WebSocket data received.
+    if (!additional_data.empty()) {
+      frames_.push_back(
+          spdy_util_.ConstructSpdyDataFrame(3, additional_data, true));
+      AddRead(&frames_.back());
+    }
+
+    // Client cancels HTTP/2 stream when request is destroyed.
+    frames_.push_back(spdy_util_.ConstructSpdyRstStream(3, ERROR_CODE_CANCEL));
+    AddWrite(&frames_.back());
+
+    // EOF.
+    reads_.push_back(MockRead(ASYNC, 0, sequence_number_++));
+
+    auto socket_data = std::make_unique<SequencedSocketData>(
+        reads_.data(), reads_.size(), writes_.data(), writes_.size());
+    socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
+    url_request_context_host_.AddRawExpectations(std::move(socket_data));
+
+    // Send first request.  This makes sure server's
+    // SETTINGS_ENABLE_CONNECT_PROTOCOL advertisement is read.
+    TestURLRequestContext* context =
+        url_request_context_host_.GetURLRequestContext();
+    TestDelegate delegate;
+    std::unique_ptr<URLRequest> request = context->CreateRequest(
+        GURL("https://www.example.org/"), DEFAULT_PRIORITY, &delegate,
+        TRAFFIC_ANNOTATION_FOR_TESTS);
+    request->Start();
+    EXPECT_TRUE(request->is_pending());
+    base::RunLoop().Run();
+    EXPECT_FALSE(request->is_pending());
+
+    CreateAndConnectStream(
+        GURL(socket_url), sub_protocols, origin, site_for_cookies,
+        WebSocketExtraHeadersToString(send_additional_request_headers),
+        std::move(timer));
   }
 
+  // Like CreateAndConnectStandard(), but allow for arbitrary response body.
+  // Only for HTTP/1-based WebSockets.
+  void CreateAndConnectCustomResponse(
+      const std::string& socket_url,
+      const std::string& socket_host,
+      const std::string& socket_path,
+      const std::vector<std::string>& sub_protocols,
+      const url::Origin& origin,
+      const GURL& site_for_cookies,
+      const WebSocketExtraHeaders& send_additional_request_headers,
+      const WebSocketExtraHeaders& extra_request_headers,
+      const std::string& response_body) {
+    ASSERT_EQ(BASIC_HANDSHAKE_STREAM, stream_type_);
+
+    url_request_context_host_.SetExpectations(
+        WebSocketStandardRequest(
+            socket_path, socket_host, origin,
+            WebSocketExtraHeadersToString(send_additional_request_headers),
+            WebSocketExtraHeadersToString(extra_request_headers)),
+        response_body);
+    CreateAndConnectStream(
+        GURL(socket_url), sub_protocols, origin, site_for_cookies,
+        WebSocketExtraHeadersToString(send_additional_request_headers),
+        nullptr);
+  }
+
+  // Like CreateAndConnectStandard(), but take extra response headers as a
+  // string.  This can save space in case of a very large response.
+  // Only for HTTP/1-based WebSockets.
+  void CreateAndConnectStringResponse(
+      const std::string& socket_url,
+      const std::string& socket_host,
+      const std::string& socket_path,
+      const std::vector<std::string>& sub_protocols,
+      const url::Origin& origin,
+      const GURL& site_for_cookies,
+      const std::string& extra_response_headers) {
+    ASSERT_EQ(BASIC_HANDSHAKE_STREAM, stream_type_);
+
+    url_request_context_host_.SetExpectations(
+        WebSocketStandardRequest(socket_path, socket_host, origin, "", ""),
+        WebSocketStandardResponse(extra_response_headers));
+    CreateAndConnectStream(GURL(socket_url), sub_protocols, origin,
+                           site_for_cookies, "", nullptr);
+  }
+
+  // Like CreateAndConnectStandard(), but take raw mock data.
   void CreateAndConnectRawExpectations(
       const std::string& socket_url,
       const std::vector<std::string>& sub_protocols,
@@ -147,35 +320,75 @@
       const std::string& send_additional_request_headers,
       std::unique_ptr<SequencedSocketData> socket_data,
       std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
-    AddRawExpectations(std::move(socket_data));
+    ASSERT_EQ(BASIC_HANDSHAKE_STREAM, stream_type_);
+
+    url_request_context_host_.AddRawExpectations(std::move(socket_data));
     CreateAndConnectStream(GURL(socket_url), sub_protocols, origin,
                            site_for_cookies, send_additional_request_headers,
                            std::move(timer));
   }
 
-  // Add additional raw expectations for sockets created before the final one.
-  void AddRawExpectations(std::unique_ptr<SequencedSocketData> socket_data) {
-    url_request_context_host_.AddRawExpectations(std::move(socket_data));
+ private:
+  void AddWrite(const SpdySerializedFrame* frame) {
+    writes_.push_back(
+        MockWrite(ASYNC, frame->data(), frame->size(), sequence_number_++));
   }
+
+  void AddRead(const SpdySerializedFrame* frame) {
+    reads_.push_back(
+        MockRead(ASYNC, frame->data(), frame->size(), sequence_number_++));
+  }
+
+ protected:
+  const HandshakeStreamType stream_type_;
+
+ private:
+  SpdyTestUtil spdy_util_;
+  NetLogWithSource log_;
+
+  int sequence_number_;
+
+  // Store mock HTTP/2 data.
+  std::vector<SpdySerializedFrame> frames_;
+
+  // Store MockRead and MockWrite objects that have pointers to above data.
+  std::vector<MockRead> reads_;
+  std::vector<MockWrite> writes_;
 };
 
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketStreamCreateTest,
+                        Values(BASIC_HANDSHAKE_STREAM));
+
+using WebSocketMultiProtocolStreamCreateTest = WebSocketStreamCreateTest;
+
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketMultiProtocolStreamCreateTest,
+                        Values(BASIC_HANDSHAKE_STREAM, HTTP2_HANDSHAKE_STREAM));
+
 // There are enough tests of the Sec-WebSocket-Extensions header that they
 // deserve their own test fixture.
-class WebSocketStreamCreateExtensionTest : public WebSocketStreamCreateTest {
- public:
+class WebSocketStreamCreateExtensionTest
+    : public WebSocketMultiProtocolStreamCreateTest {
+ protected:
   // Performs a standard connect, with the value of the Sec-WebSocket-Extensions
   // header in the response set to |extensions_header_value|. Runs the event
   // loop to allow the connect to complete.
   void CreateAndConnectWithExtensions(
       const std::string& extensions_header_value) {
+    AddSSLData();
     CreateAndConnectStandard(
-        "ws://localhost/testing_path", "localhost", "/testing_path",
-        NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(), "", "",
-        "Sec-WebSocket-Extensions: " + extensions_header_value + "\r\n");
+        "wss://www.example.org/testing_path", "www.example.org",
+        "/testing_path", NoSubProtocols(), Origin(), Url(), {}, {},
+        {{"Sec-WebSocket-Extensions", extensions_header_value}});
     WaitUntilConnectDone();
   }
 };
 
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketStreamCreateExtensionTest,
+                        Values(BASIC_HANDSHAKE_STREAM, HTTP2_HANDSHAKE_STREAM));
+
 // Common code to construct expectations for authentication tests that receive
 // the auth challenge on one connection and then create a second connection to
 // send the authenticated request on.
@@ -186,7 +399,7 @@
   std::unique_ptr<SequencedSocketData> BuildSocketData1(
       const std::string& response) {
     request1_ =
-        WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "", "");
+        WebSocketStandardRequest("/", "www.example.org", Origin(), "", "");
     writes1_[0] = MockWrite(SYNCHRONOUS, 0, request1_.c_str());
     response1_ = response;
     reads1_[0] = MockRead(SYNCHRONOUS, 1, response1_.c_str());
@@ -226,17 +439,18 @@
   void CreateAndConnectAuthHandshake(const std::string& url,
                                      const std::string& base64_user_pass,
                                      const std::string& response2) {
-    AddRawExpectations(helper_.BuildSocketData1(kUnauthorizedResponse));
+    url_request_context_host_.AddRawExpectations(
+        helper_.BuildSocketData1(kUnauthorizedResponse));
 
     static const char request2format[] =
         "GET / HTTP/1.1\r\n"
-        "Host: localhost\r\n"
+        "Host: www.example.org\r\n"
         "Connection: Upgrade\r\n"
         "Pragma: no-cache\r\n"
         "Cache-Control: no-cache\r\n"
         "Authorization: Basic %s\r\n"
         "Upgrade: websocket\r\n"
-        "Origin: http://localhost\r\n"
+        "Origin: http://www.example.org\r\n"
         "Sec-WebSocket-Version: 13\r\n"
         "User-Agent:\r\n"
         "Accept-Encoding: gzip, deflate\r\n"
@@ -248,7 +462,7 @@
     const std::string request =
         base::StringPrintf(request2format, base64_user_pass.c_str());
     CreateAndConnectRawExpectations(
-        url, NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(), "",
+        url, NoSubProtocols(), Origin(), Url(), "",
         helper_.BuildSocketData2(request, response2));
   }
 
@@ -257,6 +471,10 @@
   CommonAuthTestHelper helper_;
 };
 
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketStreamCreateBasicAuthTest,
+                        Values(BASIC_HANDSHAKE_STREAM));
+
 class WebSocketStreamCreateDigestAuthTest : public WebSocketStreamCreateTest {
  protected:
   static const char kUnauthorizedResponse[];
@@ -265,6 +483,10 @@
   CommonAuthTestHelper helper_;
 };
 
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketStreamCreateDigestAuthTest,
+                        Values(BASIC_HANDSHAKE_STREAM));
+
 const char WebSocketStreamCreateBasicAuthTest::kUnauthorizedResponse[] =
     "HTTP/1.1 401 Unauthorized\r\n"
     "Content-Length: 0\r\n"
@@ -283,7 +505,7 @@
 
 const char WebSocketStreamCreateDigestAuthTest::kAuthorizedRequest[] =
     "GET / HTTP/1.1\r\n"
-    "Host: localhost\r\n"
+    "Host: www.example.org\r\n"
     "Connection: Upgrade\r\n"
     "Pragma: no-cache\r\n"
     "Cache-Control: no-cache\r\n"
@@ -291,7 +513,7 @@
     "nonce=\"nonce-value\", uri=\"/\", "
     "response=\"f72ff54ebde2f928860f806ec04acd1b\"\r\n"
     "Upgrade: websocket\r\n"
-    "Origin: http://localhost\r\n"
+    "Origin: http://www.example.org\r\n"
     "Sec-WebSocket-Version: 13\r\n"
     "User-Agent:\r\n"
     "Accept-Encoding: gzip, deflate\r\n"
@@ -301,8 +523,8 @@
     "client_max_window_bits\r\n"
     "\r\n";
 
-class WebSocketStreamCreateUMATest : public ::testing::Test {
- public:
+class WebSocketStreamCreateUMATest : public WebSocketStreamCreateTest {
+ protected:
   // This enum should match with the enum in Delegate in websocket_stream.cc.
   enum HandshakeResult {
     INCOMPLETE,
@@ -310,25 +532,18 @@
     FAILED,
     NUM_HANDSHAKE_RESULT_TYPES,
   };
-
-  class StreamCreation : public WebSocketStreamCreateTest {
-    void TestBody() override {}
-  };
-
-  std::unique_ptr<base::HistogramSamples> GetSamples(const std::string& name) {
-    base::HistogramBase* histogram =
-        base::StatisticsRecorder::FindHistogram(name);
-    return histogram ? histogram->SnapshotSamples()
-                     : std::unique_ptr<base::HistogramSamples>();
-  }
 };
 
+INSTANTIATE_TEST_CASE_P(,
+                        WebSocketStreamCreateUMATest,
+                        Values(BASIC_HANDSHAKE_STREAM));
+
 // Confirm that the basic case works as expected.
-TEST_F(WebSocketStreamCreateTest, SimpleSuccess) {
+TEST_P(WebSocketMultiProtocolStreamCreateTest, SimpleSuccess) {
+  AddSSLData();
   EXPECT_FALSE(url_request_);
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "");
+  CreateAndConnectStandard("wss://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
   EXPECT_FALSE(request_info_);
   EXPECT_FALSE(response_info_);
   EXPECT_TRUE(url_request_);
@@ -341,7 +556,7 @@
             url_request_context_host_.network_delegate().last_error());
 }
 
-TEST_F(WebSocketStreamCreateTest, HandshakeInfo) {
+TEST_P(WebSocketStreamCreateTest, HandshakeInfo) {
   static const char kResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
@@ -352,9 +567,9 @@
       "hoge: piyo\r\n"
       "\r\n";
 
-  CreateAndConnectCustomResponse("ws://localhost/", "localhost", "/",
-                                 NoSubProtocols(), LocalhostOrigin(),
-                                 LocalhostUrl(), "", "", kResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kResponse);
   EXPECT_FALSE(request_info_);
   EXPECT_FALSE(response_info_);
   WaitUntilConnectDone();
@@ -365,18 +580,18 @@
       RequestHeadersToVector(request_info_->headers);
   // We examine the contents of request_info_ and response_info_
   // mainly only in this test case.
-  EXPECT_EQ(GURL("ws://localhost/"), request_info_->url);
-  EXPECT_EQ(GURL("ws://localhost/"), response_info_->url);
+  EXPECT_EQ(GURL("ws://www.example.org/"), request_info_->url);
+  EXPECT_EQ(GURL("ws://www.example.org/"), response_info_->url);
   EXPECT_EQ(101, response_info_->status_code);
   EXPECT_EQ("Switching Protocols", response_info_->status_text);
   ASSERT_EQ(12u, request_headers.size());
-  EXPECT_EQ(HeaderKeyValuePair("Host", "localhost"), request_headers[0]);
+  EXPECT_EQ(HeaderKeyValuePair("Host", "www.example.org"), request_headers[0]);
   EXPECT_EQ(HeaderKeyValuePair("Connection", "Upgrade"), request_headers[1]);
   EXPECT_EQ(HeaderKeyValuePair("Pragma", "no-cache"), request_headers[2]);
   EXPECT_EQ(HeaderKeyValuePair("Cache-Control", "no-cache"),
             request_headers[3]);
   EXPECT_EQ(HeaderKeyValuePair("Upgrade", "websocket"), request_headers[4]);
-  EXPECT_EQ(HeaderKeyValuePair("Origin", "http://localhost"),
+  EXPECT_EQ(HeaderKeyValuePair("Origin", "http://www.example.org"),
             request_headers[5]);
   EXPECT_EQ(HeaderKeyValuePair("Sec-WebSocket-Version", "13"),
             request_headers[6]);
@@ -405,13 +620,12 @@
 }
 
 // Confirms that request headers are overriden/added after handshake
-TEST_F(WebSocketStreamCreateTest, HandshakeOverrideHeaders) {
-  std::string additional_headers(
-      "User-Agent: OveRrIde\r\n"
-      "rAnDomHeader: foobar\r\n");
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           additional_headers, additional_headers, "");
+TEST_P(WebSocketStreamCreateTest, HandshakeOverrideHeaders) {
+  WebSocketExtraHeaders additional_headers(
+      {{"User-Agent", "OveRrIde"}, {"rAnDomHeader", "foobar"}});
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(),
+                           additional_headers, additional_headers, {});
   EXPECT_FALSE(request_info_);
   EXPECT_FALSE(response_info_);
   WaitUntilConnectDone();
@@ -427,45 +641,36 @@
 }
 
 // Confirm that the stream isn't established until the message loop runs.
-TEST_F(WebSocketStreamCreateTest, NeedsToRunLoop) {
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "");
+TEST_P(WebSocketStreamCreateTest, NeedsToRunLoop) {
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
   EXPECT_FALSE(has_failed());
   EXPECT_FALSE(stream_);
 }
 
 // Check the path is used.
-TEST_F(WebSocketStreamCreateTest, PathIsUsed) {
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", NoSubProtocols(), LocalhostOrigin(),
-                           LocalhostUrl(), "", "", "");
-  WaitUntilConnectDone();
-  EXPECT_FALSE(has_failed());
-  EXPECT_TRUE(stream_);
-}
-
-// Check that the origin is used.
-TEST_F(WebSocketStreamCreateTest, OriginIsUsed) {
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", NoSubProtocols(), GoogleOrigin(),
-                           GoogleUrl(), "", "", "");
+TEST_P(WebSocketMultiProtocolStreamCreateTest, PathIsUsed) {
+  AddSSLData();
+  CreateAndConnectStandard("wss://www.example.org/testing_path",
+                           "www.example.org", "/testing_path", NoSubProtocols(),
+                           Origin(), Url(), {}, {}, {});
   WaitUntilConnectDone();
   EXPECT_FALSE(has_failed());
   EXPECT_TRUE(stream_);
 }
 
 // Check that sub-protocols are sent and parsed.
-TEST_F(WebSocketStreamCreateTest, SubProtocolIsUsed) {
+TEST_P(WebSocketMultiProtocolStreamCreateTest, SubProtocolIsUsed) {
+  AddSSLData();
   std::vector<std::string> sub_protocols;
   sub_protocols.push_back("chatv11.chromium.org");
   sub_protocols.push_back("chatv20.chromium.org");
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", sub_protocols, GoogleOrigin(),
-                           GoogleUrl(), "",
-                           "Sec-WebSocket-Protocol: chatv11.chromium.org, "
-                           "chatv20.chromium.org\r\n",
-                           "Sec-WebSocket-Protocol: chatv20.chromium.org\r\n");
+  CreateAndConnectStandard(
+      "wss://www.example.org/testing_path", "www.example.org", "/testing_path",
+      sub_protocols, Origin(), Url(), {},
+      {{"Sec-WebSocket-Protocol",
+        "chatv11.chromium.org, chatv20.chromium.org"}},
+      {{"Sec-WebSocket-Protocol", "chatv20.chromium.org"}});
   WaitUntilConnectDone();
   EXPECT_TRUE(stream_);
   EXPECT_FALSE(has_failed());
@@ -473,11 +678,12 @@
 }
 
 // Unsolicited sub-protocols are rejected.
-TEST_F(WebSocketStreamCreateTest, UnsolicitedSubProtocol) {
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", NoSubProtocols(), GoogleOrigin(),
-                           GoogleUrl(), "", "",
-                           "Sec-WebSocket-Protocol: chatv20.chromium.org\r\n");
+TEST_P(WebSocketMultiProtocolStreamCreateTest, UnsolicitedSubProtocol) {
+  AddSSLData();
+  CreateAndConnectStandard(
+      "wss://www.example.org/testing_path", "www.example.org", "/testing_path",
+      NoSubProtocols(), Origin(), Url(), {}, {},
+      {{"Sec-WebSocket-Protocol", "chatv20.chromium.org"}});
   WaitUntilConnectDone();
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -490,13 +696,14 @@
 }
 
 // Missing sub-protocol response is rejected.
-TEST_F(WebSocketStreamCreateTest, UnacceptedSubProtocol) {
+TEST_P(WebSocketMultiProtocolStreamCreateTest, UnacceptedSubProtocol) {
+  AddSSLData();
   std::vector<std::string> sub_protocols;
   sub_protocols.push_back("chat.example.com");
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", sub_protocols, LocalhostOrigin(),
-                           LocalhostUrl(), "",
-                           "Sec-WebSocket-Protocol: chat.example.com\r\n", "");
+  CreateAndConnectStandard(
+      "wss://www.example.org/testing_path", "www.example.org", "/testing_path",
+      sub_protocols, Origin(), Url(), {},
+      {{"Sec-WebSocket-Protocol", "chat.example.com"}}, {});
   WaitUntilConnectDone();
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -507,37 +714,49 @@
 }
 
 // Only one sub-protocol can be accepted.
-TEST_F(WebSocketStreamCreateTest, MultipleSubProtocolsInResponse) {
+TEST_P(WebSocketMultiProtocolStreamCreateTest, MultipleSubProtocolsInResponse) {
+  AddSSLData();
   std::vector<std::string> sub_protocols;
   sub_protocols.push_back("chatv11.chromium.org");
   sub_protocols.push_back("chatv20.chromium.org");
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", sub_protocols, GoogleOrigin(),
-                           GoogleUrl(), "",
-                           "Sec-WebSocket-Protocol: chatv11.chromium.org, "
-                           "chatv20.chromium.org\r\n",
-                           "Sec-WebSocket-Protocol: chatv11.chromium.org, "
-                           "chatv20.chromium.org\r\n");
+  CreateAndConnectStandard("wss://www.example.org/testing_path",
+                           "www.example.org", "/testing_path", sub_protocols,
+                           Origin(), Url(), {},
+                           {{"Sec-WebSocket-Protocol",
+                             "chatv11.chromium.org, chatv20.chromium.org"}},
+                           {{"Sec-WebSocket-Protocol",
+                             "chatv11.chromium.org, chatv20.chromium.org"}});
   WaitUntilConnectDone();
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
-  EXPECT_EQ("Error during WebSocket handshake: "
-            "'Sec-WebSocket-Protocol' header must not appear "
-            "more than once in a response",
-            failure_message());
+  if (stream_type_ == BASIC_HANDSHAKE_STREAM) {
+    EXPECT_EQ(
+        "Error during WebSocket handshake: "
+        "'Sec-WebSocket-Protocol' header must not appear "
+        "more than once in a response",
+        failure_message());
+  } else {
+    DCHECK_EQ(HTTP2_HANDSHAKE_STREAM, stream_type_);
+    EXPECT_EQ(
+        "Error during WebSocket handshake: "
+        "'sec-websocket-protocol' header must not appear "
+        "more than once in a response",
+        failure_message());
+  }
 }
 
 // Unmatched sub-protocol should be rejected.
-TEST_F(WebSocketStreamCreateTest, UnmatchedSubProtocolInResponse) {
+TEST_P(WebSocketMultiProtocolStreamCreateTest, UnmatchedSubProtocolInResponse) {
+  AddSSLData();
   std::vector<std::string> sub_protocols;
   sub_protocols.push_back("chatv11.chromium.org");
   sub_protocols.push_back("chatv20.chromium.org");
-  CreateAndConnectStandard("ws://localhost/testing_path", "localhost",
-                           "/testing_path", sub_protocols, GoogleOrigin(),
-                           GoogleUrl(), "",
-                           "Sec-WebSocket-Protocol: chatv11.chromium.org, "
-                           "chatv20.chromium.org\r\n",
-                           "Sec-WebSocket-Protocol: chatv21.chromium.org\r\n");
+  CreateAndConnectStandard(
+      "wss://www.example.org/testing_path", "www.example.org", "/testing_path",
+      sub_protocols, Origin(), Url(), {},
+      {{"Sec-WebSocket-Protocol",
+        "chatv11.chromium.org, chatv20.chromium.org"}},
+      {{"Sec-WebSocket-Protocol", "chatv21.chromium.org"}});
   WaitUntilConnectDone();
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -548,14 +767,14 @@
 }
 
 // permessage-deflate extension basic success case.
-TEST_F(WebSocketStreamCreateExtensionTest, PerMessageDeflateSuccess) {
+TEST_P(WebSocketStreamCreateExtensionTest, PerMessageDeflateSuccess) {
   CreateAndConnectWithExtensions("permessage-deflate");
   EXPECT_TRUE(stream_);
   EXPECT_FALSE(has_failed());
 }
 
 // permessage-deflate extensions success with all parameters.
-TEST_F(WebSocketStreamCreateExtensionTest, PerMessageDeflateParamsSuccess) {
+TEST_P(WebSocketStreamCreateExtensionTest, PerMessageDeflateParamsSuccess) {
   CreateAndConnectWithExtensions(
       "permessage-deflate; client_no_context_takeover; "
       "server_max_window_bits=11; client_max_window_bits=13; "
@@ -566,29 +785,32 @@
 
 // Verify that incoming messages are actually decompressed with
 // permessage-deflate enabled.
-TEST_F(WebSocketStreamCreateExtensionTest, PerMessageDeflateInflates) {
-  CreateAndConnectCustomResponse(
-      "ws://localhost/testing_path", "localhost", "/testing_path",
-      NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(), "", "",
-      WebSocketStandardResponse(
-          "Sec-WebSocket-Extensions: permessage-deflate\r\n") +
-          std::string(
-              "\xc1\x07"  // WebSocket header (FIN + RSV1, Text payload 7 bytes)
-              "\xf2\x48\xcd\xc9\xc9\x07\x00",  // "Hello" DEFLATE compressed
-              9));
+TEST_P(WebSocketStreamCreateExtensionTest, PerMessageDeflateInflates) {
+  AddSSLData();
+  CreateAndConnectStandard(
+      "wss://www.example.org/testing_path", "www.example.org", "/testing_path",
+      NoSubProtocols(), Origin(), Url(), {}, {},
+      {{"Sec-WebSocket-Extensions", "permessage-deflate"}},
+      std::unique_ptr<base::Timer>(),
+      std::string(
+          "\xc1\x07"  // WebSocket header (FIN + RSV1, Text payload 7 bytes)
+          "\xf2\x48\xcd\xc9\xc9\x07\x00",  // "Hello" DEFLATE compressed
+          9));
   WaitUntilConnectDone();
 
   ASSERT_TRUE(stream_);
   std::vector<std::unique_ptr<WebSocketFrame>> frames;
-  CompletionCallback callback;
-  ASSERT_THAT(stream_->ReadFrames(&frames, callback), IsOk());
+  TestCompletionCallback callback;
+  int rv = stream_->ReadFrames(&frames, callback.callback());
+  rv = callback.GetResult(rv);
+  ASSERT_THAT(rv, IsOk());
   ASSERT_EQ(1U, frames.size());
   ASSERT_EQ(5U, frames[0]->header.payload_length);
   EXPECT_EQ("Hello", std::string(frames[0]->data->data(), 5));
 }
 
 // Unknown extension in the response is rejected
-TEST_F(WebSocketStreamCreateExtensionTest, UnknownExtension) {
+TEST_P(WebSocketStreamCreateExtensionTest, UnknownExtension) {
   CreateAndConnectWithExtensions("x-unknown-extension");
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -600,7 +822,7 @@
 
 // Malformed extensions are rejected (this file does not cover all possible
 // parse failures, as the parser is covered thoroughly by its own unit tests).
-TEST_F(WebSocketStreamCreateExtensionTest, MalformedExtension) {
+TEST_P(WebSocketStreamCreateExtensionTest, MalformedExtension) {
   CreateAndConnectWithExtensions(";");
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -611,7 +833,7 @@
 }
 
 // The permessage-deflate extension may only be specified once.
-TEST_F(WebSocketStreamCreateExtensionTest, OnlyOnePerMessageDeflateAllowed) {
+TEST_P(WebSocketStreamCreateExtensionTest, OnlyOnePerMessageDeflateAllowed) {
   CreateAndConnectWithExtensions(
       "permessage-deflate, permessage-deflate; client_max_window_bits=10");
   EXPECT_FALSE(stream_);
@@ -623,7 +845,7 @@
 }
 
 // client_max_window_bits must have an argument
-TEST_F(WebSocketStreamCreateExtensionTest, NoMaxWindowBitsArgument) {
+TEST_P(WebSocketStreamCreateExtensionTest, NoMaxWindowBitsArgument) {
   CreateAndConnectWithExtensions("permessage-deflate; client_max_window_bits");
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -641,11 +863,11 @@
 // socket is randomly masked.
 
 // Additional Sec-WebSocket-Accept headers should be rejected.
-TEST_F(WebSocketStreamCreateTest, DoubleAccept) {
+TEST_P(WebSocketStreamCreateTest, DoubleAccept) {
   CreateAndConnectStandard(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "",
-      "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n");
+      "ws://www.example.org/", "www.example.org", "/", NoSubProtocols(),
+      Origin(), Url(), {}, {},
+      {{"Sec-WebSocket-Accept", "s3pPLMBiTxaQ9kYGzzhZRbK+xOo="}});
   WaitUntilConnectDone();
   EXPECT_FALSE(stream_);
   EXPECT_TRUE(has_failed());
@@ -656,16 +878,16 @@
 }
 
 // Response code 200 must be rejected.
-TEST_F(WebSocketStreamCreateTest, InvalidStatusCode) {
+TEST_P(WebSocketStreamCreateTest, InvalidStatusCode) {
   static const char kInvalidStatusCodeResponse[] =
       "HTTP/1.1 200 OK\r\n"
       "Upgrade: websocket\r\n"
       "Connection: Upgrade\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kInvalidStatusCodeResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kInvalidStatusCodeResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: Unexpected response code: 200",
@@ -674,18 +896,18 @@
 
 // Redirects are not followed (according to the WHATWG WebSocket API, which
 // overrides RFC6455 for browser applications).
-TEST_F(WebSocketStreamCreateTest, RedirectsRejected) {
+TEST_P(WebSocketStreamCreateTest, RedirectsRejected) {
   static const char kRedirectResponse[] =
       "HTTP/1.1 302 Moved Temporarily\r\n"
       "Content-Type: text/html\r\n"
       "Content-Length: 34\r\n"
       "Connection: keep-alive\r\n"
-      "Location: ws://localhost/other\r\n"
+      "Location: wss://www.example.org/other\r\n"
       "\r\n"
       "<title>Moved</title><h1>Moved</h1>";
-  CreateAndConnectCustomResponse("ws://localhost/", "localhost", "/",
-                                 NoSubProtocols(), LocalhostOrigin(),
-                                 LocalhostUrl(), "", "", kRedirectResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kRedirectResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: Unexpected response code: 302",
@@ -696,7 +918,7 @@
 // about any garbage in the middle of the headers. To make it give up, the junk
 // has to be at the start of the response. Even then, it just gets treated as an
 // HTTP/0.9 response.
-TEST_F(WebSocketStreamCreateTest, MalformedResponse) {
+TEST_P(WebSocketStreamCreateTest, MalformedResponse) {
   static const char kMalformedResponse[] =
       "220 mx.google.com ESMTP\r\n"
       "HTTP/1.1 101 OK\r\n"
@@ -704,9 +926,9 @@
       "Connection: Upgrade\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse("ws://localhost/", "localhost", "/",
-                                 NoSubProtocols(), LocalhostOrigin(),
-                                 LocalhostUrl(), "", "", kMalformedResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMalformedResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: Invalid status line",
@@ -714,15 +936,15 @@
 }
 
 // Upgrade header must be present.
-TEST_F(WebSocketStreamCreateTest, MissingUpgradeHeader) {
+TEST_P(WebSocketStreamCreateTest, MissingUpgradeHeader) {
   static const char kMissingUpgradeResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Connection: Upgrade\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kMissingUpgradeResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMissingUpgradeResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: 'Upgrade' header is missing",
@@ -730,10 +952,10 @@
 }
 
 // There must only be one upgrade header.
-TEST_F(WebSocketStreamCreateTest, DoubleUpgradeHeader) {
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "Upgrade: HTTP/2.0\r\n");
+TEST_P(WebSocketStreamCreateTest, DoubleUpgradeHeader) {
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {},
+                           {{"Upgrade", "HTTP/2.0"}});
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -742,16 +964,16 @@
 }
 
 // There must only be one correct upgrade header.
-TEST_F(WebSocketStreamCreateTest, IncorrectUpgradeHeader) {
+TEST_P(WebSocketStreamCreateTest, IncorrectUpgradeHeader) {
   static const char kMissingUpgradeResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Connection: Upgrade\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "Upgrade: hogefuga\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kMissingUpgradeResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMissingUpgradeResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -760,15 +982,15 @@
 }
 
 // Connection header must be present.
-TEST_F(WebSocketStreamCreateTest, MissingConnectionHeader) {
+TEST_P(WebSocketStreamCreateTest, MissingConnectionHeader) {
   static const char kMissingConnectionResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kMissingConnectionResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMissingConnectionResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -777,16 +999,16 @@
 }
 
 // Connection header must contain "Upgrade".
-TEST_F(WebSocketStreamCreateTest, IncorrectConnectionHeader) {
+TEST_P(WebSocketStreamCreateTest, IncorrectConnectionHeader) {
   static const char kMissingConnectionResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "Connection: hogefuga\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kMissingConnectionResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMissingConnectionResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -795,31 +1017,31 @@
 }
 
 // Connection header is permitted to contain other tokens.
-TEST_F(WebSocketStreamCreateTest, AdditionalTokenInConnectionHeader) {
+TEST_P(WebSocketStreamCreateTest, AdditionalTokenInConnectionHeader) {
   static const char kAdditionalConnectionTokenResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
       "Connection: Upgrade, Keep-Alive\r\n"
       "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kAdditionalConnectionTokenResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kAdditionalConnectionTokenResponse);
   WaitUntilConnectDone();
   EXPECT_FALSE(has_failed());
   EXPECT_TRUE(stream_);
 }
 
 // Sec-WebSocket-Accept header must be present.
-TEST_F(WebSocketStreamCreateTest, MissingSecWebSocketAccept) {
+TEST_P(WebSocketStreamCreateTest, MissingSecWebSocketAccept) {
   static const char kMissingAcceptResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
       "Connection: Upgrade\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kMissingAcceptResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kMissingAcceptResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -828,16 +1050,16 @@
 }
 
 // Sec-WebSocket-Accept header must match the key that was sent.
-TEST_F(WebSocketStreamCreateTest, WrongSecWebSocketAccept) {
+TEST_P(WebSocketStreamCreateTest, WrongSecWebSocketAccept) {
   static const char kIncorrectAcceptResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
       "Connection: Upgrade\r\n"
       "Sec-WebSocket-Accept: x/byyPZ2tOFvJCGkkugcKvqhhPk=\r\n"
       "\r\n";
-  CreateAndConnectCustomResponse(
-      "ws://localhost/", "localhost", "/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "", "", kIncorrectAcceptResponse);
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kIncorrectAcceptResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error during WebSocket handshake: "
@@ -846,10 +1068,9 @@
 }
 
 // Cancellation works.
-TEST_F(WebSocketStreamCreateTest, Cancellation) {
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "");
+TEST_P(WebSocketStreamCreateTest, Cancellation) {
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
   stream_request_.reset();
   // WaitUntilConnectDone doesn't work in this case.
   base::RunLoop().RunUntilIdle();
@@ -860,13 +1081,12 @@
 }
 
 // Connect failure must look just like negotiation failure.
-TEST_F(WebSocketStreamCreateTest, ConnectionFailure) {
+TEST_P(WebSocketStreamCreateTest, ConnectionFailure) {
   std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED));
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error in connection establishment: net::ERR_CONNECTION_REFUSED",
@@ -876,13 +1096,12 @@
 }
 
 // Connect timeout must look just like any other failure.
-TEST_F(WebSocketStreamCreateTest, ConnectionTimeout) {
+TEST_P(WebSocketStreamCreateTest, ConnectionTimeout) {
   std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(ASYNC, ERR_CONNECTION_TIMED_OUT));
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT",
@@ -890,14 +1109,14 @@
 }
 
 // The server doesn't respond to the opening handshake.
-TEST_F(WebSocketStreamCreateTest, HandshakeTimeout) {
+TEST_P(WebSocketStreamCreateTest, HandshakeTimeout) {
   std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
   std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data), std::move(timer));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data),
+                                  std::move(timer));
   EXPECT_FALSE(has_failed());
   ASSERT_TRUE(weak_timer.get());
   EXPECT_TRUE(weak_timer->IsRunning());
@@ -912,13 +1131,13 @@
 }
 
 // When the connection establishes the timer should be stopped.
-TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnSuccess) {
+TEST_P(WebSocketStreamCreateTest, HandshakeTimerOnSuccess) {
   std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
 
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "", std::move(timer));
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {},
+                           std::move(timer));
   ASSERT_TRUE(weak_timer);
   EXPECT_TRUE(weak_timer->IsRunning());
 
@@ -930,15 +1149,15 @@
 }
 
 // When the connection fails the timer should be stopped.
-TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnFailure) {
+TEST_P(WebSocketStreamCreateTest, HandshakeTimerOnFailure) {
   std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED));
   std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data), std::move(timer));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data),
+                                  std::move(timer));
   ASSERT_TRUE(weak_timer.get());
   EXPECT_TRUE(weak_timer->IsRunning());
 
@@ -951,12 +1170,11 @@
 }
 
 // Cancellation during connect works.
-TEST_F(WebSocketStreamCreateTest, CancellationDuringConnect) {
+TEST_P(WebSocketStreamCreateTest, CancellationDuringConnect) {
   std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   stream_request_.reset();
   // WaitUntilConnectDone doesn't work in this case.
   base::RunLoop().RunUntilIdle();
@@ -965,14 +1183,14 @@
 }
 
 // Cancellation during write of the request headers works.
-TEST_F(WebSocketStreamCreateTest, CancellationDuringWrite) {
+TEST_P(WebSocketStreamCreateTest, CancellationDuringWrite) {
   // First write never completes.
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, ERR_IO_PENDING, 0)};
   SequencedSocketData* socket_data(
       new SequencedSocketData(NULL, 0, writes, arraysize(writes)));
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "",
                                   base::WrapUnique(socket_data));
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(socket_data->AllWriteDataConsumed());
@@ -986,9 +1204,9 @@
 }
 
 // Cancellation during read of the response headers works.
-TEST_F(WebSocketStreamCreateTest, CancellationDuringRead) {
+TEST_P(WebSocketStreamCreateTest, CancellationDuringRead) {
   std::string request =
-      WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "", "");
+      WebSocketStandardRequest("/", "www.example.org", Origin(), "", "");
   MockWrite writes[] = {MockWrite(ASYNC, 0, request.c_str())};
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, ERR_IO_PENDING, 1),
@@ -996,9 +1214,8 @@
   std::unique_ptr<SequencedSocketData> socket_data(
       BuildSocketData(reads, writes));
   SequencedSocketData* socket_data_raw_ptr = socket_data.get();
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(socket_data_raw_ptr->AllReadDataConsumed());
   stream_request_.reset();
@@ -1013,16 +1230,16 @@
 // Over-size response headers (> 256KB) should not cause a crash.  This is a
 // regression test for crbug.com/339456. It is based on the layout test
 // "cookie-flood.html".
-TEST_F(WebSocketStreamCreateTest, VeryLargeResponseHeaders) {
+TEST_P(WebSocketStreamCreateTest, VeryLargeResponseHeaders) {
   std::string set_cookie_headers;
   set_cookie_headers.reserve(24 * 20000);
   for (int i = 0; i < 20000; ++i) {
     set_cookie_headers += base::StringPrintf("Set-Cookie: ws-%d=1\r\n", i);
   }
   ASSERT_GT(set_cookie_headers.size(), 256U * 1024U);
-  CreateAndConnectStandard("ws://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", set_cookie_headers);
+  CreateAndConnectStringResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(),
+                                 set_cookie_headers);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_FALSE(response_info_);
@@ -1031,17 +1248,16 @@
 // If the remote host closes the connection without sending headers, we should
 // log the console message "Connection closed before receiving a handshake
 // response".
-TEST_F(WebSocketStreamCreateTest, NoResponse) {
+TEST_P(WebSocketStreamCreateTest, NoResponse) {
   std::string request =
-      WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "", "");
+      WebSocketStandardRequest("/", "www.example.org", Origin(), "", "");
   MockWrite writes[] = {MockWrite(ASYNC, request.data(), request.size(), 0)};
   MockRead reads[] = {MockRead(ASYNC, 0, 1)};
   std::unique_ptr<SequencedSocketData> socket_data(
       BuildSocketData(reads, writes));
   SequencedSocketData* socket_data_raw_ptr = socket_data.get();
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(socket_data_raw_ptr->AllReadDataConsumed());
   EXPECT_TRUE(has_failed());
@@ -1051,15 +1267,15 @@
             failure_message());
 }
 
-TEST_F(WebSocketStreamCreateTest, SelfSignedCertificateFailure) {
+TEST_P(WebSocketStreamCreateTest, SelfSignedCertificateFailure) {
   ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(
       ASYNC, ERR_CERT_AUTHORITY_INVALID));
   ssl_data_[0]->ssl_info.cert =
       ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der");
   ASSERT_TRUE(ssl_data_[0]->ssl_info.cert.get());
   std::unique_ptr<SequencedSocketData> raw_socket_data(BuildNullSocketData());
-  CreateAndConnectRawExpectations("wss://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
+  CreateAndConnectRawExpectations("wss://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "",
                                   std::move(raw_socket_data));
   // WaitUntilConnectDone doesn't work in this case.
   base::RunLoop().RunUntilIdle();
@@ -1071,19 +1287,16 @@
   EXPECT_TRUE(has_failed());
 }
 
-TEST_F(WebSocketStreamCreateTest, SelfSignedCertificateSuccess) {
-  std::unique_ptr<SSLSocketDataProvider> ssl_data(
-      new SSLSocketDataProvider(ASYNC, ERR_CERT_AUTHORITY_INVALID));
-  ssl_data->ssl_info.cert =
+TEST_P(WebSocketStreamCreateTest, SelfSignedCertificateSuccess) {
+  ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(
+      ASYNC, ERR_CERT_AUTHORITY_INVALID));
+  ssl_data_[0]->ssl_info.cert =
       ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der");
-  ASSERT_TRUE(ssl_data->ssl_info.cert.get());
-  ssl_data_.push_back(std::move(ssl_data));
-  ssl_data.reset(new SSLSocketDataProvider(ASYNC, OK));
-  ssl_data_.push_back(std::move(ssl_data));
+  ASSERT_TRUE(ssl_data_[0]->ssl_info.cert.get());
+  ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK));
   url_request_context_host_.AddRawExpectations(BuildNullSocketData());
-  CreateAndConnectStandard("wss://localhost/", "localhost", "/",
-                           NoSubProtocols(), LocalhostOrigin(), LocalhostUrl(),
-                           "", "", "");
+  CreateAndConnectStandard("wss://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
   // WaitUntilConnectDone doesn't work in this case.
   base::RunLoop().RunUntilIdle();
   ASSERT_TRUE(ssl_error_callbacks_);
@@ -1095,10 +1308,10 @@
 
 // If the server requests authorisation, but we have no credentials, the
 // connection should fail cleanly.
-TEST_F(WebSocketStreamCreateBasicAuthTest, FailureNoCredentials) {
-  CreateAndConnectCustomResponse("ws://localhost/", "localhost", "/",
-                                 NoSubProtocols(), LocalhostOrigin(),
-                                 LocalhostUrl(), "", "", kUnauthorizedResponse);
+TEST_P(WebSocketStreamCreateBasicAuthTest, FailureNoCredentials) {
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kUnauthorizedResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("HTTP Authentication failed; no valid credentials available",
@@ -1106,9 +1319,8 @@
   EXPECT_TRUE(response_info_);
 }
 
-TEST_F(WebSocketStreamCreateBasicAuthTest, SuccessPasswordInUrl) {
-  CreateAndConnectAuthHandshake("ws://foo:bar@localhost/",
-                                "Zm9vOmJhcg==",
+TEST_P(WebSocketStreamCreateBasicAuthTest, SuccessPasswordInUrl) {
+  CreateAndConnectAuthHandshake("ws://foo:bar@www.example.org/", "Zm9vOmJhcg==",
                                 WebSocketStandardResponse(std::string()));
   WaitUntilConnectDone();
   EXPECT_FALSE(has_failed());
@@ -1117,9 +1329,9 @@
   EXPECT_EQ(101, response_info_->status_code);
 }
 
-TEST_F(WebSocketStreamCreateBasicAuthTest, FailureIncorrectPasswordInUrl) {
-  CreateAndConnectAuthHandshake(
-      "ws://foo:baz@localhost/", "Zm9vOmJheg==", kUnauthorizedResponse);
+TEST_P(WebSocketStreamCreateBasicAuthTest, FailureIncorrectPasswordInUrl) {
+  CreateAndConnectAuthHandshake("ws://foo:baz@www.example.org/",
+                                "Zm9vOmJheg==", kUnauthorizedResponse);
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_TRUE(response_info_);
@@ -1128,12 +1340,13 @@
 // Digest auth has the same connection semantics as Basic auth, so we can
 // generally assume that whatever works for Basic auth will also work for
 // Digest. There's just one test here, to confirm that it works at all.
-TEST_F(WebSocketStreamCreateDigestAuthTest, DigestPasswordInUrl) {
-  AddRawExpectations(helper_.BuildSocketData1(kUnauthorizedResponse));
+TEST_P(WebSocketStreamCreateDigestAuthTest, DigestPasswordInUrl) {
+  url_request_context_host_.AddRawExpectations(
+      helper_.BuildSocketData1(kUnauthorizedResponse));
 
   CreateAndConnectRawExpectations(
-      "ws://FooBar:pass@localhost/", NoSubProtocols(), LocalhostOrigin(),
-      LocalhostUrl(), "",
+      "ws://FooBar:pass@www.example.org/", NoSubProtocols(), Origin(), Url(),
+      "",
       helper_.BuildSocketData2(kAuthorizedRequest,
                                WebSocketStandardResponse(std::string())));
   WaitUntilConnectDone();
@@ -1143,78 +1356,58 @@
   EXPECT_EQ(101, response_info_->status_code);
 }
 
-TEST_F(WebSocketStreamCreateUMATest, Incomplete) {
-  const std::string name("Net.WebSocket.HandshakeResult");
-  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
+TEST_P(WebSocketStreamCreateUMATest, Incomplete) {
+  base::HistogramTester histogram_tester;
 
-  {
-    StreamCreation creation;
-    creation.CreateAndConnectStandard(
-        "ws://localhost/", "localhost", "/", creation.NoSubProtocols(),
-        LocalhostOrigin(), LocalhostUrl(), "", "", "");
-  }
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
+  stream_request_.reset();
 
-  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
-  ASSERT_TRUE(samples);
-  if (original) {
-    samples->Subtract(*original);  // Cancel the original values.
-  }
+  auto samples = histogram_tester.GetHistogramSamplesSinceCreation(
+      "Net.WebSocket.HandshakeResult");
   EXPECT_EQ(1, samples->GetCount(INCOMPLETE));
   EXPECT_EQ(0, samples->GetCount(CONNECTED));
   EXPECT_EQ(0, samples->GetCount(FAILED));
 }
 
-TEST_F(WebSocketStreamCreateUMATest, Connected) {
-  const std::string name("Net.WebSocket.HandshakeResult");
-  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
+TEST_P(WebSocketStreamCreateUMATest, Connected) {
+  base::HistogramTester histogram_tester;
 
-  {
-    StreamCreation creation;
-    creation.CreateAndConnectStandard(
-        "ws://localhost/", "localhost", "/", creation.NoSubProtocols(),
-        LocalhostOrigin(), LocalhostUrl(), "", "", "");
-    creation.WaitUntilConnectDone();
-  }
+  CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/",
+                           NoSubProtocols(), Origin(), Url(), {}, {}, {});
+  WaitUntilConnectDone();
+  stream_request_.reset();
 
-  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
-  ASSERT_TRUE(samples);
-  if (original) {
-    samples->Subtract(*original);  // Cancel the original values.
-  }
+  auto samples = histogram_tester.GetHistogramSamplesSinceCreation(
+      "Net.WebSocket.HandshakeResult");
   EXPECT_EQ(0, samples->GetCount(INCOMPLETE));
   EXPECT_EQ(1, samples->GetCount(CONNECTED));
   EXPECT_EQ(0, samples->GetCount(FAILED));
 }
 
-TEST_F(WebSocketStreamCreateUMATest, Failed) {
-  const std::string name("Net.WebSocket.HandshakeResult");
-  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
+TEST_P(WebSocketStreamCreateUMATest, Failed) {
+  base::HistogramTester histogram_tester;
 
-  {
-    StreamCreation creation;
-    static const char kInvalidStatusCodeResponse[] =
-        "HTTP/1.1 200 OK\r\n"
-        "Upgrade: websocket\r\n"
-        "Connection: Upgrade\r\n"
-        "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
-        "\r\n";
-    creation.CreateAndConnectCustomResponse(
-        "ws://localhost/", "localhost", "/", creation.NoSubProtocols(),
-        LocalhostOrigin(), LocalhostUrl(), "", "", kInvalidStatusCodeResponse);
-    creation.WaitUntilConnectDone();
-  }
+  static const char kInvalidStatusCodeResponse[] =
+      "HTTP/1.1 200 OK\r\n"
+      "Upgrade: websocket\r\n"
+      "Connection: Upgrade\r\n"
+      "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
+      "\r\n";
+  CreateAndConnectCustomResponse("ws://www.example.org/", "www.example.org",
+                                 "/", NoSubProtocols(), Origin(), Url(), {}, {},
+                                 kInvalidStatusCodeResponse);
+  WaitUntilConnectDone();
+  stream_request_.reset();
 
-  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
-  ASSERT_TRUE(samples);
-  if (original) {
-    samples->Subtract(*original);  // Cancel the original values.
-  }
+  auto samples = histogram_tester.GetHistogramSamplesSinceCreation(
+      "Net.WebSocket.HandshakeResult");
   EXPECT_EQ(1, samples->GetCount(INCOMPLETE));
   EXPECT_EQ(0, samples->GetCount(CONNECTED));
   EXPECT_EQ(0, samples->GetCount(FAILED));
 }
 
-TEST_F(WebSocketStreamCreateTest, HandleErrConnectionClosed) {
+TEST_P(WebSocketStreamCreateTest, HandleErrConnectionClosed) {
   static const char kTruncatedResponse[] =
       "HTTP/1.1 101 Switching Protocols\r\n"
       "Upgrade: websocket\r\n"
@@ -1223,7 +1416,7 @@
       "Cache-Control: no-sto";
 
   std::string request =
-      WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "", "");
+      WebSocketStandardRequest("/", "www.example.org", Origin(), "", "");
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, 1, kTruncatedResponse),
       MockRead(SYNCHRONOUS, ERR_CONNECTION_CLOSED, 2),
@@ -1232,17 +1425,16 @@
   std::unique_ptr<SequencedSocketData> socket_data(
       BuildSocketData(reads, writes));
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
 }
 
-TEST_F(WebSocketStreamCreateTest, HandleErrTunnelConnectionFailed) {
+TEST_P(WebSocketStreamCreateTest, HandleErrTunnelConnectionFailed) {
   static const char kConnectRequest[] =
-      "CONNECT localhost:80 HTTP/1.1\r\n"
-      "Host: localhost:80\r\n"
+      "CONNECT www.example.org:80 HTTP/1.1\r\n"
+      "Host: www.example.org:80\r\n"
       "Proxy-Connection: keep-alive\r\n"
       "\r\n";
 
@@ -1259,9 +1451,8 @@
   std::unique_ptr<SequencedSocketData> socket_data(
       BuildSocketData(reads, writes));
   url_request_context_host_.SetProxyConfig("https=proxy:8000");
-  CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
-                                  LocalhostOrigin(), LocalhostUrl(), "",
-                                  std::move(socket_data));
+  CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(),
+                                  Origin(), Url(), "", std::move(socket_data));
   WaitUntilConnectDone();
   EXPECT_TRUE(has_failed());
   EXPECT_EQ("Establishing a tunnel via proxy server failed.",
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index 38499ed..8c371e4f 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -8,8 +8,10 @@
 #include <algorithm>
 #include <utility>
 
+#include "base/strings/strcat.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
+#include "net/http/http_network_session.h"
 #include "net/proxy_resolution/proxy_service.h"
 #include "net/socket/socket_test_util.h"
 #include "net/spdy/core/spdy_protocol.h"
@@ -36,6 +38,15 @@
   return static_cast<uint32_t>(result >> 16);
 }
 
+std::string WebSocketExtraHeadersToString(
+    const WebSocketExtraHeaders& headers) {
+  std::string answer;
+  for (const auto& header : headers) {
+    base::StrAppend(&answer, {header.first, ": ", header.second, "\r\n"});
+  }
+  return answer;
+}
+
 std::string WebSocketStandardRequest(
     const std::string& path,
     const std::string& host,
@@ -192,6 +203,12 @@
 WebSocketTestURLRequestContextHost::WebSocketTestURLRequestContextHost()
     : url_request_context_(true), url_request_context_initialized_(false) {
   url_request_context_.set_client_socket_factory(maker_.factory());
+  auto params = std::make_unique<HttpNetworkSession::Params>();
+  params->enable_spdy_ping_based_connection_checking = false;
+  params->enable_quic = false;
+  params->enable_websocket_over_http2 = true;
+  params->disable_idle_sockets_close_on_memory_pressure = false;
+  url_request_context_.set_http_network_session_params(std::move(params));
 }
 
 WebSocketTestURLRequestContextHost::~WebSocketTestURLRequestContextHost() =
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h
index a66262e..9e58406e 100644
--- a/net/websockets/websocket_test_util.h
+++ b/net/websockets/websocket_test_util.h
@@ -45,6 +45,9 @@
   uint64_t current_;
 };
 
+// Converts a vector of header key-value pairs into a single string.
+std::string WebSocketExtraHeadersToString(const WebSocketExtraHeaders& headers);
+
 // Generates a standard WebSocket handshake request. The challenge key used is
 // "dGhlIHNhbXBsZSBub25jZQ==". Each header in |extra_headers| must be terminated
 // with "\r\n".
diff --git a/services/network/cookie_manager_unittest.cc b/services/network/cookie_manager_unittest.cc
index 6a3e4e0..ffc49de6 100644
--- a/services/network/cookie_manager_unittest.cc
+++ b/services/network/cookie_manager_unittest.cc
@@ -130,7 +130,7 @@
  public:
   CookieManagerTest()
       : connection_error_seen_(false),
-        cookie_monster_(nullptr, nullptr, nullptr),
+        cookie_monster_(nullptr, nullptr),
         cookie_service_(std::make_unique<CookieManager>(&cookie_monster_)) {
     cookie_service_->AddRequest(mojo::MakeRequest(&cookie_service_ptr_));
     service_wrapper_ =
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 2c001e3b..37bbd5fc 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -289,10 +289,8 @@
             crypto_delegate));
 
     std::unique_ptr<net::CookieMonster> cookie_store =
-        std::make_unique<net::CookieMonster>(
-            sqlite_store.get(), channel_id_service.get(),
-            // |network_service_| may be nullptr in tests.
-            network_service_ ? network_service_->net_log() : nullptr);
+        std::make_unique<net::CookieMonster>(sqlite_store.get(),
+                                             channel_id_service.get());
     if (network_context_params->persist_session_cookies)
       cookie_store->SetPersistSessionCookies(true);
 
diff --git a/services/network/public/mojom/network_service.mojom b/services/network/public/mojom/network_service.mojom
index fcd18d4..24c0dd5 100644
--- a/services/network/public/mojom/network_service.mojom
+++ b/services/network/public/mojom/network_service.mojom
@@ -245,10 +245,10 @@
   // Called when an SSL certificate is encountered.
   // The callback argument is a net::ERROR value. If it's net::OK, then the
   // request is resumed. Otherwise it's cancelled with the given error.
-  OnSSLCertificateError(int32 resource_type,
-                        url.mojom.Url url,
-                        uint32 process_id,
+  OnSSLCertificateError(uint32 process_id,
                         uint32 routing_id,
+                        int32 resource_type,
+                        url.mojom.Url url,
                         SSLInfo ssl_info,
                         bool fatal) => (int32 net_error);
 };
diff --git a/services/network/restricted_cookie_manager_unittest.cc b/services/network/restricted_cookie_manager_unittest.cc
index fad1de58..de4fd40 100644
--- a/services/network/restricted_cookie_manager_unittest.cc
+++ b/services/network/restricted_cookie_manager_unittest.cc
@@ -79,7 +79,7 @@
 class RestrictedCookieManagerTest : public testing::Test {
  public:
   RestrictedCookieManagerTest()
-      : cookie_monster_(nullptr, nullptr, nullptr),
+      : cookie_monster_(nullptr, nullptr),
         service_(std::make_unique<RestrictedCookieManager>(&cookie_monster_,
                                                            MSG_ROUTING_NONE,
                                                            MSG_ROUTING_NONE)),
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 208e7e24..2344c55 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -473,7 +473,7 @@
     return;
   }
   network_service_client_->OnSSLCertificateError(
-      resource_type_, url_request_->url(), process_id_, render_frame_id_,
+      process_id_, render_frame_id_, resource_type_, url_request_->url(),
       ssl_info, fatal,
       base::Bind(&URLLoader::OnSSLCertificateErrorResponse,
                  weak_ptr_factory_.GetWeakPtr(), ssl_info));
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
index 3c2e4379..1788bd85 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
@@ -127,30 +127,6 @@
   return true;
 }
 
-void PopulateByteStats(VMRegion* region,
-                       const vm_region_top_info_data_t& info) {
-  uint64_t dirty_bytes =
-      (info.private_pages_resident + info.shared_pages_resident) * PAGE_SIZE;
-  switch (info.share_mode) {
-    case SM_LARGE_PAGE:
-    case SM_PRIVATE:
-    case SM_COW:
-      region->byte_stats_private_dirty_resident = dirty_bytes;
-      break;
-    case SM_SHARED:
-    case SM_PRIVATE_ALIASED:
-    case SM_TRUESHARED:
-    case SM_SHARED_ALIASED:
-      region->byte_stats_shared_dirty_resident = dirty_bytes;
-      break;
-    case SM_EMPTY:
-      break;
-    default:
-      NOTREACHED();
-      break;
-  }
-}
-
 // Creates VMRegions using mach vm syscalls. Returns whether the operation
 // succeeded.
 bool GetAllRegions(std::vector<VMRegion>* regions) {
@@ -164,26 +140,16 @@
     if (!next_address.IsValid())
       return false;
     address = next_address.ValueOrDie();
-    mach_vm_address_t address_copy = address;
-
-    vm_region_top_info_data_t info;
-    base::MachVMRegionResult result =
-        base::GetTopInfo(task, &size, &address, &info);
-    if (result == base::MachVMRegionResult::Error)
-      return false;
-    if (result == base::MachVMRegionResult::Finished)
-      break;
 
     vm_region_basic_info_64 basic_info;
-    mach_vm_size_t dummy_size = 0;
-    result = base::GetBasicInfo(task, &dummy_size, &address_copy, &basic_info);
+    base::MachVMRegionResult result =
+        base::GetBasicInfo(task, &size, &address, &basic_info);
     if (result == base::MachVMRegionResult::Error)
       return false;
     if (result == base::MachVMRegionResult::Finished)
       break;
 
     VMRegion region;
-    PopulateByteStats(&region, info);
 
     if (basic_info.protection & VM_PROT_READ)
       region.protection_flags |= VMRegion::kProtectionFlagsRead;
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_unittest.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_unittest.cc
index 5026efc..8d6af8e 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_unittest.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_unittest.cc
@@ -259,8 +259,8 @@
   ASSERT_EQ(0, result);
   std::string name = basename(full_path);
 
-  uint64_t components_unittests_resident_pages = 0;
   bool found_appkit = false;
+  bool found_components_unittests = false;
   for (const mojom::VmRegionPtr& region : maps) {
     EXPECT_NE(0u, region->start_address);
     EXPECT_NE(0u, region->size_in_bytes);
@@ -270,18 +270,14 @@
                                          mojom::VmRegion::kProtectionFlagsExec;
     if (region->mapped_file.find(name) != std::string::npos &&
         region->protection_flags == required_protection_flags) {
-      components_unittests_resident_pages +=
-          region->byte_stats_private_dirty_resident +
-          region->byte_stats_shared_dirty_resident +
-          region->byte_stats_private_clean_resident +
-          region->byte_stats_shared_clean_resident;
+      found_components_unittests = true;
     }
 
     if (region->mapped_file.find("AppKit") != std::string::npos) {
       found_appkit = true;
     }
   }
-  EXPECT_GT(components_unittests_resident_pages, 0u);
+  EXPECT_TRUE(found_components_unittests);
   EXPECT_TRUE(found_appkit);
 }
 #endif  // defined(OS_MACOSX)
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.cc
index 94a588c..d325a40 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.cc
@@ -9,6 +9,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/memory_dump_manager.h"
 #include "base/trace_event/trace_event_argument.h"
+#include "build/build_config.h"
 
 namespace memory_instrumentation {
 
@@ -192,6 +193,8 @@
       value->SetString("mf", region->mapped_file);
     }
 
+// The following stats are only well defined on Linux-derived OSes.
+#if !defined(OS_MACOSX) && !defined(OS_WIN)
     value->BeginDictionary("bs");  // byte stats
     value->SetString(
         "pss",
@@ -211,6 +214,7 @@
     value->SetString("sw",
                      base::StringPrintf(kHexFmt, region->byte_stats_swapped));
     value->EndDictionary();
+#endif
 
     value->EndDictionary();
   }
diff --git a/styleguide/c++/c++-dos-and-donts.md b/styleguide/c++/c++-dos-and-donts.md
index a7dcf8f..ffe3c1be 100644
--- a/styleguide/c++/c++-dos-and-donts.md
+++ b/styleguide/c++/c++-dos-and-donts.md
@@ -362,38 +362,39 @@
    auto x{1};  // Until C++17, decltype(x) is std::initializer_list<int>, not int!
    ```
 
-## Prefer `MakeUnique` to `WrapUnique`
+## Prefer `make_unique` to `WrapUnique`
 
-[`base::MakeUnique`](https://cs.chromium.org/chromium/src/base/memory/ptr_util.h?q=MakeUnique)`<Type>(...)`
+[`std::make_unique`](http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)`<Type>(...)`
 and
 [`base::WrapUnique`](https://cs.chromium.org/chromium/src/base/memory/ptr_util.h?q=WrapUnique)`(new Type(...))`
 are equivalent.
-`MakeUnique` should be preferred, because it is harder to use unsafely than
-`WrapUnique`. In general, bare calls to `new` require careful scrutiny. Bare
-calls to `new` are currently required to construct reference-counted types;
+`std::make_unique` should be preferred, because it is harder to use unsafely
+than `WrapUnique`. In general, bare calls to `new` require careful scrutiny.
+Bare calls to `new` are currently required to construct reference-counted types;
 however, reference counted types themselves require careful scrutiny.
 
 ```cpp
 return std::unique_ptr<C>(new C(1, 2, 3));  // BAD: type name mentioned twice
 return base::WrapUnique(new C(1, 2, 3));    // BAD: bare call to new
-return base::MakeUnique<C>(1, 2, 3);        // GOOD
+return std::make_unique<C>(1, 2, 3);        // GOOD
 ```
 
 **Notes:**
 
-1. Never friend `MakeUnique` to work around constructor access restrictions. It
-   will allow anyone to construct the class. Use `WrapUnique` in this case.
+1. Never friend `std::make_unique` to work around constructor access
+   restrictions. It will allow anyone to construct the class. Use `WrapUnique`
+   in this case.
 
    DON'T:
    ```cpp
    class Bad {
     public:
-     std::unique_ptr<Bad> Create() { return base::MakeUnique<Bad>(); }
+     std::unique_ptr<Bad> Create() { return std::make_unique<Bad>(); }
      // ...
     private:
      Bad();
      // ...
-     friend std::unique_ptr<Bad> base::MakeUnique<Bad>();  // Lost access control
+     friend std::unique_ptr<Bad> std::make_unique<Bad>();  // Lost access control
    };
    ```
 
@@ -413,18 +414,20 @@
 
 2. `WrapUnique(new Foo)` and `WrapUnique(new Foo())` mean something different if
    `Foo` does not have a user-defined constructor. Don't make future maintainers
-   guess whether you left off the '()' on purpose. Use `MakeUnique<Foo>()`
+   guess whether you left off the '()' on purpose. Use `std::make_unique<Foo>()`
    instead. If you're intentionally leaving off the "()" as an optimisation,
    please leave a comment.
 
    ```cpp
    auto a = base::WrapUnique(new A); // BAD: "()" omitted intentionally?
-   auto a = base::MakeUnique<A>();   // GOOD
+   auto a = std::make_unique<A>();   // GOOD
    // "()" intentionally omitted to avoid unnecessary zero-initialisation.
    // WrapUnique() does the wrong thing for array pointers.
    auto array = std::unique_ptr<A[]>(new A[size]);
    ```
 
+See also [TOTW 126](https://abseil.io/tips/126).
+
 ## Do not use `auto` to deduce a raw pointer
 
 The use of the `auto` keyword to deduce the type from the initializing
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index 84b2e0d..16923163 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -994,7 +994,7 @@
 
 <tr>
 <td>Lambda capture expressions</td>
-<td><code>auto widget = base::MakeUnique&lt;Widget&gt;();<br>auto lambda = [widget = std::move(widget)]() {<br>&nbsp;&nbsp;SetWidget(std::move(widget));<br>}</code></td>
+<td><code>auto widget = std::make_unique&lt;Widget&gt;();<br>auto lambda = [widget = std::move(widget)]() {<br>&nbsp;&nbsp;SetWidget(std::move(widget));<br>}</code></td>
 <td>Allows lambda captures to be explicitly initialized with expressions.</td>
 <td><a href="http://en.cppreference.com/w/cpp/language/lambda#Lambda_capture">Lambda capture</a></td>
 <td>Particularly useful to capture move-only types in a lambda when a reference would go out of scope. Less useful without allowing lambdas to outlive the scope.</td>
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 7cee121..c31744e 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -5803,13 +5803,23 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "content_unittests"
       }
@@ -5822,13 +5832,23 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "content_unittests"
       }
@@ -5842,13 +5862,23 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "content_unittests"
       }
@@ -5861,13 +5891,23 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "content_unittests"
       }
@@ -5880,13 +5920,23 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Mac"
+            }
+          ]
         },
         "test": "content_unittests"
       }
@@ -8942,6 +8992,9 @@
   "linux-blink-heap-incremental-marking": {
     "isolated_scripts": [
       {
+        "args": [
+          "--debug"
+        ],
         "isolate_name": "webkit_layout_tests_exparchive",
         "merge": {
           "args": [
diff --git a/testing/buildbot/filters/mash.browser_tests.filter b/testing/buildbot/filters/mash.browser_tests.filter
index 38e7388..8a0961b 100644
--- a/testing/buildbot/filters/mash.browser_tests.filter
+++ b/testing/buildbot/filters/mash.browser_tests.filter
@@ -274,3 +274,6 @@
 # https://crbug.com/815379
 -WindowOpenApiTest.RemoveLockedFullscreenFromWindow
 -WindowOpenApiTest.RemoveLockedFullscreenFromWindowWithoutPermission
+
+# Flaky segfaults: https://crbug.com/818147
+-ExtensionApiTest.BookmarkManager
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
index 96dbfb38..2de991d 100644
--- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -229,23 +229,13 @@
 # http://crbug.com/705114
 # Remove streams concept from code and replace with data pipe passing.
 -ChromeAcceptHeaderTest.Check
--ChromeFindRequestManagerTest.FindInPDF
--ChromeNavigationBrowserTest.CrossSiteRedirectionToPDF
 -ChromeSitePerProcessPDFTest.EmbeddedPDFInsideCrossOriginFrame
--ExecuteScriptApiTest/DestructiveScriptTest.DOMNodeInserted1/0
--ExecuteScriptApiTest/DestructiveScriptTest.DOMNodeInserted2/0
--ExecuteScriptApiTest/DestructiveScriptTest.DOMNodeInserted3/0
--ExecuteScriptApiTest/DestructiveScriptTest.DOMSubtreeModified1/0
--ExecuteScriptApiTest/DestructiveScriptTest.DOMSubtreeModified2/0
--ExecuteScriptApiTest/DestructiveScriptTest.DOMSubtreeModified3/0
 -ExecuteScriptApiTest/DestructiveScriptTest.MacrotaskRemoval/0
 -ExecuteScriptApiTest/DestructiveScriptTest.MicrotaskRemoval/0
 -ExecuteScriptApiTest/DestructiveScriptTest.SynchronousRemoval/0
 -ExtensionApiTest.TemporaryAddressSpoof
 -MimeHandlerViewTests/MimeHandlerViewTest.Abort/0
 -MimeHandlerViewTests/MimeHandlerViewTest.Abort/1
--MimeHandlerViewTests/MimeHandlerViewTest.Basic/0
--MimeHandlerViewTests/MimeHandlerViewTest.Basic/1
 -MimeHandlerViewTests/MimeHandlerViewTest.DataUrl/0
 -MimeHandlerViewTests/MimeHandlerViewTest.DataUrl/1
 -MimeHandlerViewTests/MimeHandlerViewTest.Embedded/0
@@ -257,68 +247,18 @@
 -MimeHandlerViewTests/MimeHandlerViewTest.EmbeddedDataUrlObject/0
 -MimeHandlerViewTests/MimeHandlerViewTest.EmbeddedDataUrlObject/1
 -MimeHandlerViewTests/MimeHandlerViewTest.Iframe/0
--MimeHandlerViewTests/MimeHandlerViewTest.Iframe/1
--MimeHandlerViewTests/MimeHandlerViewTest.NonAsciiHeaders/0
--MimeHandlerViewTests/MimeHandlerViewTest.NonAsciiHeaders/1
 -MimeHandlerViewTests/MimeHandlerViewTest.PostMessage/0
 -MimeHandlerViewTests/MimeHandlerViewTest.PostMessage/1
 -MimeHandlerViewTests/MimeHandlerViewTest.ResizeBeforeAttach/0
 -MimeHandlerViewTests/MimeHandlerViewTest.ResizeBeforeAttach/1
+-MimeHandlerViewTests/MimeHandlerViewTest.SingleRequest/0
 -MimeHandlerViewTests/MimeHandlerViewTest.SingleRequest/1
--PDFExtensionClipboardTest.CombinedShiftArrowPresses
--PDFExtensionClipboardTest.CombinedShiftRightArrowPresses
--PDFExtensionClipboardTest.IndividualShiftLeftArrowPresses
--PDFExtensionClipboardTest.IndividualShiftRightArrowPresses
--PDFExtensionLinkClickTest.CtrlLeft
--PDFExtensionLinkClickTest.CtrlShiftLeft
--PDFExtensionLinkClickTest.Middle
--PDFExtensionLinkClickTest.OpenPDFWithReplaceState
--PDFExtensionLinkClickTest.ShiftLeft
--PDFExtensionLinkClickTest.ShiftMiddle
--PDFExtensionTest.Basic
--PDFExtensionTest.BasicPlugin
--PDFExtensionTest.BlockDirectAccess
--PDFExtensionTest.Bookmark
 -PDFExtensionTest.ContextMenuCoordinates
--PDFExtensionTest.CtrlWheelInvokesCustomZoom
--PDFExtensionTest.Elements
 -PDFExtensionTest.EnsureCrossOriginRepliesBlocked
--PDFExtensionTest.EnsurePDFFromLocalFileLoads
--PDFExtensionTest.EnsureSameOriginRepliesAllowed
--PDFExtensionTest.GestureDetector
--PDFExtensionTest.LinkPermissions
--PDFExtensionTest.Metrics
--PDFExtensionTest.NavigationOnCorrectTab
--PDFExtensionTest.Navigator
--PDFExtensionTest.OpenFromFTP
--PDFExtensionTest.PageChange
--PDFExtensionTest.ParamsParser
--PDFExtensionTest.PdfAccessibility
--PDFExtensionTest.PdfAccessibilityEnableLater
--PDFExtensionTest.PdfAccessibilityInIframe
--PDFExtensionTest.PdfAccessibilityInOOPIF
 -PDFExtensionTest.PdfAccessibilityWordBoundaries
--PDFExtensionTest.PdfZoomWithoutBubble
 -PDFExtensionTest.PostMessageForZeroSizedEmbed
--PDFExtensionTest.RedirectsFailInPlugin
 -PDFExtensionTest.TabTitleWithEmbeddedPdf
--PDFExtensionTest.TabTitleWithNoTitle
--PDFExtensionTest.TabTitleWithTitle
--PDFExtensionTest.Title
--PDFExtensionTest.ToolbarManager
--PDFExtensionTest.TouchHandling
--PDFExtensionTest.Viewport
--PDFExtensionTest.WhitespaceTitle
--PDFExtensionTest.ZoomManager
--PdfPluginContextMenuBrowserTest.FullPagePdfHasPageItems
--PdfPluginContextMenuBrowserTest.IframedPdfHasNoPageItems
--PDFTestFiles/PDFExtensionTest.Load/0
--PDFTestFiles/PDFExtensionTest.Load/1
--PDFTestFiles/PDFExtensionTest.Load/3
--PDFTestFiles/PDFExtensionTest.Load/5
--PDFTestFiles/PDFExtensionTest.Load/8
 -PrerenderBrowserTestWithExtensions.StreamsTest
--PrintPreviewDialogControllerBrowserTest.PrintPreviewPdfAccessibility
 -SaveType/SavePageOriginalVsSavedComparisonTest.ObjectElementsViaFile/0
 -SaveType/SavePageOriginalVsSavedComparisonTest.ObjectElementsViaHttp/0
 -StreamsPrivateApiTest.Abort
@@ -326,9 +266,6 @@
 -StreamsPrivateApiTest.Headers
 -StreamsPrivateApiTest.Navigate
 -StreamsPrivateApiTest.NavigateCrossSite
--WebViewTests/WebViewTest.ContextMenuNavigationInMimeHandlerView/0
--WebViewTests/WebViewTest.ContextMenuNavigationInMimeHandlerView/1
--WebViewTests/WebViewTest.NestedGuestContainerBounds/0
 
 # http://crbug.com/784576
 # Convert ExtensionRequestLimitingThrottle into a URLLoaderThrottle.
diff --git a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
index 1fa820ae..5548b389 100644
--- a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
@@ -44,11 +44,8 @@
 -DevToolsDownloadContentTest.DefaultDownloadHeadless
 -DevToolsDownloadContentTest.SingleDownload
 -DevToolsProtocolTest.ControlNavigationsMainFrame
--DevToolsProtocolTest.SubresourceWithCertificateError
 -GetUserMediaVideoCaptureBrowserTest.RecoverFromCrashInVideoCaptureProcess
 -IsolatedDevToolsProtocolTest.ControlNavigationsChildFrames
--IsolateIcelandFrameTreeBrowserTest.ProcessSwitchForIsolatedBlob
--ManifestBrowserTest.UseCredentialsSendCookies
 -NavigationHandleImplBrowserTest.ErrorCodeOnRedirect
 -NavigationHandleImplBrowserTest.RedirectToRendererDebugUrl
 -PowerMonitorTest.TestGpuProcess
@@ -71,10 +68,7 @@
 -RequestDataResourceDispatcherHostBrowserTest.LinkRelPrefetchReferrerPolicy
 -RequestDataResourceDispatcherHostBrowserTest.SameOriginAuxiliary
 -RequestDataResourceDispatcherHostBrowserTest.SameOriginNested
--SitePerProcessIgnoreCertErrorsBrowserTest.SubresourceWithCertificateErrors
 -WebContentsImplBrowserTest.DownloadImage_Deny_FileImage
--WorkerTest.WorkerTlsClientAuthFetch
--WorkerTest.WorkerTlsClientAuthImportScripts
 
 # services/network/url_loader.cc should handle failure in
 # URLLoaderImpl::OnResponseBodyStreamRead(). Note this is flaky, so it will pass
@@ -103,7 +97,6 @@
 -ResourceDispatcherHostBrowserTest.CrossSiteNavigationNonBuffered
 -ResourceDispatcherHostBrowserTest.DoNotSniffHTMLFromImageGIF
 -ResourceDispatcherHostBrowserTest.DoNotSniffHTMLFromTextPlain
--ResourceDispatcherHostBrowserTest.PageTransitionClientRedirect
 -ResourceDispatcherHostBrowserTest.RespectNoSniffDirective
 -ResourceDispatcherHostBrowserTest.SniffHTMLWithNoContentType
 -ResourceDispatcherHostBrowserTest.SniffNoContentTypeNoData
diff --git a/testing/buildbot/filters/mojo.fyi.viz.content_browsertests.filter b/testing/buildbot/filters/mojo.fyi.viz.content_browsertests.filter
index 43cfb63..273da5ae 100644
--- a/testing/buildbot/filters/mojo.fyi.viz.content_browsertests.filter
+++ b/testing/buildbot/filters/mojo.fyi.viz.content_browsertests.filter
@@ -54,6 +54,7 @@
 -SitePerProcessHitTestBrowserTest.SubframeTouchEventRouting*
 -SitePerProcessHitTestBrowserTest.SurfaceHitTestPointerEventsNone*
 -SitePerProcessHitTestBrowserTest.SurfaceHitTestTest*
+-SitePerProcessMacBrowserTest.InputEventRouterTouchpadGestureTargetTest
 -SitePerProcessNonIntegerScaleFactorHitTestBrowserTest.NestedSurfaceHitTestTest*
 
 # Copy Surface timing out http://crbug.com/785257
@@ -91,8 +92,8 @@
 # Flaky Result on Windows-7 http://crbug.com/883463
 -MainThreadEventQueueBrowserTest.MouseMove
 
-# New Mac failures to triage
+# Surface Invariants Failure on Mac http://crbug.com/817827
 -NavigationControllerBrowserTest.FrameNavigationEntry_RecreatedSubframeBackForward
--SitePerProcessMacBrowserTest.InputEventRouterTouchpadGestureTargetTest
--WebContentsVideoCaptureDeviceBrowserTestP.CapturesContentChanges/2
--WebContentsVideoCaptureDeviceBrowserTestP.CapturesContentChanges/3
+
+# GL Renderer Check Failure on Mac https://crbug.com/817830
+-WebContentsVideoCaptureDeviceBrowserTestP.CapturesContentChanges/*
diff --git a/testing/buildbot/filters/viz.browser_tests.filter b/testing/buildbot/filters/viz.browser_tests.filter
index ff60776..12e6e6e 100644
--- a/testing/buildbot/filters/viz.browser_tests.filter
+++ b/testing/buildbot/filters/viz.browser_tests.filter
@@ -36,6 +36,7 @@
 
 # WaitForChildFrameSurfaceReady crashes crbug.com/787945
 -PDFExtensionTest.ContextMenuCoordinates
+-SitePerProcessDevToolsSanityTest.InputDispatchEventsToOOPIF
 -WebViewTests/WebViewTest.InterstitialPageFocusedWidget/1
 -WebViewTests/WebViewTest.ReloadAfterCrash/1
 
@@ -55,6 +56,9 @@
 -WebViewTests/WebViewTest.Shim_TestReloadAfterTerminate/0
 -WebViewTests/WebViewTest.Shim_TestTerminateAfterExit/0
 
+# Incorrect Focus State crbug.com/818205
+-WebViewTests/WebViewFocusTest.TouchFocusesEmbedder/0
+
 # Windows only failures
 -ExtensionApiTabTest.TabsOnUpdated
 
@@ -62,18 +66,10 @@
 -CloudPrintPolicyTest.NormalPassedFlag
 -PolicyMakeDefaultBrowserTest.MakeDefaultDisabled
 
-# Mac failures to triage
+# Surface Invariants Failure on Mac http://crbug.com/817827
 -ActivityLogApiTest.TriggerEvent
 -AllUrlsApiTest.WhitelistedExtension
--BrowserTest.WindowOpenClose3
 -DNSErrorPageTest.DNSError_GoBack2Forward2
--DeclarativeNetRequestBrowserTest.BlockRequests_UrlFilter/0
--DeclarativeNetRequestBrowserTest.BlockRequests_UrlFilter/1
--DeclarativeNetRequestBrowserTest.RedirectPriority/0
--DeclarativeNetRequestBrowserTest.RedirectPriority/1
--DeclarativeNetRequestResourceTypeBrowserTest.Test1/0
--DeclarativeNetRequestResourceTypeBrowserTest.Test1/1
--DeclarativeNetRequestResourceTypeBrowserTest.Test2/0
 -DevToolsFrontendInWebRequestApiTest.HiddenRequests
 -ExtensionApiNewTabTest.Tabs
 -ExtensionApiTabTest.TabEvents
@@ -82,12 +78,23 @@
 -ExtensionTabUtilBrowserTest.OpenSplitModeExtensionOptionsPageIncognito
 -ExtensionWebRequestApiTest.WebRequestBlocking
 -ExtensionWebRequestApiTest.WebRequestSimple
--HardwareAccelerationModePolicyTest.HardwareAccelerationDisabled
 -HostedAppProcessModelTest.PopupsInsideHostedApp/0
 -HostedAppProcessModelTest.PopupsInsideHostedApp/1
--IndependentOTRProfileManagerTest.DeleteWaitsForLastBrowser
 -IsolatedAppTest.IsolatedAppProcessModel
 -LocalNTPDoodleTest.ShouldNotMoveFakeboxForIframeSizes
+-ServiceWorkerTestWithJSBindings/ServiceWorkerTest.ServiceWorkerSuspensionOnExtensionUnload/0
+-ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.ServiceWorkerSuspensionOnExtensionUnload/0
+-TabManagerTest.DiscardTabsWithMinimizedAndOccludedWindows
+
+# GL Renderer Check Failure on Mac https://crbug.com/817830
+-DeclarativeNetRequestBrowserTest.BlockRequests_UrlFilter/0
+-DeclarativeNetRequestBrowserTest.BlockRequests_UrlFilter/1
+-DeclarativeNetRequestBrowserTest.RedirectPriority/0
+-DeclarativeNetRequestBrowserTest.RedirectPriority/1
+-DeclarativeNetRequestResourceTypeBrowserTest.Test1/0
+-DeclarativeNetRequestResourceTypeBrowserTest.Test1/1
+-DeclarativeNetRequestResourceTypeBrowserTest.Test2/0
+-HardwareAccelerationModePolicyTest.HardwareAccelerationDisabled
 -PluginPowerSaverBrowserTest.BackgroundTabPlugins
 -PluginPowerSaverBrowserTest.BackgroundTabTinyPlugins
 -PluginPowerSaverBrowserTest.BlockTinyPlugins
@@ -98,15 +105,11 @@
 -PluginPowerSaverBrowserTest.OriginWhitelisting
 -PluginPowerSaverBrowserTest.RunAllFlashInAllowMode
 -PluginPowerSaverBrowserTest.ZoomIndependent
--SSLClientCertificateSelectorCocoaTest.WorkaroundCrashySierra
 -SSLUIWorkerFetchTest.MixedContentSettings/0
 -SSLUIWorkerFetchTest.MixedContentSettings/1
 -SSLUIWorkerFetchTest.MixedContentSettingsWithBlockingCSP/0
 -SSLUIWorkerFetchTest.MixedContentSettingsWithBlockingCSP/1
 -SSLUIWorkerFetchTest.MixedContentSubFrame/0
 -SSLUIWorkerFetchTest.MixedContentSubFrame/1
--ServiceWorkerTestWithJSBindings/ServiceWorkerTest.ServiceWorkerSuspensionOnExtensionUnload/0
--ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.ServiceWorkerSuspensionOnExtensionUnload/0
--TabManagerTest.DiscardTabsWithMinimizedAndOccludedWindows
 -ThumbnailTest.ShouldContainProperContentIfCapturedOnNavigatingAway
 -ThumbnailTest.ShouldContainProperContentIfCapturedOnTabSwitch
diff --git a/testing/buildbot/filters/viz.content_unittests.filter b/testing/buildbot/filters/viz.content_unittests.filter
index 9e7fc2a..5cba3a36 100644
--- a/testing/buildbot/filters/viz.content_unittests.filter
+++ b/testing/buildbot/filters/viz.content_unittests.filter
@@ -20,6 +20,3 @@
 
 # TODO(crbug.com/601869): Reflector needs to be rewritten for viz.
 -ReflectorImplTest.*
-
-# New Mac failures to triage
--RenderWidgetHostViewMacTest.ClearCompositorFrame
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl
index 85f70d8..d0a4467 100644
--- a/testing/buildbot/test_suite_exceptions.pyl
+++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -3637,6 +3637,11 @@
           'shards': 6,
         },
       },
+      'linux-blink-heap-incremental-marking': {
+        'args': [
+          '--debug',
+        ],
+      },
       'WebKit Linux layout_ng Dummy Builder': {
         'args': [
           '--additional-driver-flag=--enable-blink-features=LayoutNG',
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl
index a60c811..305b448b 100644
--- a/testing/buildbot/test_suites.pyl
+++ b/testing/buildbot/test_suites.pyl
@@ -835,11 +835,6 @@
     },
   },
 
-  'goma_gtests': {
-    'base_unittests': {},
-    'content_unittests': {},
-  },
-
   'headless_linux_gtests': {
     'headless_browsertests': {},
     'headless_unittests': {},
@@ -883,6 +878,27 @@
     'content_unittests': {},
   },
 
+  'goma_mac_gtests': {
+    'base_unittests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'os': 'Mac',
+          },
+        ],
+      }
+    },
+    'content_unittests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'os': 'Mac',
+          },
+        ],
+      },
+    },
+  },
+
   'linux_and_chromeos_non_clang_specific_chromium_gtests': {
     # TOOD(kbr): rename back to linux_and_chromeos_specific_chromium_gtests.
     'media_service_unittests': {},
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl
index 65da17cb2..03fbb15 100644
--- a/testing/buildbot/waterfalls.pyl
+++ b/testing/buildbot/waterfalls.pyl
@@ -1127,7 +1127,7 @@
           'all',
         ],
         'test_suites': {
-          'gtest_tests': 'goma_gtests',
+          'gtest_tests': 'goma_mac_gtests',
         },
       },
       'Mac Builder (dbg) Goma Canary (clobber)': {
@@ -1135,7 +1135,7 @@
           'all',
         ],
         'test_suites': {
-          'gtest_tests': 'goma_gtests',
+          'gtest_tests': 'goma_mac_gtests',
         },
       },
       'Mac Builder Goma Canary': {
@@ -1144,7 +1144,7 @@
           'pdf_fuzzers',
         ],
         'test_suites': {
-          'gtest_tests': 'goma_gtests',
+          'gtest_tests': 'goma_mac_gtests',
         },
       },
       'Mac Goma Canary (clobber)': {
@@ -1152,7 +1152,7 @@
           'all',
         ],
         'test_suites': {
-          'gtest_tests': 'goma_gtests',
+          'gtest_tests': 'goma_mac_gtests',
         },
       },
       'Mac Goma Canary LocalOutputCache': {
@@ -1160,7 +1160,7 @@
           'all',
         ],
         'test_suites': {
-          'gtest_tests': 'goma_gtests',
+          'gtest_tests': 'goma_mac_gtests',
         },
       },
       'Mojo Android': {
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index a70872fa..35cc8b5 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -2927,6 +2927,25 @@
             ]
         }
     ],
+    "RemoveNavigationHistory": [
+        {
+            "platforms": [
+                "android",
+                "chromeos",
+                "linux",
+                "mac",
+                "win"
+            ],
+            "experiments": [
+                {
+                    "name": "Enabled",
+                    "enable_features": [
+                        "RemoveNavigationHistory"
+                    ]
+                }
+            ]
+        }
+    ],
     "RendererSchedulerWakeUpThrottling": [
         {
             "platforms": [
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 3820a242..dccaf60 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -56,6 +56,7 @@
 /errorprone/lib
 /espresso/lib/
 /eyesfree/src
+/feed/src
 /ffmpeg
 /flac
 /flatbuffers/src
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 8b9f9e9..e13ae51 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -126,24 +126,15 @@
 crbug.com/714962 compositing/gestures/gesture-tapHighlight-2-overflow-div-scrolled-inner.html [ Failure ]
 crbug.com/714962 compositing/gestures/gesture-tapHighlight-simple-multi-line.html [ Pass ]
 crbug.com/714962 compositing/gestures/gesture-tapHighlight-with-squashing.html [ Pass ]
-crbug.com/591099 compositing/iframes/composited-iframe-alignment.html [ Failure ]
 crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure ]
-crbug.com/591099 compositing/iframes/iframe-in-composited-layer.html [ Failure ]
-crbug.com/591099 compositing/iframes/nested-iframe-scrolling.html [ Failure ]
 crbug.com/591099 compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page.html [ Failure ]
 crbug.com/591099 compositing/layer-creation/rotate3d-overlap.html [ Failure ]
-crbug.com/591099 compositing/massive-scale-interest-rect.html [ Failure ]
-crbug.com/591099 compositing/overflow/ancestor-overflow.html [ Failure ]
 crbug.com/591099 compositing/overflow/border-radius-above-composited-subframe.html [ Failure ]
 crbug.com/591099 compositing/overflow/get-transform-from-non-box-container.html [ Failure ]
 crbug.com/591099 compositing/overflow/nested-border-radius-clipping.html [ Failure ]
-crbug.com/591099 compositing/overflow/overflow-compositing-descendant.html [ Failure ]
 crbug.com/591099 compositing/overflow/overflow-scroll-with-local-image-background.html [ Failure ]
-crbug.com/591099 compositing/overflow/overflow-scroll.html [ Failure ]
-crbug.com/591099 compositing/overflow/parent-overflow.html [ Failure ]
 crbug.com/714962 compositing/overflow/rtl-overflow.html [ Failure ]
 crbug.com/591099 compositing/overflow/scaled-mask.html [ Failure ]
-crbug.com/591099 compositing/overflow/scroll-ancestor-update.html [ Failure ]
 crbug.com/591099 compositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
 crbug.com/591099 compositing/overflow/universal-accelerated-overflow-scroll.html [ Timeout ]
 crbug.com/591099 compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers.html [ Failure ]
@@ -160,68 +151,12 @@
 crbug.com/591099 crypto/subtle/hmac/cloneKey.html [ Timeout ]
 crbug.com/591099 crypto/subtle/pbkdf2/cloneKey.html [ Timeout ]
 crbug.com/591099 crypto/subtle/rsassa-pkcs1-v1_5/cloneKey.html [ Timeout ]
-crbug.com/591099 css1/basic/comments.html [ Failure ]
-crbug.com/591099 css1/basic/grouping.html [ Failure ]
-crbug.com/591099 css1/basic/inheritance.html [ Failure ]
-crbug.com/591099 css1/box_properties/border.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_bottom_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_bottom_width.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_bottom_width_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_color.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_left_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_left_width.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_left_width_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_right.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_right_width.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_right_width_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_top_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_top_width.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_top_width_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_width.html [ Failure ]
-crbug.com/591099 css1/box_properties/border_width_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/clear.html [ Failure ]
-crbug.com/591099 css1/box_properties/float.html [ Failure ]
 crbug.com/591099 css1/box_properties/float_elements_in_series.html [ Failure ]
 crbug.com/591099 css1/box_properties/float_on_text_elements.html [ Failure ]
-crbug.com/591099 css1/box_properties/height.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_bottom.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_bottom_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_left_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_right_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_top.html [ Failure ]
-crbug.com/591099 css1/box_properties/margin_top_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_bottom.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_bottom_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_left_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_right_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_top.html [ Failure ]
-crbug.com/591099 css1/box_properties/padding_top_inline.html [ Failure ]
-crbug.com/591099 css1/box_properties/width.html [ Failure ]
-crbug.com/591099 css1/cascade/important.html [ Failure ]
 crbug.com/591099 css1/classification/list_style.html [ Failure ]
 crbug.com/591099 css1/classification/list_style_image.html [ Failure ]
-crbug.com/591099 css1/classification/white_space.html [ Failure ]
-crbug.com/591099 css1/color_and_background/background.html [ Failure ]
-crbug.com/591099 css1/color_and_background/background_image.html [ Failure ]
-crbug.com/591099 css1/color_and_background/background_position.html [ Failure ]
 crbug.com/591099 css1/color_and_background/background_repeat.html [ Failure ]
-crbug.com/591099 css1/color_and_background/color.html [ Failure ]
-crbug.com/591099 css1/conformance/forward_compatible_parsing.html [ Failure ]
-crbug.com/591099 css1/formatting_model/replaced_elements.html [ Failure ]
-crbug.com/591099 css1/formatting_model/vertical_formatting.html [ Failure ]
-crbug.com/591099 css1/pseudo/firstletter.html [ Failure ]
 crbug.com/591099 css1/pseudo/multiple_pseudo_elements.html [ Crash ]
-crbug.com/591099 css1/units/color_units.html [ Failure ]
-crbug.com/591099 css1/units/percentage_units.html [ Failure ]
-crbug.com/591099 css1/units/urls.html [ Failure ]
-crbug.com/591099 css2.1/20110323/border-collapse-offset-002.htm [ Failure ]
-crbug.com/591099 css2.1/20110323/border-conflict-style-079.htm [ Failure ]
-crbug.com/591099 css2.1/20110323/border-conflict-style-088.htm [ Failure ]
-crbug.com/591099 css2.1/20110323/list-style-position-005.htm [ Failure ]
 crbug.com/591099 css2.1/20110323/margin-applies-to-008.htm [ Failure ]
 crbug.com/714962 css2.1/20110323/overflow-applies-to-012.htm [ Failure ]
 crbug.com/591099 css2.1/20110323/table-caption-margins-001.htm [ Failure ]
@@ -230,43 +165,18 @@
 crbug.com/591099 css2.1/t0510-c25-pseudo-elmnt-00-c.html [ Failure ]
 crbug.com/591099 css2.1/t051201-c23-first-line-00-b.html [ Crash ]
 crbug.com/591099 css2.1/t051202-c26-psudo-nest-00-c.html [ Crash ]
-crbug.com/591099 css2.1/t0602-inherit-bdr-pad-b-00.html [ Failure ]
-crbug.com/591099 css2.1/t0803-c5505-mrgn-02-c.html [ Failure ]
-crbug.com/591099 css2.1/t0805-c5519-brdr-r-01-e.html [ Failure ]
-crbug.com/591099 css2.1/t0805-c5521-brdr-l-00-a.html [ Failure ]
-crbug.com/591099 css2.1/t0805-c5521-brdr-l-01-e.html [ Failure ]
-crbug.com/591099 css2.1/t0805-c5522-brdr-01-b-g.html [ Failure ]
-crbug.com/591099 css2.1/t0805-c5522-brdr-02-e.html [ Failure ]
-crbug.com/591099 css2.1/t09-c5526c-display-00-e.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c414-flt-fit-00-d.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c414-flt-fit-01-d-g.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c414-flt-wrap-00-e.html [ Failure ]
 crbug.com/591099 css2.1/t0905-c414-flt-wrap-01-d-g.html [ Failure ]
 crbug.com/591099 css2.1/t0905-c5525-fltblck-00-d-ag.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c5525-fltinln-00-c-ag.html [ Failure ]
 crbug.com/591099 css2.1/t0905-c5525-fltmrgn-00-c-ag.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c5525-fltwidth-01-c-g.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c5525-fltwidth-02-c-g.html [ Failure ]
-crbug.com/591099 css2.1/t0905-c5525-fltwidth-03-c-g.html [ Failure ]
-crbug.com/591099 css2.1/t090501-c414-flt-02-d-g.html [ Failure ]
-crbug.com/591099 css2.1/t090501-c414-flt-03-b-g.html [ Failure ]
-crbug.com/591099 css2.1/t090501-c5525-flt-l-00-b-g.html [ Failure ]
-crbug.com/591099 css2.1/t090501-c5525-flt-r-00-b-g.html [ Failure ]
 crbug.com/591099 css2.1/t1002-c5523-width-00-b-g.html [ Failure Pass ]
 crbug.com/591099 css2.1/t1005-c5524-width-00-b-g.html [ Failure Pass ]
 crbug.com/591099 css2.1/t1005-c5524-width-01-b-g.html [ Failure Pass ]
 crbug.com/591099 css2.1/t100801-c544-valgn-00-a-ag.html [ Failure ]
-crbug.com/591099 css2.1/t100801-c544-valgn-02-d-agi.html [ Failure ]
 crbug.com/591099 css2.1/t100801-c544-valgn-03-d-agi.html [ Failure ]
 crbug.com/591099 css2.1/t1202-counter-04-b.html [ Failure ]
 crbug.com/591099 css2.1/t1202-counter-09-b.html [ Failure ]
 crbug.com/591099 css2.1/t1202-counters-04-b.html [ Failure ]
-crbug.com/591099 css2.1/t120401-scope-04-d.html [ Failure ]
-crbug.com/591099 css2.1/t1205-c561-list-displ-00-b.html [ Failure ]
-crbug.com/591099 css2.1/t1205-c563-list-type-01-b.html [ Failure ]
 crbug.com/591099 css2.1/t1205-c564-list-img-00-b-g.html [ Failure ]
-crbug.com/591099 css2.1/t1205-c565-list-pos-00-b.html [ Failure ]
-crbug.com/591099 css2.1/t1205-c566-list-stl-00-e-ag.html [ Failure ]
 crbug.com/591099 css2.1/t1205-c566-list-stl-01-c-g.html [ Failure ]
 crbug.com/591099 css2.1/t140201-c533-bgimage-00-a.html [ Failure Pass ]
 crbug.com/591099 css2.1/t140201-c534-bgreps-00-c-ag.html [ Failure Pass ]
@@ -274,134 +184,10 @@
 crbug.com/591099 css2.1/t140201-c534-bgreps-03-c-ag.html [ Failure Pass ]
 crbug.com/591099 css2.1/t140201-c534-bgreps-04-c-ag.html [ Failure Pass ]
 crbug.com/591099 css2.1/t140201-c534-bgreps-05-c-ag.html [ Failure Pass ]
-crbug.com/591099 css2.1/t1508-c527-font-01-b.html [ Failure ]
-crbug.com/591099 css2.1/t1508-c527-font-02-b.html [ Failure ]
-crbug.com/591099 css2.1/t1508-c527-font-09-b.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-00-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-01-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-02-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-03-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-04-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-05-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-06-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-07-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-08-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-09-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-10-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-11-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-12-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-13-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-14-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-15-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-16-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-17-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-18-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-19-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-20-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-21-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-22-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-23-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-24-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-25-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-26-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-27-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-28-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-29-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-30-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-31-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-32-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-33-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-34-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-35-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-36-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-37-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-38-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-39-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-40-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-41-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-42-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-43-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-44-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-45-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-46-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-47-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-48-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-49-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-50-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-51-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-52-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-53-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-54-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-55-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-56-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-57-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-58-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-59-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-60-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-61-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-62-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-63-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-64-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-65-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-66-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-67-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-68-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-69-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-70-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-71-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-72-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-73-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-74-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-75-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-76-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-77-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-78-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-79-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-80-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-81-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-82-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-83-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-84-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-85-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-86-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-87-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-88-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-89-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-90-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-91-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-92-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-93-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-94-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-95-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-96-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-97-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-98-d.html [ Failure ]
-crbug.com/591099 css2.1/t170602-bdr-conflct-w-99-d.html [ Failure ]
 crbug.com/591099 css3/blending/background-blend-mode-overlapping-accelerated-elements.html [ Failure ]
 crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ]
-crbug.com/591099 css3/filters/effect-brightness-clamping-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-brightness-clamping.html [ Failure ]
-crbug.com/591099 css3/filters/effect-brightness-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-brightness.html [ Failure ]
-crbug.com/591099 css3/filters/effect-combined-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-combined.html [ Failure ]
-crbug.com/591099 css3/filters/effect-contrast.html [ Failure ]
-crbug.com/591099 css3/filters/effect-drop-shadow-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-drop-shadow.html [ Failure ]
-crbug.com/591099 css3/filters/effect-grayscale-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-grayscale.html [ Failure ]
-crbug.com/591099 css3/filters/effect-hue-rotate-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-hue-rotate.html [ Failure ]
-crbug.com/591099 css3/filters/effect-invert-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-invert.html [ Failure ]
-crbug.com/591099 css3/filters/effect-opacity-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-opacity.html [ Failure ]
 crbug.com/591099 css3/filters/effect-reference-subregion-nested.html [ Pass ]
 crbug.com/714962 css3/filters/effect-reference-zoom-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-saturate-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-saturate.html [ Failure ]
-crbug.com/591099 css3/filters/effect-sepia-hw.html [ Failure ]
-crbug.com/591099 css3/filters/effect-sepia.html [ Failure ]
 crbug.com/591099 css3/filters/filtered-inline.html [ Failure ]
 crbug.com/591099 css3/filters/multiple-references-id-mutate-crash-2.html [ Crash ]
 crbug.com/591099 css3/flexbox/child-overflow.html [ Failure ]
@@ -423,51 +209,19 @@
 crbug.com/591099 css3/selectors3/html/css3-modsel-167.html [ Failure ]
 crbug.com/591099 css3/selectors3/html/css3-modsel-167a.html [ Failure ]
 crbug.com/591099 css3/selectors3/html/css3-modsel-179a.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-18b.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-23.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-24.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-34.html [ Failure ]
 crbug.com/591099 css3/selectors3/html/css3-modsel-38.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-39a.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-39c.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-68.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-69.html [ Failure ]
-crbug.com/591099 css3/selectors3/html/css3-modsel-80.html [ Failure ]
 crbug.com/591099 css3/selectors3/xhtml/css3-modsel-167.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xhtml/css3-modsel-167a.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xhtml/css3-modsel-179a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-180a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-18b.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-23.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-24.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-34.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xhtml/css3-modsel-38.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-39a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-39c.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-68.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-69.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-80.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xhtml/css3-modsel-9.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xml/css3-modsel-167.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xml/css3-modsel-167a.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xml/css3-modsel-179a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-180a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-18b.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-23.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-24.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-34.xml [ Failure ]
 crbug.com/591099 css3/selectors3/xml/css3-modsel-38.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-39a.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-39c.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-68.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-69.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-80.xml [ Failure ]
-crbug.com/591099 css3/selectors3/xml/css3-modsel-9.xml [ Failure ]
 crbug.com/714962 css3/unicode-bidi-isolate-basic.html [ Failure ]
 crbug.com/591099 editing/assert_selection.html [ Failure ]
 crbug.com/591099 editing/caret/caret-color-014.html [ Failure ]
 crbug.com/591099 editing/caret/caret-color-015.html [ Failure ]
-crbug.com/591099 editing/caret/caret-position.html [ Failure ]
 crbug.com/591099 editing/deleting/4922367.html [ Failure ]
 crbug.com/591099 editing/deleting/5272440.html [ Failure ]
 crbug.com/591099 editing/deleting/5369009.html [ Failure ]
@@ -482,8 +236,6 @@
 crbug.com/591099 editing/execCommand/4580583-1.html [ Failure ]
 crbug.com/591099 editing/execCommand/4580583-2.html [ Failure ]
 crbug.com/591099 editing/execCommand/5138441.html [ Failure ]
-crbug.com/591099 editing/execCommand/5142012-1.html [ Failure ]
-crbug.com/591099 editing/execCommand/5190926.html [ Failure ]
 crbug.com/591099 editing/execCommand/5569741.html [ Failure ]
 crbug.com/591099 editing/execCommand/align-in-span.html [ Failure ]
 crbug.com/591099 editing/execCommand/findString.html [ Failure ]
@@ -496,11 +248,7 @@
 crbug.com/591099 editing/input/linux_rtl_composition_underline.html [ Failure ]
 crbug.com/591099 editing/inserting/4875189-1.html [ Failure ]
 crbug.com/591099 editing/inserting/4959067.html [ Failure ]
-crbug.com/591099 editing/inserting/5002441.html [ Failure ]
-crbug.com/591099 editing/inserting/5058163-1.html [ Failure ]
-crbug.com/591099 editing/inserting/5418891.html [ Failure ]
 crbug.com/591099 editing/inserting/5549929-2.html [ Failure ]
-crbug.com/591099 editing/inserting/break-blockquote-after-delete.html [ Failure ]
 crbug.com/591099 editing/inserting/editable-inline-element.html [ Failure ]
 crbug.com/591099 editing/inserting/insert-3800346-fix.html [ Failure ]
 crbug.com/591099 editing/inserting/insert-br-quoted-001.html [ Failure ]
@@ -515,11 +263,8 @@
 crbug.com/591099 editing/pasteboard/4631972.html [ Failure ]
 crbug.com/591099 editing/pasteboard/4806874.html [ Failure ]
 crbug.com/591099 editing/pasteboard/4947130.html [ Failure ]
-crbug.com/591099 editing/pasteboard/5006779.html [ Failure ]
-crbug.com/591099 editing/pasteboard/5071074-2.html [ Failure ]
 crbug.com/591099 editing/pasteboard/5071074.html [ Failure ]
 crbug.com/591099 editing/pasteboard/5134759.html [ Failure ]
-crbug.com/591099 editing/pasteboard/7955.html [ Failure ]
 crbug.com/591099 editing/pasteboard/bad-placeholder.html [ Failure ]
 crbug.com/714962 editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html [ Failure ]
 crbug.com/714962 editing/pasteboard/copy-paste-pre-line-content.html [ Failure ]
@@ -546,7 +291,6 @@
 crbug.com/591099 editing/selection/4776665.html [ Failure ]
 crbug.com/591099 editing/selection/4960137.html [ Failure ]
 crbug.com/591099 editing/selection/4975120.html [ Failure ]
-crbug.com/591099 editing/selection/5131716-2.html [ Failure ]
 crbug.com/591099 editing/selection/5232159.html [ Failure ]
 crbug.com/591099 editing/selection/5354455-2.html [ Failure ]
 crbug.com/714962 editing/selection/anchor-focus2.html [ Failure Pass ]
@@ -619,7 +363,6 @@
 crbug.com/591099 editing/selection/user-select/user-select-all.html [ Failure Pass ]
 crbug.com/591099 editing/selection/word-granularity.html [ Failure ]
 crbug.com/714962 editing/shadow/compare-positions-in-nested-shadow.html [ Failure Pass ]
-crbug.com/591099 editing/style/5228141.html [ Failure ]
 crbug.com/591099 editing/style/block-styles-007.html [ Failure ]
 crbug.com/591099 editing/text-iterator/findString.html [ Timeout ]
 crbug.com/591099 editing/unsupported-content/list-delete-001.html [ Failure ]
@@ -628,7 +371,6 @@
 crbug.com/591099 editing/unsupported-content/table-type-before.html [ Failure ]
 crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html [ Pass ]
 crbug.com/591099 external/wpt/FileAPI/url/url-with-fetch.any.html [ Failure Pass ]
-crbug.com/591099 external/wpt/FileAPI/url/url-with-xhr.any.html [ Failure Pass ]
 crbug.com/591099 external/wpt/WebCryptoAPI/derive_bits_keys/hkdf.https.worker.html [ Timeout ]
 crbug.com/591099 external/wpt/WebCryptoAPI/derive_bits_keys/test_hkdf.https.html [ Timeout ]
 crbug.com/591099 external/wpt/WebCryptoAPI/generateKey/failures.worker.html [ Timeout ]
@@ -650,7 +392,7 @@
 crbug.com/591099 external/wpt/WebCryptoAPI/import_export/rsa_importKey.https.worker.html [ Timeout ]
 crbug.com/591099 external/wpt/WebCryptoAPI/import_export/rsa_importKey.worker.html [ Timeout ]
 crbug.com/709227 external/wpt/WebCryptoAPI/import_export/symmetric_importKey.worker.html [ Failure ]
-crbug.com/714962 external/wpt/WebCryptoAPI/import_export/test_rsa_importKey.https.html [ Pass Timeout ]
+crbug.com/714962 external/wpt/WebCryptoAPI/import_export/test_rsa_importKey.https.html [ Timeout ]
 crbug.com/591099 external/wpt/acid/acid3/numbered-tests.html [ Crash ]
 crbug.com/591099 external/wpt/acid/acid3/test.html [ Crash ]
 crbug.com/591099 external/wpt/compat/webkit-text-fill-color-property-005.html [ Pass ]
@@ -1093,15 +835,15 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-023.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-025.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-027.xht [ Failure Pass ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-029.xht [ Failure ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-029.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-031.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-033.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-035.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-037.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-039.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-041.xht [ Failure ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-041.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-043.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-045.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-045.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-047.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-049.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-051.xht [ Failure Pass ]
@@ -1114,7 +856,7 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-065.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-067.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-069.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-071.xht [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-071.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-073.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-075.xht [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-077.xht [ Failure ]
@@ -1132,7 +874,7 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-105.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-107.xht [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-109.xht [ Failure Pass ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-111.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-111.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-113.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-115.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-117.xht [ Failure ]
@@ -1161,7 +903,7 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-163.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-165.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-167.xht [ Failure Pass ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-169.xht [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-169.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-171.xht [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-173.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-175.xht [ Failure ]
@@ -1182,12 +924,12 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-205.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-207.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-209.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-211.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-211.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-213.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-215.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-217.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-219.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-221.xht [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-221.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-223.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-225.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-227.xht [ Failure ]
@@ -1222,7 +964,7 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-056.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-058.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-060.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-062.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-062.xht [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-064.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-066.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-068.xht [ Failure ]
@@ -1261,9 +1003,9 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-138.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-140.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-142.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-144.xht [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-144.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-146.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-148.xht [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-148.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-150.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-152.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-154.xht [ Failure ]
@@ -1279,11 +1021,11 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-174.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-176.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-178.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-180.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-180.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-182.xht [ Failure Pass ]
-crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-184.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-184.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-186.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-188.xht [ Failure ]
+crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-188.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-190.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-192.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-194.xht [ Failure ]
@@ -1414,7 +1156,7 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/table-column-order-003.xht [ Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/table-column-order-004.xht [ Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/table-column-order-005.xht [ Pass ]
-crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-003.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-003.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-005.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-007.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-009.xht [ Failure ]
@@ -1422,14 +1164,14 @@
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-013.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-015.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-017.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-019.xht [ Failure ]
+crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-019.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-002.xht [ Failure ]
-crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-004.xht [ Failure Pass ]
+crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-004.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-006.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-008.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-010.xht [ Failure Pass ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-012.xht [ Failure Pass ]
-crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-014.xht [ Failure Pass ]
+crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-014.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-016.xht [ Failure ]
 crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-018.xht [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/text-baseline-vlr-007.xht [ Failure ]
@@ -1534,7 +1276,7 @@
 crbug.com/591099 external/wpt/dom/ranges/Range-set.html [ Timeout ]
 crbug.com/591099 external/wpt/dom/ranges/Range-surroundContents.html [ Timeout ]
 crbug.com/591099 external/wpt/domxpath/xml_xpath_runner.html [ Timeout ]
-crbug.com/591099 external/wpt/editing/run/backcolor.html [ Timeout ]
+crbug.com/591099 external/wpt/editing/run/backcolor.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/editing/run/bold.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/fontname.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/fontsize.html [ Timeout ]
@@ -1864,17 +1606,12 @@
 crbug.com/591099 external/wpt/workers/Worker_terminate_event_queue.htm [ Timeout ]
 crbug.com/591099 external/wpt/xhr/send-authentication-prompt-2-manual.htm [ Failure ]
 crbug.com/591099 fast/animation/scroll-animations/scrolltimeline-currenttime.html [ Failure ]
-crbug.com/591099 fast/backgrounds/animated-gif-as-background-rounded.html [ Failure ]
-crbug.com/591099 fast/backgrounds/animated-gif-as-background.html [ Failure ]
 crbug.com/591099 fast/backgrounds/animated-svg-as-mask.html [ Failure Pass ]
 crbug.com/591099 fast/backgrounds/background-clip-text-multiline.html [ Failure Pass ]
 crbug.com/591099 fast/backgrounds/background-clip-text.html [ Failure ]
 crbug.com/591099 fast/backgrounds/background-inherit-color-bug.html [ Failure ]
 crbug.com/591099 fast/backgrounds/background-leakage-transforms.html [ Failure ]
 crbug.com/591099 fast/backgrounds/background-origin-root-element.html [ Failure ]
-crbug.com/591099 fast/backgrounds/background-repeat-with-background-color.html [ Failure ]
-crbug.com/591099 fast/backgrounds/background-svg-scaling-zoom.html [ Failure ]
-crbug.com/591099 fast/backgrounds/background-svg-scaling.html [ Failure ]
 crbug.com/591099 fast/backgrounds/body-generated-image-propagated-to-root.html [ Failure ]
 crbug.com/591099 fast/backgrounds/border-radius-split-background-image.html [ Failure ]
 crbug.com/591099 fast/backgrounds/border-radius-split-background.html [ Failure ]
@@ -1987,14 +1724,10 @@
 crbug.com/714962 fast/borders/table-borders.html [ Failure ]
 crbug.com/591099 fast/box-decoration-break/box-decoration-break-rendering.html [ Failure ]
 crbug.com/591099 fast/box-shadow/basic-shadows.html [ Failure ]
-crbug.com/591099 fast/box-shadow/box-shadow-radius.html [ Failure ]
 crbug.com/591099 fast/box-shadow/box-shadow.html [ Failure ]
-crbug.com/591099 fast/box-shadow/inset-box-shadow-radius.html [ Failure ]
-crbug.com/591099 fast/box-shadow/inset-box-shadows.html [ Failure ]
 crbug.com/591099 fast/box-shadow/inset-subpixel.html [ Failure ]
 crbug.com/591099 fast/box-shadow/inset.html [ Failure ]
-crbug.com/591099 fast/box-shadow/scaled-box-shadow.html [ Failure ]
-crbug.com/591099 fast/box-sizing/replaced.html [ Failure ]
+crbug.com/591099 fast/box-sizing/replaced.html [ Failure Pass ]
 crbug.com/714962 fast/canvas/canvas-textMetrics-width.html [ Failure ]
 crbug.com/714962 fast/canvas/image-object-in-canvas.html [ Failure ]
 crbug.com/591099 fast/canvas/patternfill-repeat.html [ Failure ]
@@ -2004,12 +1737,10 @@
 crbug.com/591099 fast/clip/overflow-border-radius-composited.html [ Failure ]
 crbug.com/591099 fast/clip/overflow-border-radius-fixed-position.html [ Failure ]
 crbug.com/591099 fast/clip/overflow-border-radius-transformed.html [ Failure ]
-crbug.com/591099 fast/compact/003.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/001.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/002.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/007.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/009.html [ Failure ]
-crbug.com/591099 fast/css-generated-content/010.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/012.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/013.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/015.html [ Failure ]
@@ -2023,8 +1754,6 @@
 crbug.com/591099 fast/css-generated-content/float-first-letter-siblings-convert-to-inline.html [ Crash ]
 crbug.com/714962 fast/css-generated-content/hover-inline.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/hover-style-change.html [ Failure ]
-crbug.com/591099 fast/css-generated-content/inline-display-types.html [ Failure ]
-crbug.com/591099 fast/css-generated-content/no-openclose-quote.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/table-before-after-child-add.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/table-cell-before-after-child-add.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/table-cell-before-content.html [ Failure ]
@@ -2035,7 +1764,6 @@
 crbug.com/591099 fast/css-generated-content/table-row-with-before.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/table-table-before-after-child-add.html [ Failure ]
 crbug.com/591099 fast/css-generated-content/table-with-before.html [ Failure ]
-crbug.com/591099 fast/css-generated-content/wbr-with-before-content.html [ Failure ]
 crbug.com/591099 fast/css-grid-layout/auto-content-resolution-columns.html [ Failure ]
 crbug.com/591099 fast/css-grid-layout/breadth-size-resolution-grid.html [ Failure ]
 crbug.com/591099 fast/css-grid-layout/calc-resolution-grid-item.html [ Failure ]
@@ -2172,18 +1900,14 @@
 crbug.com/591099 fast/css/case-transform.html [ Failure ]
 crbug.com/591099 fast/css/clip-zooming.html [ Failure ]
 crbug.com/591099 fast/css/color-correction-on-backgrounds.html [ Failure ]
-crbug.com/591099 fast/css/color-correction-on-text-shadow.html [ Failure ]
 crbug.com/591099 fast/css/color-correction.html [ Failure ]
-crbug.com/591099 fast/css/compare-content-style.html [ Failure ]
 crbug.com/591099 fast/css/containment/contain-paint-composited-scroll.html [ Failure Pass ]
 crbug.com/591099 fast/css/containment/size-and-layout-containment.html [ Failure ]
 crbug.com/591099 fast/css/content-counter-010.htm [ Failure ]
-crbug.com/591099 fast/css/continuationCrash.html [ Failure ]
 crbug.com/591099 fast/css/css-imports.html [ Failure ]
 crbug.com/591099 fast/css/css-properties-position-relative-as-parent-fixed.html [ Failure ]
 crbug.com/591099 fast/css/css3-modsel-22.html [ Failure ]
 crbug.com/591099 fast/css/css3-space-in-nth-and-lang.html [ Failure ]
-crbug.com/591099 fast/css/empty-inline-line-height-first-line.htm [ Failure ]
 crbug.com/591099 fast/css/ex-after-font-variant.html [ Failure ]
 crbug.com/591099 fast/css/find-next-layer.html [ Failure ]
 crbug.com/591099 fast/css/first-child-pseudo-class.html [ Failure ]
@@ -2217,17 +1941,14 @@
 crbug.com/591099 fast/css/font-face-synthetic-bold-italic.html [ Failure ]
 crbug.com/591099 fast/css/font-face-weight-matching.html [ Failure ]
 crbug.com/591099 fast/css/font-shorthand-weight-only.html [ Failure ]
-crbug.com/591099 fast/css/font-smoothing.html [ Failure ]
 crbug.com/591099 fast/css/font_property_normal.html [ Failure ]
 crbug.com/591099 fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html [ Crash ]
 crbug.com/591099 fast/css/getComputedStyle/getComputedStyle-margin-auto.html [ Failure ]
 crbug.com/591099 fast/css/getComputedStyle/getComputedStyle-margin-percentage.html [ Failure ]
 crbug.com/591099 fast/css/getComputedStyle/getComputedStyle-resolved-values.html [ Timeout ]
 crbug.com/714962 fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size.html [ Failure ]
-crbug.com/591099 fast/css/h1-in-section-elements.html [ Failure ]
 crbug.com/714962 fast/css/hover-pseudo-element-quirks.html [ Failure ]
 crbug.com/591099 fast/css/hover-subselector.html [ Failure ]
-crbug.com/591099 fast/css/hsl-color.html [ Failure ]
 crbug.com/591099 fast/css/ignore-empty-focus-ring-rects.html [ Failure ]
 crbug.com/591099 fast/css/image-orientation/image-orientation-default.html [ Failure ]
 crbug.com/591099 fast/css/image-orientation/image-orientation-from-image-composited-dynamic.html [ Failure ]
@@ -2244,17 +1965,12 @@
 crbug.com/591099 fast/css/large-numbers.html [ Timeout ]
 crbug.com/591099 fast/css/last-child-pseudo-class.html [ Failure ]
 crbug.com/591099 fast/css/last-of-type-pseudo-class.html [ Failure ]
-crbug.com/591099 fast/css/layerZOrderCrash.html [ Failure ]
 crbug.com/591099 fast/css/line-height-determined-by-primary-font.html [ Failure ]
-crbug.com/591099 fast/css/line-height-overflow.html [ Failure ]
 crbug.com/591099 fast/css/line-height.html [ Failure ]
-crbug.com/591099 fast/css/line-thickness-underline-strikethrough-overline.html [ Failure ]
 crbug.com/591099 fast/css/list-outline.html [ Failure ]
 crbug.com/591099 fast/css/margin-top-bottom-dynamic.html [ Failure ]
 crbug.com/591099 fast/css/negative-text-indent-in-inline-block.html [ Failure ]
-crbug.com/591099 fast/css/nested-floating-relative-position-percentages.html [ Failure ]
 crbug.com/591099 fast/css/non-empty-span.html [ Failure ]
-crbug.com/591099 fast/css/non-standard-checkbox-size.html [ Failure ]
 crbug.com/591099 fast/css/nth-child-dynamic.html [ Failure ]
 crbug.com/591099 fast/css/only-child-pseudo-class.html [ Failure ]
 crbug.com/591099 fast/css/only-of-type-pseudo-class.html [ Failure ]
@@ -2274,15 +1990,11 @@
 crbug.com/591099 fast/css/resize-corner-tracking-transformed-iframe.html [ Failure ]
 crbug.com/591099 fast/css/resize-corner-tracking-transformed.html [ Failure ]
 crbug.com/591099 fast/css/resize-corner-tracking.html [ Failure ]
-crbug.com/591099 fast/css/rtl-ordering.html [ Failure ]
-crbug.com/591099 fast/css/rtl-to-viewport.html [ Failure ]
 crbug.com/591099 fast/css/selector-set-attribute.html [ Failure ]
 crbug.com/591099 fast/css/sticky/replaced-sticky.html [ Pass ]
 crbug.com/591099 fast/css/sticky/sticky-style-change.html [ Pass ]
 crbug.com/591099 fast/css/sticky/sticky-top-overflow-scroll-by-fragment.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis-bidi.html [ Failure ]
-crbug.com/591099 fast/css/text-overflow-ellipsis-multiple-shadows.html [ Failure ]
-crbug.com/591099 fast/css/text-overflow-ellipsis-shadow-alpha.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis-strict.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis-text-align-center.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis-text-align-justify.html [ Failure ]
@@ -2291,17 +2003,11 @@
 crbug.com/714962 fast/css/text-overflow-ellipsis-vertical-hittest.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis-vertical-select.html [ Failure ]
 crbug.com/591099 fast/css/text-overflow-ellipsis.html [ Failure ]
-crbug.com/591099 fast/css/text-overflow-input.html [ Failure ]
 crbug.com/591099 fast/css/text-rendering.html [ Failure ]
 crbug.com/591099 fast/css/textCapitalizeEdgeCases.html [ Failure ]
 crbug.com/591099 fast/css/universal-hover-quirk.html [ Failure ]
 crbug.com/714962 fast/css/user-drag-none.html [ Pass ]
 crbug.com/591099 fast/css/vertical-align-lengths.html [ Failure ]
-crbug.com/591099 fast/css/vertical-text-overflow-ellipsis-text-align-center.html [ Failure ]
-crbug.com/591099 fast/css/vertical-text-overflow-ellipsis-text-align-justify.html [ Failure ]
-crbug.com/591099 fast/css/vertical-text-overflow-ellipsis-text-align-left.html [ Failure ]
-crbug.com/591099 fast/css/vertical-text-overflow-ellipsis-text-align-right.html [ Failure ]
-crbug.com/591099 fast/css/visibility-hit-test.html [ Failure ]
 crbug.com/591099 fast/css/word-space-extra.html [ Failure ]
 crbug.com/714962 fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html [ Failure ]
 crbug.com/591099 fast/css3-text/css3-text-decoration/text-decoration-skip-ink.html [ Failure ]
@@ -2334,19 +2040,14 @@
 crbug.com/591099 fast/doctypes/003.html [ Failure ]
 crbug.com/591099 fast/doctypes/004.html [ Failure ]
 crbug.com/591099 fast/dom/34176.html [ Failure ]
-crbug.com/591099 fast/dom/52776.html [ Failure ]
 crbug.com/714962 fast/dom/Element/client-rect-list-argument.html [ Failure ]
 crbug.com/591099 fast/dom/Element/getBoundingClientRect.html [ Failure ]
 crbug.com/714962 fast/dom/Element/getClientRects.html [ Failure ]
-crbug.com/591099 fast/dom/HTMLElement/bdo.html [ Failure ]
-crbug.com/591099 fast/dom/HTMLImageElement/image-alt-text.html [ Failure ]
 crbug.com/591099 fast/dom/HTMLMeterElement/meter-boundary-values.html [ Failure ]
 crbug.com/591099 fast/dom/HTMLMeterElement/meter-optimums.html [ Failure ]
 crbug.com/591099 fast/dom/HTMLMeterElement/meter-styles.html [ Failure ]
 crbug.com/591099 fast/dom/HTMLObjectElement/vspace-hspace-as-number.html [ Failure ]
-crbug.com/591099 fast/dom/HTMLProgressElement/indeterminate-progress-001.html [ Failure ]
 crbug.com/591099 fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html [ Failure ]
-crbug.com/591099 fast/dom/HTMLProgressElement/progress-element.html [ Failure ]
 crbug.com/714962 fast/dom/Range/collapsed-range-bounding-client-rect.html [ Failure ]
 crbug.com/714962 fast/dom/Range/get-bounding-client-rect-empty-and-non-empty.html [ Timeout ]
 crbug.com/714962 fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html [ Failure ]
@@ -2360,14 +2061,12 @@
 crbug.com/591099 fast/dom/Window/window-postmessage-clone-deep-array.html [ Failure ]
 crbug.com/591099 fast/dom/Window/window-resize-contents.html [ Failure ]
 crbug.com/714962 fast/dom/anchor-without-content.html [ Failure ]
-crbug.com/591099 fast/dom/children-nodes.html [ Failure ]
 crbug.com/591099 fast/dom/clone-node-dynamic-style.html [ Failure ]
 crbug.com/591099 fast/dom/domstring-attribute-reflection.html [ Timeout ]
 crbug.com/591099 fast/dom/element-attribute-js-null.html [ Timeout ]
 crbug.com/714962 fast/dom/elementFromPoint-relative-to-viewport.html [ Failure ]
 crbug.com/714962 fast/dom/elementsFromPoint/elementsFromPoint-inline.html [ Failure ]
 crbug.com/714962 fast/dom/empty-anchor-in-overflow-scroller.html [ Failure ]
-crbug.com/591099 fast/dom/focus-contenteditable.html [ Failure ]
 crbug.com/714962 fast/dom/inert/inert-inlines.html [ Failure ]
 crbug.com/714962 fast/dom/inert/inert-node-is-uneditable.html [ Failure Pass ]
 crbug.com/591099 fast/dom/inner-text-first-letter.html [ Failure ]
@@ -2385,18 +2084,12 @@
 crbug.com/591099 fast/dom/shadow/selections-in-shadow.html [ Timeout ]
 crbug.com/591099 fast/dom/shadow/shadow-dom-event-dispatching-details-summary.html [ Pass ]
 crbug.com/591099 fast/dom/wrapper-classes.html [ Timeout ]
-crbug.com/591099 fast/dynamic/002.html [ Failure ]
 crbug.com/591099 fast/dynamic/011.html [ Failure ]
 crbug.com/591099 fast/dynamic/012.html [ Failure ]
-crbug.com/591099 fast/dynamic/013.html [ Failure ]
 crbug.com/591099 fast/dynamic/continuation-detach-crash.html [ Crash ]
 crbug.com/591099 fast/dynamic/first-letter-after-list-marker.html [ Failure ]
-crbug.com/591099 fast/dynamic/float-from-empty-line.html [ Failure ]
 crbug.com/591099 fast/dynamic/float-withdrawal.html [ Failure ]
-crbug.com/591099 fast/dynamic/floating-to-positioned-2.html [ Failure ]
-crbug.com/591099 fast/dynamic/floating-to-positioned.html [ Failure ]
 crbug.com/714962 fast/dynamic/focus-clear-resolver-crash.html [ Failure ]
-crbug.com/591099 fast/dynamic/genContentDestroyChildren.html [ Failure ]
 crbug.com/591099 fast/dynamic/insert-before-table-part-in-continuation.html [ Failure ]
 crbug.com/591099 fast/dynamic/layer-hit-test-crash.html [ Failure ]
 crbug.com/591099 fast/dynamic/noninlinebadness.html [ Failure ]
@@ -2406,9 +2099,7 @@
 crbug.com/591099 fast/dynamic/static-to-relative-with-absolute-child.html [ Crash ]
 crbug.com/591099 fast/dynamic/staticY-marking-parents-regression.html [ Failure ]
 crbug.com/591099 fast/dynamic/text-combine.html [ Failure ]
-crbug.com/591099 fast/dynamic/unicode-bidi.html [ Failure ]
 crbug.com/591099 fast/dynamic/view-overflow.html [ Failure ]
-crbug.com/591099 fast/dynamic/window-resize-scrollbars-test.html [ Failure ]
 crbug.com/591099 fast/encoding/utf-16-big-endian.html [ Failure ]
 crbug.com/591099 fast/encoding/utf-16-little-endian.html [ Failure ]
 crbug.com/591099 fast/encoding/xmacroman-encoding-test.html [ Failure ]
@@ -2448,13 +2139,6 @@
 crbug.com/591099 fast/events/wheel/mouse-wheel-scroll-latching.html [ Pass ]
 crbug.com/591099 fast/events/wheel/wheel-scroll-latching-on-scrollbar.html [ Pass ]
 crbug.com/714962 fast/events/wheel/wheelevent-basic.html [ Failure ]
-crbug.com/591099 fast/forms/001.html [ Failure ]
-crbug.com/591099 fast/forms/007.html [ Failure ]
-crbug.com/591099 fast/forms/basic-buttons.html [ Failure ]
-crbug.com/591099 fast/forms/basic-inputs.html [ Failure ]
-crbug.com/591099 fast/forms/button-sizes.html [ Failure ]
-crbug.com/591099 fast/forms/button-table-styles.html [ Failure ]
-crbug.com/591099 fast/forms/button/button-align.html [ Failure ]
 crbug.com/591099 fast/forms/calendar-picker/calendar-picker-key-operations.html [ Timeout ]
 crbug.com/714962 fast/forms/calendar-picker/calendar-picker-mouse-operations.html [ Failure ]
 crbug.com/591099 fast/forms/calendar-picker/month-picker-key-operations.html [ Timeout ]
@@ -2463,73 +2147,20 @@
 crbug.com/714962 fast/forms/calendar-picker/week-picker-mouse-operations.html [ Failure ]
 crbug.com/591099 fast/forms/caret-rtl.html [ Failure ]
 crbug.com/591099 fast/forms/control-clip-overflow.html [ Failure ]
-crbug.com/591099 fast/forms/control-clip.html [ Failure ]
-crbug.com/591099 fast/forms/control-restrict-line-height.html [ Failure ]
 crbug.com/591099 fast/forms/fieldset/fieldset-with-float.html [ Failure ]
-crbug.com/591099 fast/forms/file/file-input-direction.html [ Failure ]
-crbug.com/591099 fast/forms/file/file-input-disabled.html [ Failure ]
 crbug.com/591099 fast/forms/form-hides-table.html [ Failure ]
-crbug.com/591099 fast/forms/form-in-malformed-markup.html [ Failure ]
-crbug.com/591099 fast/forms/formmove.html [ Failure ]
 crbug.com/591099 fast/forms/huge-mac-input-clamped-width.html [ Failure ]
-crbug.com/591099 fast/forms/image-border.html [ Failure ]
-crbug.com/591099 fast/forms/image/002.html [ Failure ]
-crbug.com/591099 fast/forms/image/005.html [ Failure ]
-crbug.com/591099 fast/forms/image/input-align-image.html [ Failure ]
-crbug.com/591099 fast/forms/input-align.html [ Failure ]
-crbug.com/591099 fast/forms/input-appearance-height.html [ Failure ]
-crbug.com/591099 fast/forms/input-button-sizes.html [ Failure ]
-crbug.com/591099 fast/forms/input-first-letter.html [ Failure ]
-crbug.com/591099 fast/forms/input-type-text-min-width.html [ Failure ]
-crbug.com/591099 fast/forms/input-value.html [ Failure ]
 crbug.com/714962 fast/forms/label/continous-click-on-label.html [ Failure ]
 crbug.com/591099 fast/forms/label/label-click.html [ Pass ]
 crbug.com/591099 fast/forms/label/label-selection-by-textSelection-and-click.html [ Failure Pass ]
 crbug.com/591099 fast/forms/long-text-in-input.html [ Crash Failure ]
-crbug.com/591099 fast/forms/negativeLineHeight.html [ Failure ]
-crbug.com/591099 fast/forms/number/number-appearance-datalist.html [ Failure ]
-crbug.com/591099 fast/forms/number/number-appearance-spinbutton-disabled-readonly.html [ Failure ]
 crbug.com/591099 fast/forms/number/number-spinbutton-in-multi-column.html [ Failure ]
-crbug.com/591099 fast/forms/radio/radio-appearance-basic.html [ Failure ]
-crbug.com/591099 fast/forms/range/range-appearance-basic.html [ Failure ]
+crbug.com/591099 fast/forms/range/range-stepup-stepdown-from-renderer.html [ Timeout ]
 crbug.com/591099 fast/forms/range/slider-in-multi-column.html [ Failure ]
-crbug.com/591099 fast/forms/range/slider-padding.html [ Failure ]
-crbug.com/591099 fast/forms/search/search-appearance-basic.html [ Failure ]
-crbug.com/591099 fast/forms/search/search-display-none-cancel-button.html [ Failure ]
-crbug.com/591099 fast/forms/search/searchfield-heights.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label01.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label02.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label03.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label04.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label05.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label06.html [ Failure ]
-crbug.com/591099 fast/forms/select/HTMLOptionElement_label07.html [ Failure ]
-crbug.com/591099 fast/forms/select/basic-selects.html [ Failure ]
-crbug.com/591099 fast/forms/select/disabled-select-change-index.html [ Failure ]
-crbug.com/591099 fast/forms/select/hidden-listbox.html [ Failure ]
-crbug.com/591099 fast/forms/select/listbox-appearance-basic.html [ Failure ]
 crbug.com/591099 fast/forms/select/listbox-in-multi-column.html [ Failure ]
-crbug.com/591099 fast/forms/select/listbox-width-change.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-appearance-basic.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-appearance-rtl.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-deselect-update.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-narrow-width.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-restrict-line-height.html [ Failure ]
-crbug.com/591099 fast/forms/select/menulist-width-change.html [ Failure ]
-crbug.com/591099 fast/forms/select/optgroup-rendering.html [ Failure ]
-crbug.com/591099 fast/forms/select/option-index.html [ Failure ]
-crbug.com/591099 fast/forms/select/option-text-clip.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-align.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-baseline.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-block-background.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-change-listbox-to-popup.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-change-popup-to-listbox.html [ Failure ]
 crbug.com/591099 fast/forms/select/select-initial-position.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-size-invalid.html [ Failure ]
 crbug.com/591099 fast/forms/select/select-style.html [ Failure ]
-crbug.com/591099 fast/forms/select/select-visual-hebrew.html [ Failure ]
 crbug.com/591099 fast/forms/selection-direction.html [ Timeout ]
-crbug.com/591099 fast/forms/submit/submit-appearance-basic.html [ Failure ]
 crbug.com/714962 fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
 crbug.com/591099 fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom125.html [ Failure ]
 crbug.com/591099 fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom200.html [ Failure ]
@@ -2546,53 +2177,25 @@
 crbug.com/714962 fast/forms/suggestion-picker/time-suggestion-picker-appearance.html [ Failure ]
 crbug.com/714962 fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
 crbug.com/714962 fast/forms/suggestion-picker/week-suggestion-picker-appearance.html [ Failure ]
-crbug.com/591099 fast/forms/tabbing-input-iframe.html [ Failure ]
 crbug.com/591099 fast/forms/text-control-intrinsic-widths.html [ Timeout ]
-crbug.com/591099 fast/forms/text/input-appearance-bkcolor.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-appearance-default-bkcolor.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-appearance-disabled.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-appearance-readonly.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-appearance-selection.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-appearance-width.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-baseline.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-disabled-color.html [ Failure ]
 crbug.com/591099 fast/forms/text/input-readonly-autoscroll.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-readonly-dimmed.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-spaces.html [ Failure ]
-crbug.com/591099 fast/forms/text/input-table.html [ Failure ]
 crbug.com/591099 fast/forms/text/input-text-click-outside.html [ Failure Pass ]
-crbug.com/591099 fast/forms/text/text-appearance-basic.html [ Failure ]
-crbug.com/591099 fast/forms/text/text-appearance-datalist.html [ Failure ]
-crbug.com/591099 fast/forms/text/textfield-outline.html [ Failure ]
-crbug.com/591099 fast/forms/textarea/reset-textarea.html [ Failure ]
-crbug.com/591099 fast/forms/textarea/textAreaLineHeight.html [ Failure ]
 crbug.com/591099 fast/forms/textarea/textarea-align.html [ Failure ]
-crbug.com/591099 fast/forms/textarea/textarea-appearance-basic.html [ Failure ]
 crbug.com/591099 fast/forms/textarea/textarea-metrics.html [ Timeout ]
 crbug.com/714962 fast/forms/textarea/textarea-resize-above-min-size-and-below-initial-size.html [ Pass ]
 crbug.com/714962 fast/forms/textarea/textarea-resize-below-min-intrinsic-size.html [ Pass ]
 crbug.com/714962 fast/forms/textarea/textarea-resize-below-min-size-zoomed.html [ Failure Pass ]
-crbug.com/714962 fast/forms/textarea/textarea-resize-below-min-size.html [ Failure Pass ]
 crbug.com/591099 fast/forms/textarea/textarea-resize-orthogonal-containing-block.html [ Failure Pass ]
-crbug.com/591099 fast/forms/textarea/textarea-scrollbar.html [ Failure ]
-crbug.com/591099 fast/forms/textarea/textarea-scrolled-type.html [ Failure ]
 crbug.com/591099 fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html [ Timeout ]
-crbug.com/591099 fast/forms/visual-hebrew-text-field.html [ Failure ]
-crbug.com/591099 fast/frames/001.html [ Failure ]
 crbug.com/591099 fast/frames/content-opacity-1.html [ Failure Pass ]
 crbug.com/591099 fast/frames/content-opacity-2.html [ Failure Pass ]
 crbug.com/591099 fast/frames/frameset-style-recalc.html [ Failure ]
 crbug.com/591099 fast/frames/iframe-scaling-with-scroll.html [ Failure Pass ]
-crbug.com/591099 fast/frames/iframe-scrolling-attribute.html [ Failure ]
 crbug.com/591099 fast/frames/iframe-with-frameborder.html [ Failure ]
 crbug.com/591099 fast/frames/onlyCommentInIFrame.html [ Failure ]
-crbug.com/591099 fast/gradients/conic-gradient-out-of-range.html [ Failure ]
-crbug.com/591099 fast/gradients/conic-gradient.html [ Failure ]
-crbug.com/591099 fast/gradients/css3-radial-gradients4.html [ Failure ]
 crbug.com/591099 fast/gradients/generated-gradients.html [ Failure ]
 crbug.com/591099 fast/gradients/list-item-gradient.html [ Failure ]
 crbug.com/591099 fast/gradients/radial-centered.html [ Failure ]
-crbug.com/591099 fast/gradients/repeating-conic-gradient.html [ Failure ]
 crbug.com/591099 fast/gradients/simple-gradients.html [ Failure ]
 crbug.com/591099 fast/gradients/unprefixed-list-item-gradient.html [ Failure ]
 crbug.com/591099 fast/hidpi/broken-image-icon-hidpi.html [ Failure ]
@@ -2628,27 +2231,18 @@
 crbug.com/591099 fast/inline/outline-continuations.html [ Failure ]
 crbug.com/714962 fast/inline/outline-offset.html [ Failure ]
 crbug.com/591099 fast/inline/styledEmptyInlinesWithBRs.html [ Failure ]
-crbug.com/591099 fast/invalid/003.html [ Failure ]
 crbug.com/591099 fast/invalid/010.html [ Failure ]
-crbug.com/591099 fast/invalid/012.html [ Failure ]
-crbug.com/591099 fast/invalid/016.html [ Failure ]
-crbug.com/591099 fast/invalid/019.html [ Failure ]
 crbug.com/591099 fast/invalid/021.html [ Failure ]
 crbug.com/591099 fast/invalid/missing-address-end-tag.html [ Failure ]
 crbug.com/591099 fast/invalid/missing-dl-end-tag.html [ Failure ]
 crbug.com/591099 fast/invalid/missing-dt-end-tag.html [ Failure ]
 crbug.com/591099 fast/invalid/missing-font-end-tag.html [ Failure ]
-crbug.com/591099 fast/invalid/table-residual-style-crash.html [ Failure ]
-crbug.com/591099 fast/invalid/td-inside-object.html [ Failure ]
 crbug.com/591099 fast/js/dfg-arguments-alias-activation.html [ Timeout ]
 crbug.com/591099 fast/js/dfg-byte-array-put.html [ Timeout ]
 crbug.com/591099 fast/js/document-all-triggers-masquerades-watchpoint.html [ Timeout ]
-crbug.com/591099 fast/layers/layer-visibility-sublayer.html [ Failure ]
 crbug.com/591099 fast/layers/layer-visibility.html [ Failure ]
 crbug.com/591099 fast/layers/opacity-outline.html [ Failure ]
-crbug.com/591099 fast/layers/overflow-hidden-rounded-corners-occlusion.html [ Failure ]
 crbug.com/591099 fast/layers/overflow-scroll-auto-switch.html [ Failure ]
-crbug.com/591099 fast/layers/perspective-inline-no-display.html [ Failure ]
 crbug.com/591099 fast/layers/remove-only-this-layer-update.html [ Failure ]
 crbug.com/591099 fast/layers/scroll-rect-to-visible.html [ Failure ]
 crbug.com/591099 fast/lists/001-vertical.html [ Failure ]
@@ -2674,7 +2268,6 @@
 crbug.com/591099 fast/lists/marker-before-empty-inline.html [ Failure ]
 crbug.com/591099 fast/lists/markers-in-selection.html [ Failure ]
 crbug.com/591099 fast/masking/clip-path-selection.html [ Failure Pass ]
-crbug.com/591099 fast/media/mq-color-gamut-picture.html [ Failure ]
 crbug.com/591099 fast/media/mq-display-mode-fullscreen.html [ Crash ]
 crbug.com/591099 fast/multicol/abspos-after-break-after.html [ Failure ]
 crbug.com/591099 fast/multicol/abspos-new-width-rebalance.html [ Failure ]
@@ -3136,7 +2729,6 @@
 crbug.com/591099 fast/parser/xhtml-alternate-entities.xml [ Failure ]
 crbug.com/591099 fast/reflections/inline-crash.html [ Failure ]
 crbug.com/591099 fast/reflections/opacity-reflection-transform.html [ Failure ]
-crbug.com/591099 fast/reflections/reflection-direction.html [ Failure ]
 crbug.com/591099 fast/reflections/reflection-overflow-hidden.html [ Failure ]
 crbug.com/591099 fast/replaced/absolute-position-percentage-height.html [ Failure ]
 crbug.com/591099 fast/replaced/border-radius-clip.html [ Failure ]
@@ -3156,7 +2748,6 @@
 crbug.com/591099 fast/ruby/add-text-to-block-ruby-with-after-pseudo-crash.html [ Crash ]
 crbug.com/591099 fast/ruby/base-shorter-than-text.html [ Failure ]
 crbug.com/591099 fast/ruby/float-overhang-from-ruby-text.html [ Failure ]
-crbug.com/591099 fast/ruby/floating-ruby-text.html [ Failure ]
 crbug.com/591099 fast/ruby/list-item-marker-in-block-ruby.html [ Crash ]
 crbug.com/591099 fast/ruby/nested-ruby.html [ Failure ]
 crbug.com/591099 fast/ruby/overhang-horizontal-no-overlap1.html [ Failure ]
@@ -3168,11 +2759,9 @@
 crbug.com/591099 fast/ruby/percentage-height-child-crash.html [ Crash ]
 crbug.com/591099 fast/ruby/percentage-height-child.html [ Crash ]
 crbug.com/591099 fast/ruby/position-after.html [ Failure ]
-crbug.com/591099 fast/ruby/positioned-ruby-text.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-block-style-not-updated-with-before-after-content.html [ Crash ]
 crbug.com/591099 fast/ruby/ruby-block-style-not-updated.html [ Crash ]
 crbug.com/591099 fast/ruby/ruby-empty-rt.html [ Failure ]
-crbug.com/591099 fast/ruby/ruby-inline-table.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-length.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-run-break.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-runs-spans.html [ Failure ]
@@ -3180,7 +2769,6 @@
 crbug.com/591099 fast/ruby/ruby-simple-rp.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-simple.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-text-before-after-content.html [ Failure ]
-crbug.com/591099 fast/ruby/ruby-text-before-child-split.html [ Failure ]
 crbug.com/591099 fast/ruby/ruby-trailing.html [ Failure ]
 crbug.com/591099 fast/ruby/rubyDOM-insert-rt.html [ Failure ]
 crbug.com/591099 fast/ruby/rubyDOM-insert-text1.html [ Failure ]
@@ -3189,7 +2777,6 @@
 crbug.com/591099 fast/ruby/rubyDOM-remove-rt1.html [ Failure ]
 crbug.com/591099 fast/ruby/rubyDOM-remove-rt2.html [ Failure ]
 crbug.com/591099 fast/ruby/rubyDOM-remove-text1.html [ Failure ]
-crbug.com/591099 fast/ruby/rubyDOM-remove-text2.html [ Failure ]
 crbug.com/591099 fast/ruby/select-ruby.html [ Failure ]
 crbug.com/591099 fast/scrolling/content-box-smaller-than-scrollbar.html [ Failure ]
 crbug.com/591099 fast/scrolling/fractional-scroll-offset-fixed-position-non-composited.html [ Crash ]
@@ -3203,9 +2790,7 @@
 crbug.com/591099 fast/scrolling/scrollbar-tickmarks-hittest.html [ Pass ]
 crbug.com/714962 fast/scrolling/scrollbar-tickmarks-styled-after-onload.html [ Failure ]
 crbug.com/714962 fast/scrolling/scrollbar-tickmarks-styled.html [ Failure ]
-crbug.com/591099 fast/selectors/018b.html [ Failure ]
 crbug.com/591099 fast/selectors/021.html [ Failure ]
-crbug.com/591099 fast/selectors/034.html [ Failure ]
 crbug.com/591099 fast/selectors/038.html [ Failure ]
 crbug.com/591099 fast/selectors/040.html [ Failure ]
 crbug.com/591099 fast/selectors/041.html [ Failure ]
@@ -3214,8 +2799,6 @@
 crbug.com/591099 fast/selectors/166.html [ Failure ]
 crbug.com/591099 fast/selectors/167.html [ Failure ]
 crbug.com/591099 fast/selectors/167a.html [ Failure ]
-crbug.com/591099 fast/selectors/unqualified-hover-quirks.html [ Failure ]
-crbug.com/591099 fast/selectors/unqualified-hover-strict.html [ Failure ]
 crbug.com/591099 fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html [ Failure ]
 crbug.com/591099 fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002.html [ Failure ]
 crbug.com/591099 fast/shapes/shape-outside-floats/shape-outside-boxes-001.html [ Failure ]
@@ -3384,7 +2967,7 @@
 crbug.com/591099 fast/table/percent-height-content-in-fixed-height-border-box-sized-cell-with-collapsed-border-on-table.html [ Failure ]
 crbug.com/591099 fast/table/percent-height-content-in-fixed-height-border-box-sized-cell-with-collapsed-border.html [ Failure ]
 crbug.com/591099 fast/table/percent-height-content-in-fixed-height-content-box-sized-cell.html [ Failure ]
-crbug.com/591099 fast/table/percent-height-overflow-auto-content-in-cell.html [ Failure ]
+crbug.com/591099 fast/table/percent-height-overflow-auto-content-in-cell.html [ Failure Pass ]
 crbug.com/591099 fast/table/percent-height-overflow-scroll-content-in-cell.html [ Failure ]
 crbug.com/591099 fast/table/percent-widths-stretch-vertical.html [ Failure ]
 crbug.com/714962 fast/table/rtl-cell-display-none-assert.html [ Failure ]
@@ -3563,6 +3146,7 @@
 crbug.com/591099 fast/text/whitespace/pre-wrap-spaces-after-newline.html [ Failure ]
 crbug.com/591099 fast/text/zero-width-characters-complex-script.html [ Failure ]
 crbug.com/591099 fast/text/zero-width-characters.html [ Failure ]
+crbug.com/591099 fast/webgl/texImage-imageBitmap-from-image-resize.html [ Timeout ]
 crbug.com/591099 fast/writing-mode/Kusa-Makura-background-canvas.html [ Failure ]
 crbug.com/591099 fast/writing-mode/auto-sizing-orthogonal-flows.html [ Failure ]
 crbug.com/714962 fast/writing-mode/background-vertical-lr.html [ Failure ]
@@ -3601,10 +3185,6 @@
 crbug.com/591099 fast/writing-mode/vertical-baseline-alignment.html [ Failure ]
 crbug.com/714962 fast/writing-mode/vertical-font-fallback.html [ Failure ]
 crbug.com/591099 fast/writing-mode/vertical-lr-replaced-selection.html [ Failure ]
-crbug.com/591099 fast/xsl/xslt-enc-cyr.xml [ Failure ]
-crbug.com/591099 fast/xsl/xslt-enc.xml [ Failure ]
-crbug.com/591099 fast/xsl/xslt-enc16.xml [ Failure ]
-crbug.com/591099 fast/xsl/xslt-enc16to16.xml [ Failure ]
 crbug.com/591099 fast/xsl/xslt-entity.xml [ Failure ]
 crbug.com/591099 fast/xsl/xslt-extra-content-at-end.xml [ Failure ]
 crbug.com/591099 fast/xsl/xslt-relative-path.xml [ Failure ]
@@ -3718,8 +3298,6 @@
 crbug.com/714962 hittesting/culled-inline.html [ Failure ]
 crbug.com/714962 hittesting/image-with-clip-path.html [ Failure ]
 crbug.com/591099 hittesting/inline-with-clip-path.html [ Failure ]
-crbug.com/591099 html/details_summary/details-nested-1.html [ Failure ]
-crbug.com/591099 html/details_summary/details-nested-2.html [ Failure ]
 crbug.com/591099 html/details_summary/details-writing-mode-align-center.html [ Failure ]
 crbug.com/591099 html/details_summary/details-writing-mode-align-left.html [ Failure ]
 crbug.com/591099 html/details_summary/details-writing-mode-align-right.html [ Failure ]
@@ -3735,7 +3313,6 @@
 crbug.com/591099 html/marquee/marquee-scrollamount.html [ Failure ]
 crbug.com/591099 html/tabular_data/table_createcaption.html [ Failure ]
 crbug.com/591099 html/tabular_data/td_colspan_rendering.html [ Failure ]
-crbug.com/591099 html/text_level_semantics/font-weight-bold-for-b-and-strong.html [ Failure ]
 crbug.com/591099 http/tests/css/css-image-valued-shape.html [ Failure ]
 crbug.com/714962 http/tests/css/css-resources-referrer-srcdoc.html [ Failure Pass ]
 crbug.com/591099 http/tests/css/css-resources-referrer.html [ Failure Pass ]
@@ -3751,6 +3328,7 @@
 crbug.com/591099 http/tests/devtools/editor/text-editor-ctrl-d-2.js [ Timeout ]
 crbug.com/714962 http/tests/devtools/editor/text-editor-enter-behaviour.js [ Timeout ]
 crbug.com/714962 http/tests/devtools/editor/text-editor-formatter.js [ Timeout ]
+crbug.com/591099 http/tests/devtools/editor/text-editor-goto-matching-bracket.js [ Timeout ]
 crbug.com/714962 http/tests/devtools/editor/text-editor-indent-autodetection.js [ Timeout ]
 crbug.com/714962 http/tests/devtools/editor/text-editor-reveal-line.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/editor/text-editor-word-jumps.js [ Timeout ]
@@ -3763,10 +3341,11 @@
 crbug.com/591099 http/tests/devtools/elements/styles-3/style-rule-from-imported-stylesheet.js [ Pass ]
 crbug.com/591099 http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js [ Pass ]
 crbug.com/591099 http/tests/devtools/elements/styles-3/styles-disable-inherited.js [ Failure ]
-crbug.com/591099 http/tests/devtools/elements/styles-4/styles-formatting.js [ Pass ]
+crbug.com/591099 http/tests/devtools/elements/styles-4/styles-formatting.js [ Pass Timeout ]
 crbug.com/591099 http/tests/devtools/elements/styles/styles-mouse-test.js [ Failure Pass ]
 crbug.com/714962 http/tests/devtools/jump-to-previous-editing-location.js [ Failure ]
 crbug.com/591099 http/tests/devtools/network/network-datareceived.js [ Failure ]
+crbug.com/591099 http/tests/devtools/oopif/oopif-elements-navigate-in.js [ Failure ]
 crbug.com/714962 http/tests/devtools/service-workers/service-workers-view.js [ Failure ]
 crbug.com/591099 http/tests/devtools/text-autosizing-override.js [ Failure ]
 crbug.com/591099 http/tests/devtools/tracing/scroll-invalidations.js [ Failure ]
@@ -3779,7 +3358,7 @@
 crbug.com/591099 http/tests/feature-policy/payment-disabled.php [ Pass ]
 crbug.com/591099 http/tests/feature-policy/payment-enabledforall.php [ Pass ]
 crbug.com/591099 http/tests/images/restyle-decode-error.html [ Failure ]
-crbug.com/783102 http/tests/incremental/frame-focus-before-load.html [ Pass Timeout ]
+crbug.com/783102 http/tests/incremental/frame-focus-before-load.html [ Timeout ]
 crbug.com/591099 http/tests/incremental/slow-utf8-text.pl [ Pass Timeout ]
 crbug.com/591099 http/tests/inspector-protocol/network/response-interception-no-change-content-not-ready.js [ Pass ]
 crbug.com/591099 http/tests/inspector-protocol/network/response-interception-request-completes-network-closes.js [ Pass ]
@@ -3795,11 +3374,9 @@
 crbug.com/591099 http/tests/misc/acid2-pixel.html [ Failure ]
 crbug.com/591099 http/tests/misc/acid2.html [ Failure ]
 crbug.com/591099 http/tests/misc/acid3.html [ Crash ]
-crbug.com/591099 http/tests/misc/frame-access-during-load.html [ Failure ]
 crbug.com/591099 http/tests/misc/iframe404.html [ Failure ]
 crbug.com/591099 http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm [ Failure ]
 crbug.com/591099 http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml [ Failure ]
-crbug.com/591099 http/tests/misc/slow-loading-image-in-pattern.html [ Failure ]
 crbug.com/591099 http/tests/misc/slow-loading-mask.html [ Failure ]
 crbug.com/591099 http/tests/origin_trials/sample-api-workers.html [ Pass ]
 crbug.com/591099 http/tests/permissions/test-api-surface.html [ Pass ]
@@ -3822,15 +3399,9 @@
 crbug.com/591099 http/tests/workers/shared-worker-performance-timeline.html [ Pass ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/background-attachment-local-scrolling.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/background-color-applied-to-rounded-inline-element.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/background-size-002.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-clip-001.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-clip-002.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001.htm [ Failure ]
-crbug.com/591099 ietestcenter/css3/bordersbackgrounds/box-shadow-002.htm [ Failure ]
 crbug.com/714962 ietestcenter/css3/flexbox/flexbox-layout-003.htm [ Failure Pass ]
 crbug.com/591099 ietestcenter/css3/multicolumn/column-block-formatting-context-001.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/multicolumn/column-containing-block-003.htm [ Failure ]
@@ -3845,15 +3416,11 @@
 crbug.com/714962 ietestcenter/css3/multicolumn/column-width-applies-to-013.htm [ Failure ]
 crbug.com/591099 ietestcenter/css3/multicolumn/column-width-applies-to-014.htm [ Failure ]
 crbug.com/591099 images/55.html [ Failure ]
-crbug.com/591099 images/alt-text-wrapping.html [ Failure ]
 crbug.com/714962 images/color-profile-background-clip-text.html [ Failure Crash ]
 crbug.com/591099 images/color-profile-image-filter-all.html [ Failure ]
 crbug.com/591099 images/color-profile-image-shape.html [ Failure ]
 crbug.com/591099 images/color-profile-munsell-adobe-to-srgb.html [ Failure ]
 crbug.com/591099 images/image-hover-display-alt.html [ Failure ]
-crbug.com/591099 images/image-in-map.html [ Failure ]
-crbug.com/591099 images/image-map-anchor-children.html [ Failure ]
-crbug.com/591099 images/imagemap-focus-ring-outline-color-not-inherited-from-map.html [ Failure ]
 crbug.com/591099 images/percent-height-image.html [ Failure ]
 crbug.com/591099 images/png-suite/test.html [ Failure ]
 crbug.com/591099 images/rendering-broken-0px-images-quirk.html [ Failure ]
@@ -3898,27 +3465,20 @@
 crbug.com/714962 intersection-observer/root-margin.html [ Failure ]
 crbug.com/714962 intersection-observer/text-target.html [ Failure ]
 crbug.com/591099 media/autoplay/document-user-activation.html [ Failure ]
-crbug.com/591099 media/controls/lazy-loaded-style.html [ Failure ]
 crbug.com/591099 media/controls/volumechange-muted-attribute.html [ Failure Pass ]
 crbug.com/591099 media/controls/volumechange-stopimmediatepropagation.html [ Failure Pass ]
 crbug.com/591099 media/video-aspect-ratio.html [ Failure ]
 crbug.com/591099 media/video-colorspace-yuv420.html [ Failure ]
 crbug.com/591099 media/video-colorspace-yuv422.html [ Failure ]
-crbug.com/591099 media/video-layer-crash.html [ Failure ]
 crbug.com/591099 media/video-persistence.html [ Crash ]
-crbug.com/591099 media/video-poster-scale.html [ Failure ]
 crbug.com/591099 media/video-replaces-poster.html [ Failure ]
 crbug.com/591099 media/video-transformed.html [ Failure ]
-crbug.com/591099 media/video-zoom.html [ Failure ]
 crbug.com/591099 netinfo/estimate-multiple-frames.html [ Failure Pass ]
 crbug.com/591099 overflow/overflow-basic-002.html [ Pass ]
 crbug.com/591099 overflow/overflow-position-003.html [ Failure ]
-crbug.com/591099 paint/clipath/clip-path-with-background-and-box-behind.html [ Failure ]
-crbug.com/591099 paint/filters/clip-filter-overflow-clip.html [ Failure ]
 crbug.com/714962 paint/inline/floating-inline.html [ Crash ]
 crbug.com/591099 paint/inline/focus-ring-under-absolute-with-relative-continuation.html [ Failure ]
 crbug.com/591099 paint/invalidation/4776765.html [ Failure ]
-crbug.com/591099 paint/invalidation/background/background-image-paint-invalidation-large-abspos-div.html [ Failure ]
 crbug.com/591099 paint/invalidation/background/backgroundSizeRepaint.html [ Failure ]
 crbug.com/591099 paint/invalidation/block-layout-inline-children-replaced.html [ Failure ]
 crbug.com/591099 paint/invalidation/block-no-inflow-children.html [ Failure ]
@@ -4056,7 +3616,6 @@
 crbug.com/591099 paint/invalidation/overflow/float-overflow-right.html [ Crash ]
 crbug.com/591099 paint/invalidation/overflow/float-overflow.html [ Crash ]
 crbug.com/591099 paint/invalidation/overflow/inline-block-overflow-repaint.html [ Failure ]
-crbug.com/591099 paint/invalidation/overflow/inline-block-overflow.html [ Failure ]
 crbug.com/591099 paint/invalidation/overflow/inline-box-overflow-repaint.html [ Failure ]
 crbug.com/714962 paint/invalidation/overflow/inline-overflow.html [ Failure ]
 crbug.com/714962 paint/invalidation/overflow/inline-vertical-lr-overflow.html [ Failure ]
@@ -4290,7 +3849,7 @@
 crbug.com/591099 payments/payment-request-in-iframe.html [ Failure ]
 crbug.com/591099 plugins/embed-attributes-style.html [ Failure ]
 crbug.com/591099 plugins/mouse-click-plugin-clears-selection.html [ Failure ]
-crbug.com/591099 plugins/plugin-document-back-forward.html [ Timeout ]
+crbug.com/591099 plugins/plugin-document-back-forward.html [ Pass Timeout ]
 crbug.com/591099 plugins/webview-plugin-nested-iframe-scroll.html [ Failure ]
 crbug.com/591099 printing/absolute-position-headers-and-footers.html [ Failure ]
 crbug.com/591099 printing/absolute-positioned.html [ Failure ]
@@ -4300,7 +3859,6 @@
 crbug.com/591099 printing/css2.1/page-break-after-003.html [ Failure ]
 crbug.com/591099 printing/css2.1/page-break-after-004.html [ Failure ]
 crbug.com/591099 printing/css2.1/page-break-before-000.html [ Failure ]
-crbug.com/591099 printing/ellipsis-printing-style.html [ Failure ]
 crbug.com/591099 printing/fixed-positioned-but-static-headers-and-footers.html [ Failure ]
 crbug.com/591099 printing/fixed-positioned-child-repeats-even-when-html-and-body-are-zero-height.html [ Crash ]
 crbug.com/591099 printing/fixed-positioned-child-shouldnt-print.html [ Crash ]
@@ -4360,8 +3918,6 @@
 crbug.com/591099 storage/indexeddb/objectstore-keycursor.html [ Timeout ]
 crbug.com/591099 storage/indexeddb/structured-clone.html [ Timeout ]
 crbug.com/591099 svg/as-background-image/animated-svg-as-background.html [ Crash ]
-crbug.com/591099 svg/as-background-image/background-image-preserveaspectRatio-support.html [ Failure ]
-crbug.com/591099 svg/as-background-image/background-repeat.html [ Failure ]
 crbug.com/591099 svg/as-background-image/svg-as-background-1.html [ Failure Pass ]
 crbug.com/591099 svg/as-background-image/svg-as-background-2.html [ Failure Pass ]
 crbug.com/591099 svg/as-background-image/svg-as-background-3.html [ Failure Pass ]
@@ -4374,19 +3930,12 @@
 crbug.com/591099 svg/as-background-image/svg-as-tiled-background.html [ Failure Pass ]
 crbug.com/591099 svg/as-border-image/svg-as-border-image-2.html [ Failure ]
 crbug.com/591099 svg/as-border-image/svg-as-border-image.html [ Failure ]
-crbug.com/591099 svg/as-image/img-preserveAspectRatio-support-1.html [ Failure ]
-crbug.com/591099 svg/as-object/object-box-sizing-no-width-height.html [ Failure ]
 crbug.com/714962 svg/canvas/canvas-pattern-svg.html [ Failure ]
 crbug.com/591099 svg/custom/absolute-sized-svg-in-xhtml.xhtml [ Failure ]
 crbug.com/591099 svg/custom/clone-element-with-animated-svg-properties.html [ Failure ]
-crbug.com/591099 svg/custom/createImageElement2.xhtml [ Failure ]
-crbug.com/591099 svg/custom/dominant-baseline-hanging.svg [ Failure ]
-crbug.com/591099 svg/custom/foreign-object-skew.svg [ Failure ]
-crbug.com/591099 svg/custom/getscreenctm-in-mixed-content.xhtml [ Failure ]
 crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area-nested.xhtml [ Failure ]
 crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area.xhtml [ Failure ]
 crbug.com/591099 svg/custom/getsvgdocument.html [ Failure ]
-crbug.com/591099 svg/custom/image-parent-translation.xhtml [ Failure ]
 crbug.com/591099 svg/custom/inline-svg-in-xhtml.xml [ Failure ]
 crbug.com/591099 svg/custom/inline-svg-use-available-width-in-stf.html [ Failure ]
 crbug.com/591099 svg/custom/invisible-text-after-scrolling.xhtml [ Failure ]
@@ -4397,30 +3946,23 @@
 crbug.com/591099 svg/custom/object-sizing-no-width-height.xhtml [ Failure ]
 crbug.com/591099 svg/custom/object-sizing.xhtml [ Failure ]
 crbug.com/591099 svg/custom/path-bad-data.svg [ Failure ]
-crbug.com/591099 svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml [ Failure ]
 crbug.com/591099 svg/custom/rootmost-svg-xy-attrs.xhtml [ Failure ]
 crbug.com/591099 svg/custom/svg-float-border-padding.xml [ Failure ]
 crbug.com/591099 svg/custom/svg-fonts-in-html.html [ Failure ]
-crbug.com/591099 svg/custom/svg-fonts-word-spacing.html [ Failure ]
 crbug.com/591099 svg/custom/text-match-highlight.html [ Failure ]
 crbug.com/591099 svg/custom/transformed-text-pattern.html [ Failure ]
 crbug.com/591099 svg/custom/use-event-retargeting.html [ Failure ]
 crbug.com/591099 svg/custom/use-font-face-crash.svg [ Failure ]
 crbug.com/714962 svg/dom/SVGStringList-basics.xhtml [ Failure ]
-crbug.com/591099 svg/dom/svgangle-units.html [ Timeout ]
+crbug.com/591099 svg/dom/svgangle-units.html [ Pass Timeout ]
 crbug.com/591099 svg/filters/feTurbulence-bad-seeds.html [ Failure ]
 crbug.com/591099 svg/foreign-object-under-shadow-root-under-hidden.html [ Failure ]
 crbug.com/591099 svg/foreignObject/svg-document-in-html-document.svg [ Failure ]
 crbug.com/591099 svg/hixie/error/012.xml [ Failure ]
 crbug.com/591099 svg/hixie/error/013.xml [ Failure ]
-crbug.com/591099 svg/hixie/mixed/006.xml [ Failure ]
 crbug.com/591099 svg/in-html/sizing/svg-inline.html [ Timeout ]
 crbug.com/714962 svg/overflow/overflow-on-outermost-svg-element-horizontal-auto.svg [ Failure ]
-crbug.com/591099 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml [ Failure ]
 crbug.com/591099 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml [ Failure ]
-crbug.com/591099 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml [ Failure ]
-crbug.com/591099 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml [ Failure ]
-crbug.com/591099 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml [ Failure ]
 crbug.com/591099 svg/parser/whitespace-length-invalid-1.html [ Pass Timeout ]
 crbug.com/591099 svg/parser/whitespace-length-invalid-2.html [ Pass Timeout ]
 crbug.com/591099 svg/parser/whitespace-length-invalid-3.html [ Pass Timeout ]
@@ -4432,14 +3974,9 @@
 crbug.com/714962 svg/text/select-text-svgfont.html [ Failure Pass ]
 crbug.com/591099 svg/text/text-repaint-rects.xhtml [ Failure ]
 crbug.com/714962 svg/text/tspan-multiple-outline.svg [ Failure ]
-crbug.com/591099 svg/transforms/svg-css-transforms-clip-path.xhtml [ Failure ]
-crbug.com/591099 svg/transforms/svg-css-transforms.xhtml [ Failure ]
 crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ]
 crbug.com/591099 svg/transforms/transformed-text-fill-pattern.html [ Failure ]
-crbug.com/591099 svg/wicd/test-rightsizing-a.xhtml [ Failure ]
-crbug.com/591099 svg/wicd/test-rightsizing-b.xhtml [ Failure ]
 crbug.com/591099 svg/wicd/test-scalable-background-image1.xhtml [ Crash ]
-crbug.com/591099 svg/zoom/page/zoom-foreignObject.svg [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-hixie-mixed-009.xml [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-hixie-rendering-model-004.xhtml [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
@@ -4642,14 +4179,10 @@
 crbug.com/591099 transforms/3d/general/perspective-units.html [ Failure ]
 crbug.com/591099 transforms/3d/hit-testing/backface-hit-test.html [ Failure ]
 crbug.com/591099 transforms/3d/hit-testing/backface-no-transform-hit-test.html [ Failure ]
-crbug.com/591099 transforms/3d/point-mapping/3d-point-mapping-2.html [ Failure ]
-crbug.com/591099 transforms/3d/point-mapping/3d-point-mapping-origins.html [ Failure ]
 crbug.com/591099 transforms/bounding-rect-zoom.html [ Failure ]
-crbug.com/591099 transforms/identity-matrix.html [ Failure ]
 crbug.com/714962 transforms/inline-in-transformed-multicol.html [ Failure ]
 crbug.com/714962 transforms/selection-bounds-in-transformed-view.html [ Failure ]
 crbug.com/591099 transforms/shadows.html [ Failure ]
-crbug.com/591099 transforms/svg-vs-css.xhtml [ Failure ]
 crbug.com/591099 transforms/transform-positioned-ancestor.html [ Failure ]
 crbug.com/591099 transforms/transformed-caret.html [ Failure ]
 crbug.com/591099 transforms/transforms-with-zoom.html [ Failure ]
@@ -4667,7 +4200,6 @@
 crbug.com/591099 virtual/exotic-color-space/ [ Skip ]
 crbug.com/591099 virtual/feature-policy-vibrate/ [ Skip ]
 crbug.com/591099 virtual/gpu-rasterization/images/55.html [ Failure ]
-crbug.com/591099 virtual/gpu-rasterization/images/alt-text-wrapping.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-background-clip-text.html [ Crash Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-group.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-image-filter-all.html [ Failure ]
@@ -4676,11 +4208,8 @@
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-layer.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-munsell-adobe-to-srgb.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/color-profile-reflection.html [ Failure ]
-crbug.com/591099 virtual/gpu-rasterization/images/cross-fade-invalidation.html [ Failure ]
+crbug.com/591099 virtual/gpu-rasterization/images/cross-fade-invalidation.html [ Failure Pass ]
 crbug.com/591099 virtual/gpu-rasterization/images/image-hover-display-alt.html [ Failure ]
-crbug.com/591099 virtual/gpu-rasterization/images/image-in-map.html [ Failure ]
-crbug.com/591099 virtual/gpu-rasterization/images/image-map-anchor-children.html [ Failure ]
-crbug.com/591099 virtual/gpu-rasterization/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/percent-height-image.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/png-suite/test.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-0px-images-quirk.html [ Failure ]
@@ -4691,6 +4220,7 @@
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-block-flow-images.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-images-empty-alt.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-images.html [ Failure ]
+crbug.com/591099 virtual/gpu/fast/canvas/canvas-composite-video.html [ Timeout ]
 crbug.com/591099 virtual/gpu/fast/canvas/canvas-createImageBitmap-colorClamping.html [ Pass ]
 crbug.com/714962 virtual/gpu/fast/canvas/canvas-css-clip-path.html [ Failure ]
 crbug.com/591099 virtual/gpu/fast/canvas/canvas-drawImage-video-imageSmoothingEnabled.html [ Pass ]
diff --git a/third_party/WebKit/LayoutTests/NeverFixTests b/third_party/WebKit/LayoutTests/NeverFixTests
index 668e7558..5bc6964e 100644
--- a/third_party/WebKit/LayoutTests/NeverFixTests
+++ b/third_party/WebKit/LayoutTests/NeverFixTests
@@ -45,7 +45,8 @@
 [ Win Linux ] fast/dom/partial-layout-overlay-scrollbars.html [ WontFix ]
 
 # Tests trak table support / letter spacing specific to Mac system font
-[ Win Linux Android Mac10.10 Mac10.11 ] fast/text/mac-system-ui-trak.html [ WontFix ]
+# Only maintain this for latest Mac OS
+[ Win Linux Android Mac10.10 Mac10.11 Mac10.12 ] fast/text/mac-system-ui-trak.html [ WontFix ]
 
  # Mac's popup behavior is different.
 [ Mac ] fast/forms/select/menulist-onchange-fired-with-key-up-down.html [ WontFix ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 4112a68f..25d429a 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -624,7 +624,6 @@
 crbug.com/626703 virtual/outofblink-cors/external/wpt/fetch/http-cache/status.html [ Pass Timeout ]
 crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/foreign-fetch-basics.https.html [ Timeout ]
 crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html [ Timeout ]
-crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Timeout ]
 
 # Failing tests in dictionary order.
 crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-image-cache.https.html [ Failure ]
@@ -1700,8 +1699,6 @@
 
 crbug.com/805463 external/wpt/acid/acid3/numbered-tests.html [ Skip ]
 
-crbug.com/817930 [ Mac10.13 ] fast/text/mac-system-ui-trak.html [ Failure ]
-
 # ====== New tests from wpt-importer added here ======
 crbug.com/626703 [ Android ] external/wpt/bluetooth/requestDevice/canonicalizeFilter/no-arguments.https.html [ Crash ]
 crbug.com/626703 external/wpt/css/css-text/line-break/line-break-strict-018b.xht [ Failure ]
@@ -3044,6 +3041,7 @@
 crbug.com/787971 external/wpt/WebCryptoAPI/generateKey/test_successes_RSA-OAEP.https.html [ Pass Timeout ]
 crbug.com/787971 external/wpt/WebCryptoAPI/generateKey/test_successes_RSA-PSS.https.html [ Pass Timeout ]
 crbug.com/787971 external/wpt/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.https.html [ Pass Timeout ]
+crbug.com/787971 [ Mac ] external/wpt/WebCryptoAPI/generateKey/failures_RSA-OAEP.https.worker.html [ Pass Timeout ]
 crbug.com/787971 [ Mac ] external/wpt/WebCryptoAPI/generateKey/failures_RSA-PSS.https.worker.html [ Pass Timeout ]
 crbug.com/787971 external/wpt/WebCryptoAPI/derive_bits_keys/hkdf.https.worker.html [ Pass Timeout ]
 crbug.com/787971 external/wpt/WebCryptoAPI/derive_bits_keys/pbkdf2.https.worker.html [ Pass Timeout ]
@@ -3237,7 +3235,7 @@
 crbug.com/667560 http/tests/devtools/elements/styles-4/inline-style-sourcemap.js [ Pass Failure ]
 
 # Sheriff failures 2017-12-05
-crbug.com/791941 [ Mac ] virtual/gpu-rasterization/images/color-profile-clip.html [ Pass Failure ]
+crbug.com/791941 [ Mac ] virtual/gpu-rasterization/images/color-profile-clip.html [ Pass Failure Timeout ]
 crbug.com/791941 [ Mac ] virtual/gpu-rasterization/images/color-profile-munsell-adobe-to-srgb.html [ Pass Failure ]
 crbug.com/791941 [ Mac ] virtual/gpu-rasterization/images/color-profile-munsell-srgb-to-srgb.html [ Pass Failure ]
 
@@ -3261,9 +3259,6 @@
 
 crbug.com/802915 css3/blending/isolation-should-include-non-local-background.html [ Failure ]
 
-crbug.com/807838 external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Crash ]
-crbug.com/807838 virtual/navigation-mojo-response/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Crash ]
-
 # Sheriff faulures 2017-12-12
 crbug.com/794180 http/tests/devtools/layers/layer-compositing-reasons.js [ Failure Pass ]
 
@@ -3424,3 +3419,4 @@
 # Sheriff 2018-03-02
 crbug.com/818107 [ Android ] presentation/presentationconnectionavailableevent-ctor-mock.html [ Failure Crash ]
 crbug.com/818076 http/tests/devtools/oopif/oopif-elements-navigate-in.js [ Failure Pass ]
+crbug.com/818154 [ Linux Debug ] virtual/gpu-rasterization/images/gif-loop-count.html [ Failure Pass ]
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
deleted file mode 100644
index 2cee245..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
deleted file mode 100644
index b9fac482..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
deleted file mode 100644
index f38a1b2..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
deleted file mode 100644
index f38a1b2..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
deleted file mode 100644
index f38a1b2..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
deleted file mode 100644
index 00fa2b9..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
index 43d24dae..3bbff4b 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
+++ b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-data-uri-svg-image-expected.png b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
index dd9a170..30cf173 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
+++ b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-image-svg-expected.png
index e12a82d..fc4c482c 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-image-svg-expected.png
+++ b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-image-svg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-svg-color-expected.png b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-svg-color-expected.png
index 91d6f0b..bdabcd6 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-svg-color-expected.png
+++ b/third_party/WebKit/LayoutTests/css3/blending/background-blend-mode-svg-color-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/blending/mix-blend-mode-with-masking-expected.png b/third_party/WebKit/LayoutTests/css3/blending/mix-blend-mode-with-masking-expected.png
index 5f0072f..34cb18f 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/mix-blend-mode-with-masking-expected.png
+++ b/third_party/WebKit/LayoutTests/css3/blending/mix-blend-mode-with-masking-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/5206311-1.html b/third_party/WebKit/LayoutTests/editing/deleting/delete_selection_contains_table_row.html
similarity index 100%
rename from third_party/WebKit/LayoutTests/editing/deleting/5206311-1.html
rename to third_party/WebKit/LayoutTests/editing/deleting/delete_selection_contains_table_row.html
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index aae3baaf..34ec369 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -135323,6 +135323,16 @@
      {}
     ]
    ],
+   "encrypted-media/scripts/playback-temporary-playduration-keystatus.js": [
+    [
+     {}
+    ]
+   ],
+   "encrypted-media/scripts/playback-temporary-playduration.js": [
+    [
+     {}
+    ]
+   ],
    "encrypted-media/scripts/playback-temporary-setMediaKeys.js": [
     [
      {}
@@ -188984,6 +188994,18 @@
      }
     ]
    ],
+   "encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html": [
+    [
+     "/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html",
+     {}
+    ]
+   ],
+   "encrypted-media/drm-mp4-playback-temporary-playduration.html": [
+    [
+     "/encrypted-media/drm-mp4-playback-temporary-playduration.html",
+     {}
+    ]
+   ],
    "encrypted-media/drm-mp4-playback-temporary-setMediaKeys-after-src.https.html": [
     [
      "/encrypted-media/drm-mp4-playback-temporary-setMediaKeys-after-src.https.html",
@@ -214724,6 +214746,12 @@
      {}
     ]
    ],
+   "payment-request/PaymentCurrencyAmount/currencySystem-member.https.html": [
+    [
+     "/payment-request/PaymentCurrencyAmount/currencySystem-member.https.html",
+     {}
+    ]
+   ],
    "payment-request/PaymentRequestUpdateEvent/constructor.http.html": [
     [
      "/payment-request/PaymentRequestUpdateEvent/constructor.http.html",
@@ -244086,7 +244114,7 @@
    "testharness"
   ],
   "2dcontext/imagebitmap/createImageBitmap-origin.sub.html": [
-   "adcaa1b9854555f0cbb804b09ab49f50a5199eb6",
+   "f7d86191239dafac5462eaeed9ee5c16a8d52226",
    "testharness"
   ],
   "2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html": [
@@ -321765,6 +321793,14 @@
    "15a0b2950e25edcbff1b5b2e3d5807cb91d9e531",
    "testharness"
   ],
+  "encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html": [
+   "c5e7048bbfa4ce3d8f4cbb09a7b492532642b9e3",
+   "testharness"
+  ],
+  "encrypted-media/drm-mp4-playback-temporary-playduration.html": [
+   "8a8eaa8f5ca6db0b8e2626f7227e0782ff4ff103",
+   "testharness"
+  ],
   "encrypted-media/drm-mp4-playback-temporary-setMediaKeys-after-src.https.html": [
    "09ba82feb85a73a1aa275164bfacd722f893075e",
    "testharness"
@@ -322009,6 +322045,14 @@
    "c7b0b07db47c4f7d17bd6f6ca93ea59d848a9a93",
    "support"
   ],
+  "encrypted-media/scripts/playback-temporary-playduration-keystatus.js": [
+   "e76ebe55b8d227c47999cdd4c346ffc999c75283",
+   "support"
+  ],
+  "encrypted-media/scripts/playback-temporary-playduration.js": [
+   "70951d799440e78909014d51afee6bc1056adaa0",
+   "support"
+  ],
   "encrypted-media/scripts/playback-temporary-setMediaKeys.js": [
    "c18fb1837b00a1111e1a0b6658cea107c243de53",
    "support"
@@ -322094,7 +322138,7 @@
    "support"
   ],
   "encrypted-media/util/drm-messagehandler.js": [
-   "e06318f9d7a920515db9db9e0f58b2993f751deb",
+   "0a9927d3563b59857bfec206a165567026d0cb38",
    "support"
   ],
   "encrypted-media/util/fetch.js": [
@@ -322110,7 +322154,7 @@
    "support"
   ],
   "encrypted-media/util/utils.js": [
-   "17c7a7646bd10a09035bfbc48f6a29c033b44bda",
+   "e8abe576eca1f3cf5dfeee79aafb59664343091a",
    "support"
   ],
   "entries-api/OWNERS": [
@@ -322766,7 +322810,7 @@
    "support"
   ],
   "fetch/OWNERS": [
-   "6bc2dd179ac2fa34263a4b623ef4a14245a4ec3f",
+   "c75cf7a010896b154c1514291046070c03cc80d1",
    "support"
   ],
   "fetch/README.md": [
@@ -347130,7 +347174,7 @@
    "testharness"
   ],
   "navigation-timing/OWNERS": [
-   "08148718766b13a57cb58e666a61fabf80a6d1ba",
+   "9de0eb5abcaae20bebbb7be750c937843f558707",
    "support"
   ],
   "navigation-timing/idlharness.html": [
@@ -353833,6 +353877,10 @@
    "e1aefd7497d3d5005df88d034fbde4e6b26823d6",
    "manual"
   ],
+  "payment-request/PaymentCurrencyAmount/currencySystem-member.https.html": [
+   "7bfce9810c1afdc53a99fa0036c472f6cfbe5deb",
+   "testharness"
+  ],
   "payment-request/PaymentRequestUpdateEvent/constructor.http.html": [
    "017f1f1aca43171083833ddb27ff66e39902e85d",
    "testharness"
@@ -364814,7 +364862,7 @@
    "testharness"
   ],
   "service-workers/service-worker/navigation-preload/resource-timing.https.html": [
-   "837273105d7a1521feff32338cdef7185a6786e3",
+   "6d9bfe62e8bd342ed70696322967e8395b84756a",
    "testharness"
   ],
   "service-workers/service-worker/navigation-preload/resources/broken-chunked-encoding-scope.asis": [
@@ -366954,7 +367002,7 @@
    "testharness"
   ],
   "streams/OWNERS": [
-   "c5de869a554fe2702ce3361311105b04eb80a16e",
+   "ebc227d183261d53e7e43571a5479c0ba4a79584",
    "support"
   ],
   "streams/README.md": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/createImageBitmap-origin.sub.html b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
index 7f5588e..24848f3d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
@@ -71,6 +71,18 @@
   },
 
   {
+    name: "redirected to same-origin HTMLVideoElement",
+    factory: () => {
+      return new Promise((resolve, reject) => {
+        const video = document.createElement("video");
+        video.oncanplaythrough = () => resolve(video);
+        video.onerror = reject;
+        video.src = "http://{{domains[www1]}}:{{ports[http][0]}}/common/redirect.py?location=" + getVideoURI("http://{{domains[]}}:{{ports[http][0]}}/media/movie_300");
+      });
+    },
+  },
+
+  {
     name: "unclean HTMLCanvasElement",
     factory: () => {
       return makeImage().then(image => {
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-001-manual.html b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-001-manual.html
new file mode 100644
index 0000000..956b1a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-001-manual.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8" />
+  <title>CSS Test (Selectors): Keyboard focus enables :focus-visible</title>
+  <link rel="author" title="Rob Dodson" href="robdodson@chromium.org" />
+  <link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" />
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <style>
+    :focus-visible { color: rgb(0, 128, 0); }
+  </style>
+</head>
+<body>
+  <ol id="instructions">
+    <li>If the user-agent does not claim to support the <code>:focus-visible</code> pseudo-class then SKIP this test.</li>
+    <li>Use the TAB key on the keyboard to focus the element below that says "Focus me."</li>
+    <li>If the element does not have green text, then the test result is FAILURE. If the element has green text, then the test result is SUCCESS.</li>
+  </ol>
+  <br />
+  <div id="el" tabindex="0">Focus me.</div>
+  <script>
+    async_test(function(t) {
+      el.addEventListener("focus", t.step_func(function() {
+        assert_equals(getComputedStyle(el).color, "rgb(0, 128, 0)");
+        t.done();
+      }));
+    }, "Keyboard focus should match :focus-visible");
+  </script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html
new file mode 100644
index 0000000..cbecb0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset=utf-8>
+    <title>Encrypted Media Extensions: Successful Playback, Temporary session limited playduration, check keystatus, DRM, mp4</title>
+    <link rel="help" href="https://w3c.github.io/encrypted-media/">
+
+    <!-- Web Platform Test Harness scripts -->
+    <script src=/resources/testharness.js></script>
+    <script src=/resources/testharnessreport.js></script>
+
+    <!-- Helper scripts for Encrypted Media Extensions tests  -->
+    <script src=/encrypted-media/util/utils.js></script>
+    <script src=/encrypted-media/util/utf8.js></script>
+    <script src=/encrypted-media/util/fetch.js></script>
+    <script src=/encrypted-media/util/testmediasource.js></script>
+
+    <!-- Content metadata -->
+    <script src=/encrypted-media/content/content-metadata.js></script>
+
+    <!-- Message handler for DRM servers -->
+    <script src=/encrypted-media/util/drm-messagehandler.js></script>
+
+    <!-- The script for this specific test -->
+    <script src=/encrypted-media/scripts/playback-temporary-playduration-keystatus.js></script>
+
+  </head>
+  <body>
+    <div id='log'></div>
+
+    <div id='video'>
+      <video id="videoelement" width="200px"></video>
+    </div>
+
+    <script>
+        var keysystem = getSupportedKeySystem(),
+            contentitem = content['mp4-basic'],
+            handler = new MessageHandler( keysystem, contentitem ),
+            config = {  video:              document.getElementById('videoelement'),
+                        keysystem:          keysystem,
+                        messagehandler:     handler.messagehandler,
+                        audioPath:          contentitem.audio.path,
+                        videoPath:          contentitem.video.path,
+                        audioType:          contentitem.audio.type,
+                        videoType:          contentitem.video.type,
+                        initDataType:       contentitem.initDataType,
+                        playduration:       2000,
+                        testcase:           'single key' };
+
+        runTest(config);
+    </script>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration.html b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration.html
new file mode 100644
index 0000000..24012b6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset=utf-8>
+    <title>Encrypted Media Extensions: Successful Playback, Temporary session limited playduration, DRM, mp4</title>
+    <link rel="help" href="https://w3c.github.io/encrypted-media/">
+
+    <!-- Web Platform Test Harness scripts -->
+    <script src=/resources/testharness.js></script>
+    <script src=/resources/testharnessreport.js></script>
+
+    <!-- Helper scripts for Encrypted Media Extensions tests  -->
+    <script src=/encrypted-media/util/utils.js></script>
+    <script src=/encrypted-media/util/utf8.js></script>
+    <script src=/encrypted-media/util/fetch.js></script>
+    <script src=/encrypted-media/util/testmediasource.js></script>
+
+    <!-- Content metadata -->
+    <script src=/encrypted-media/content/content-metadata.js></script>
+
+    <!-- Message handler for DRM servers -->
+    <script src=/encrypted-media/util/drm-messagehandler.js></script>
+
+    <!-- The script for this specific test -->
+    <script src=/encrypted-media/scripts/playback-temporary-playduration.js></script>
+
+  </head>
+  <body>
+    <div id='log'></div>
+
+    <div id='video'>
+      <video id="videoelement" width="200px"></video>
+    </div>
+
+    <script>
+        var keysystem = getSupportedKeySystem(),
+            contentitem = content['mp4-basic'],
+            handler = new MessageHandler( keysystem, contentitem ),
+            config = {  video:              document.getElementById('videoelement'),
+                        keysystem:          keysystem,
+                        messagehandler:     handler.messagehandler,
+                        audioPath:          contentitem.audio.path,
+                        videoPath:          contentitem.video.path,
+                        audioType:          contentitem.audio.type,
+                        videoType:          contentitem.video.type,
+                        initDataType:       contentitem.initDataType,
+                        playduration:       2000,
+                        testcase:           'single key' };
+
+        runTest(config);
+    </script>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration-keystatus.js b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration-keystatus.js
new file mode 100644
index 0000000..e21b8f8f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration-keystatus.js
@@ -0,0 +1,78 @@
+function runTest(config,qualifier) {
+
+    var testname = testnamePrefix(qualifier, config.keysystem)
+                                    + ', temporary, '
+                                    + /video\/([^;]*)/.exec(config.videoType)[1]
+                                    + ', playback with limited playduration, check keystatus, ' + config.testcase;
+
+    var configuration = {   initDataTypes: [ config.initDataType ],
+                            audioCapabilities: [ { contentType: config.audioType } ],
+                            videoCapabilities: [ { contentType: config.videoType } ],
+                            sessionTypes: [ 'temporary' ] };
+
+    async_test(function(test) {
+
+        var _video = config.video,
+            _mediaKeys,
+            _mediaKeySession,
+            _mediaSource;
+
+        function onFailure(error) {
+            forceTestFailureFromPromise(test, error);
+        }
+
+        function onEncrypted(event) {
+            assert_equals(event.target, _video);
+            assert_true(event instanceof window.MediaEncryptedEvent);
+            assert_equals(event.type, 'encrypted');
+
+            // Only create the session for the first encrypted event
+            if (_mediaKeySession !== undefined) return;
+
+            var initDataType = config.initData ? config.initDataType : event.initDataType;
+            var initData = config.initData || event.initData;
+
+            _mediaKeySession = _mediaKeys.createSession('temporary');
+            waitForEventAndRunStep('message', _mediaKeySession, onMessage, test);
+            _mediaKeySession.generateRequest( initDataType, initData ).catch(onFailure);
+        }
+
+        function onMessage(event) {
+            assert_equals(event.target, _mediaKeySession);
+            assert_true(event instanceof window.MediaKeyMessageEvent);
+            assert_equals(event.type, 'message');
+
+            assert_in_array(event.messageType, ['license-request', 'individualization-request']);
+
+            config.messagehandler(event.messageType, event.message, {playDuration: config.playduration}).then(function(response) {
+                return event.target.update(response);
+            }).catch(onFailure);
+        }
+
+        function onPlaying(event) {
+            waitForEventAndRunStep('keystatuseschange', _mediaKeySession, onKeystatuseschange, test);
+        }
+
+        function onKeystatuseschange(event) {
+            for (var status of event.target.keyStatuses.values()) {
+                assert_equals(status, "expired", "All keys should have keyStatus expired");
+            }
+            test.done();
+        }
+
+        navigator.requestMediaKeySystemAccess(config.keysystem, [configuration]).then(function(access) {
+            return access.createMediaKeys();
+        }).then(function(mediaKeys) {
+            _mediaKeys = mediaKeys;
+            return _video.setMediaKeys(_mediaKeys);
+        }).then(function(){
+            waitForEventAndRunStep('encrypted', _video, onEncrypted, test);
+            waitForEventAndRunStep('playing', _video, onPlaying, test);
+            return testmediasource(config);
+        }).then(function(source) {
+            _mediaSource = source;
+            _video.src = URL.createObjectURL(_mediaSource);
+            _video.play();
+        }).catch(onFailure);
+    }, testname);
+}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration.js b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration.js
new file mode 100644
index 0000000..6ce6157
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/scripts/playback-temporary-playduration.js
@@ -0,0 +1,80 @@
+function runTest(config,qualifier) {
+
+    var testname = testnamePrefix(qualifier, config.keysystem)
+                                    + ', temporary, '
+                                    + /video\/([^;]*)/.exec(config.videoType)[1]
+                                    + ', playback with limited playduration, ' + config.testcase;
+
+    var configuration = {   initDataTypes: [ config.initDataType ],
+                            audioCapabilities: [ { contentType: config.audioType } ],
+                            videoCapabilities: [ { contentType: config.videoType } ],
+                            sessionTypes: [ 'temporary' ] };
+
+    async_test(function(test) {
+
+        var _video = config.video,
+            _mediaKeys,
+            _mediaKeySession,
+            _mediaSource;
+
+        function onFailure(error) {
+            forceTestFailureFromPromise(test, error);
+        }
+
+        function onEncrypted(event) {
+            assert_equals(event.target, _video);
+            assert_true(event instanceof window.MediaEncryptedEvent);
+            assert_equals(event.type, 'encrypted');
+
+            // Only create the session for the first encrypted event
+            if (_mediaKeySession !== undefined) return;
+
+            var initDataType = config.initData ? config.initDataType : event.initDataType;
+            var initData = config.initData || event.initData;
+
+            _mediaKeySession = _mediaKeys.createSession('temporary');
+            waitForEventAndRunStep('message', _mediaKeySession, onMessage, test);
+            _mediaKeySession.generateRequest( initDataType, initData ).catch(onFailure);
+        }
+
+        function onMessage(event) {
+            assert_equals(event.target, _mediaKeySession);
+            assert_true(event instanceof window.MediaKeyMessageEvent);
+            assert_equals(event.type, 'message');
+
+            assert_in_array(event.messageType, ['license-request', 'individualization-request']);
+
+            config.messagehandler(event.messageType, event.message, {playDuration: config.playduration}).then(function(response) {
+                return event.target.update(response);
+            }).catch(onFailure);
+        }
+
+        function onPlaying(event) {
+            // Not using waitForEventAndRunStep() to avoid too many
+            // EVENT(onTimeUpdate) logs.
+            _video.addEventListener('timeupdate', test.step_func(onTimeupdate), true);
+            test.step_timeout(function(){
+                test.done();
+            },config.playduration * 2);
+        }
+
+        function onTimeupdate(event) {
+            assert_less_than(_video.currentTime * 1000, config.playduration, "Video should not play for more than playDuration from licence");
+        }
+
+        navigator.requestMediaKeySystemAccess(config.keysystem, [configuration]).then(function(access) {
+            return access.createMediaKeys();
+        }).then(function(mediaKeys) {
+            _mediaKeys = mediaKeys;
+            return _video.setMediaKeys(_mediaKeys);
+        }).then(function(){
+            waitForEventAndRunStep('encrypted', _video, onEncrypted, test);
+            waitForEventAndRunStep('playing', _video, onPlaying, test);
+            return testmediasource(config);
+        }).then(function(source) {
+            _mediaSource = source;
+            _video.src = URL.createObjectURL(_mediaSource);
+            _video.play();
+        }).catch(onFailure);
+    }, testname);
+}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/drm-messagehandler.js b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/drm-messagehandler.js
index 28fb90f2..5c5577c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/drm-messagehandler.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/drm-messagehandler.js
@@ -107,11 +107,14 @@
                     outputProtection: {digital : false, analogue: false, enforce: false},
                     storeLicense: (sessionType === 'persistent-license')};
 
-            if (!params || params.expiration === undefined) {
+            if (!params || (params.expiration === undefined && params.playDuration === undefined)) {
                 crt.profile = {purchase: {}};
             } else {
-                crt.profile = {rental: {absoluteExpiration: (new Date(params.expiration)).toISOString(),
-                                        playDuration: 3600000 } };
+                var expiration = params.expiration || (Date.now().valueOf() + 3600000),
+                    playDuration = params.playDuration || 3600000;
+
+                crt.profile = {rental: {absoluteExpiration: (new Date(expiration)).toISOString(),
+                                        playDuration: playDuration } };
             }
 
             if (content.variantId !== undefined) {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/utils.js b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/utils.js
index 978cc543..41bd71f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/utils.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/util/utils.js
@@ -173,32 +173,34 @@
     return '0x' + array.map( function( x ) { return x < 16 ? '0'+x.toString(16) : x.toString(16); } ).join('');
 }
 
-function dumpKeyStatuses(keyStatuses)
+function dumpKeyStatuses(keyStatuses,short)
 {
     var userAgent = navigator.userAgent.toLowerCase();
     if (userAgent.indexOf('edge') === -1) {
-        consoleWrite("for (var entry of keyStatuses)");
+        if (!short) { consoleWrite("for (var entry of keyStatuses)"); }
         for (var entry of keyStatuses) {
             consoleWrite(arrayBufferAsString(entry[0]) + ": " + entry[1]);
         }
-        consoleWrite("for (var keyId of keyStatuses.keys())");
-        for (var keyId of keyStatuses.keys()) {
-            consoleWrite(arrayBufferAsString(keyId));
+        if (!short) {
+            consoleWrite("for (var keyId of keyStatuses.keys())");
+            for (var keyId of keyStatuses.keys()) {
+                consoleWrite(arrayBufferAsString(keyId));
+            }
+            consoleWrite("for (var status of keyStatuses.values())");
+            for (var status of keyStatuses.values()) {
+                consoleWrite(status);
+            }
+            consoleWrite("for (var entry of keyStatuses.entries())");
+            for (var entry of keyStatuses.entries()) {
+                consoleWrite(arrayBufferAsString(entry[0]) + ": " + entry[1]);
+            }
+            consoleWrite("keyStatuses.forEach()");
+            keyStatuses.forEach(function(status, keyId) {
+                consoleWrite(arrayBufferAsString(keyId) + ": " + status);
+            });
         }
-        consoleWrite("for (var status of keyStatuses.values())");
-        for (var status of keyStatuses.values()) {
-            consoleWrite(status);
-        }
-        consoleWrite("for (var entry of keyStatuses.entries())");
-        for (var entry of keyStatuses.entries()) {
-            consoleWrite(arrayBufferAsString(entry[0]) + ": " + entry[1]);
-        }
-        consoleWrite("keyStatuses.forEach()");
-        keyStatuses.forEach(function(status, keyId) {
-            consoleWrite(arrayBufferAsString(keyId) + ": " + status);
-        });
     } else {
-        consoleWrite("keyStatuses.forEach()");
+        if (!short) { consoleWrite("keyStatuses.forEach()"); }
         keyStatuses.forEach(function(keyId, status) {
             consoleWrite(arrayBufferAsString(keyId) + ": " + status);
         });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/OWNERS b/third_party/WebKit/LayoutTests/external/wpt/fetch/OWNERS
index ec4e34a..d6dc1ce4 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fetch/OWNERS
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/OWNERS
@@ -1,6 +1,5 @@
 # TEAM: blink-network-dev@chromium.org
 # COMPONENT: Blink>Network>FetchAPI
-tyoshino@chromium.org
 yhirano@chromium.org
 mkwst@chromium.org
 japhet@chromium.org
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/infrastructure/assumptions/html-elements-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/infrastructure/assumptions/html-elements-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/infrastructure/assumptions/html-elements-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/infrastructure/assumptions/html-elements-expected.txt
diff --git a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/OWNERS b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/OWNERS
index 3fe29173..0264dfb 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/OWNERS
+++ b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/OWNERS
@@ -1,3 +1,3 @@
 # TEAM: loading-dev@chromium.org
 # COMPONENT: Blink>PerformanceAPIs>NavigationTiming
-tyoshino@chromium.org
+tdresser@chromium.org
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-handler/payment-instruments.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/payment-handler/payment-instruments.https-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-handler/payment-instruments.https-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/payment-handler/payment-instruments.https-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-handler/payment-request-event.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/payment-handler/payment-request-event.https-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-handler/payment-request-event.https-expected.txt
rename to third_party/WebKit/LayoutTests/external/wpt/payment-handler/payment-request-event.https-expected.txt
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https.html
new file mode 100644
index 0000000..c79fb0f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Tests for PaymentCurrencyAmount's currencySystem</title>
+<link rel="help" href="https://www.w3.org/TR/payment-request/#dom-paymentcurrencyamount-currencysystem">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(() => {
+  const validAmount = {
+    value: "0",
+    currency: "USD",
+    currencySystem: "urn:iso:std:iso:4217",
+  }
+  const validMethods = [{ supportedMethods: "valid-method" }];
+  const validDetails = {
+    total: {
+      label: "",
+      amount: validAmount,
+    },
+  };
+  // smoke test
+  const request = new PaymentRequest(validMethods, validDetails);
+
+  // real test
+  assert_throws(new TypeError(), () => {
+    const invalidAmount = {
+      ...validAmount,
+      currencySystem: "this will cause the TypeError"
+    }
+    const invalidDetails = {
+      total: {
+        label: "",
+        amount: invalidAmount,
+      },
+    };
+    const request = new PaymentRequest(validMethods, invalidDetails);
+  })
+}, "Must throw if it encounters an unknown currencySystem");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html
index 5f0953c7..b4756d0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html
@@ -14,9 +14,9 @@
     'The entryType of preload response timing entry must be "resource' +
     '" :' + url);
   assert_equals(
-    entry.initiatorType, 'other',
+    entry.initiatorType, 'navigation',
     'The initiatorType of preload response timing entry must be ' +
-    '"other":' + url);
+    '"navigation":' + url);
 
   // If the server returns the redirect response, |decodedBodySize| is null and
   // |entry.decodedBodySize| shuld be 0. Otherwise |entry.decodedBodySize| must
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py
index 8b2244bf..4d84839 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py
@@ -7,9 +7,6 @@
       body = f.read()
     return (header, body)
 
-  if 'sandbox' in request.GET:
-    header.append(('Content-Security-Policy',
-                   'sandbox %s' % request.GET['sandbox']))
   with open(os.path.join(os.path.dirname(__file__),
                          'sandboxed-iframe-fetch-event-iframe.html'), 'r') as f:
     body = f.read()
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt
deleted file mode 100644
index 8e2f0cd..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-This is a testharness.js-based test.
-PASS Prepare a service worker.
-PASS Prepare a normal iframe.
-PASS Prepare an iframe sandboxed by <iframe sandbox="allow-scripts">.
-PASS Prepare an iframe sandboxed by <iframe sandbox="allow-scripts allow-same-origin">.
-FAIL Prepare an iframe sandboxed by CSP HTTP header with allow-scripts. assert_false: Service worker should NOT control the sandboxed page expected false got true
-PASS Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin.
-PASS Fetch request from a normal iframe
-PASS Fetch request from a worker in a normal iframe
-PASS Request for an iframe in the normal iframe
-PASS Request for an sandboxed iframe with allow-scripts flag in the normal iframe
-PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the normal iframe
-PASS Fetch request from iframe sandboxed by an attribute with allow-scripts flag
-PASS Fetch request from a worker in iframe sandboxed by an attribute with allow-scripts flag
-PASS Request for an iframe in the iframe sandboxed by an attribute with allow-scripts flag
-PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by an attribute with allow-scripts flag
-PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by an attribute with allow-scripts flag
-PASS Fetch request from iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag
-PASS Fetch request from a worker in iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag
-PASS Request for an iframe in the iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag
-PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by attribute with allow-scripts and allow-same-origin flag
-PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by attribute with allow-scripts and allow-same-origin flag
-FAIL Fetch request from iframe sandboxed by CSP HTTP header with allow-scripts flag assert_equals: The request should NOT be handled by SW. expected 0 but got 1
-PASS Request for an iframe in the iframe sandboxed by CSP HTTP header with allow-scripts flag
-PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by CSP HTTP header with allow-scripts flag
-PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by CSP HTTP header with allow-scripts flag
-PASS Fetch request from iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag
-PASS Request for an iframe in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag
-PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag
-PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html
index e08b7164..db012c2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html
@@ -52,14 +52,6 @@
 // An iframe created by <iframe sandbox='allow-scripts allow-same-origin'>.
 // This should be controlled by a service worker.
 let sandboxed_same_origin_frame;
-// An iframe whose response header has
-// 'Content-Security-Policy: allow-scripts'.
-// This should NOT be controlled by a service worker.
-let sandboxed_frame_by_header;
-// An iframe whose response header has
-// 'Content-Security-Policy: allow-scripts allow-same-origin'.
-// This should be controlled by a service worker.
-let sandboxed_same_origin_frame_by_header;
 
 promise_test(t => {
   return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
@@ -119,44 +111,6 @@
    '<iframe sandbox="allow-scripts allow-same-origin">.');
 
 promise_test(t => {
-  const iframe_full_url = expected_base_url + '?sandbox=allow-scripts&' +
-                          'sandboxed-frame-by-header';
-  return with_iframe(iframe_full_url)
-    .then(f => {
-      sandboxed_frame_by_header = f;
-      add_completion_callback(() => f.remove());
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'Service worker should provide the response');
-      assert_equals(requests[0], iframe_full_url);
-      assert_false(data.clients.includes(iframe_full_url),
-                   'Service worker should NOT control the sandboxed page');
-    });
-}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts.');
-
-promise_test(t => {
-  const iframe_full_url =
-    expected_base_url + '?sandbox=allow-scripts%20allow-same-origin&' +
-    'sandboxed-iframe-same-origin-by-header';
-  return with_iframe(iframe_full_url)
-    .then(f => {
-      sandboxed_same_origin_frame_by_header = f;
-      add_completion_callback(() => f.remove());
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1);
-      assert_equals(requests[0], iframe_full_url);
-      assert_true(data.clients.includes(iframe_full_url));
-    })
-}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and ' +
-   'allow-same-origin.');
-
-promise_test(t => {
   let frame = normal_frame;
   return doTest(frame, 'fetch')
     .then(result => {
@@ -399,137 +353,5 @@
 }, 'Request for an sandboxed iframe with allow-scripts and ' +
    'allow-same-origin flag in the iframe sandboxed by attribute with ' +
    'allow-scripts and allow-same-origin flag');
-
-promise_test(t => {
-  let frame = sandboxed_frame_by_header;
-  return doTest(frame, 'fetch')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-    });
-}, 'Fetch request from iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts flag');
-
-promise_test(t => {
-  let frame = sandboxed_frame_by_header;
-  return doTest(frame, 'iframe')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-      assert_false(data.clients.includes(frame.src + '&test=iframe'));
-    });
-}, 'Request for an iframe in the iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts flag');
-
-promise_test(t => {
-  let frame = sandboxed_frame_by_header;
-  return doTest(frame, 'sandboxed-iframe')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-      assert_false(data.clients.includes(
-        frame.src + '&test=sandboxed-iframe'));
-    });
-}, 'Request for an sandboxed iframe with allow-scripts flag in the iframe ' +
-   'sandboxed by CSP HTTP header with allow-scripts flag');
-
-promise_test(t => {
-  let frame = sandboxed_frame_by_header;
-  return doTest(frame, 'sandboxed-iframe-same-origin')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-      assert_false(data.clients.includes(
-        frame.src + '&test=sandboxed-iframe-same-origin'));
-    });
-}, 'Request for an sandboxed iframe with allow-scripts and ' +
-   'allow-same-origin flag in the iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts flag');
-
-promise_test(t => {
-  let frame = sandboxed_same_origin_frame_by_header;
-  return doTest(frame, 'fetch')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'The request should be handled by SW.');
-      assert_equals(requests[0], frame.src + '&test=fetch');
-    });
-}, 'Fetch request from iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts and allow-same-origin flag');
-
-promise_test(t => {
-  let frame = sandboxed_same_origin_frame_by_header;
-  return doTest(frame, 'iframe')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'The request should be handled by SW.');
-      assert_equals(requests[0], frame.src + '&test=iframe');
-      assert_true(data.clients.includes(frame.src + '&test=iframe'));
-    });
-}, 'Request for an iframe in the iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts and allow-same-origin flag');
-
-promise_test(t => {
-  let frame = sandboxed_same_origin_frame_by_header;
-  return doTest(frame, 'sandboxed-iframe')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-      assert_false(
-        data.clients.includes(frame.src + '&test=sandboxed-iframe'));
-    });
-}, 'Request for an sandboxed iframe with allow-scripts flag in the ' +
-   'iframe sandboxed by CSP HTTP header with allow-scripts and ' +
-   'allow-same-origin flag');
-
-promise_test(t => {
-  let frame = sandboxed_same_origin_frame_by_header;
-  return doTest(frame, 'sandboxed-iframe-same-origin')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'The request should be handled by SW.');
-      assert_equals(requests[0],
-                    frame.src + '&test=sandboxed-iframe-same-origin');
-      assert_true(data.clients.includes(
-        frame.src + '&test=sandboxed-iframe-same-origin'));
-    });
-}, 'Request for an sandboxed iframe with allow-scripts and ' +
-   'allow-same-origin flag in the iframe sandboxed by CSP HTTP header with ' +
-   'allow-scripts and allow-same-origin flag');
 </script>
 </body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html
deleted file mode 100644
index c8480bf1b..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE html>
-<title>ServiceWorker FetchEvent issued from workers in an iframe sandboxed via CSP HTTP response header.</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="resources/test-helpers.sub.js"></script>
-<body>
-<script>
-let lastCallbackId = 0;
-let callbacks = {};
-function doTest(frame, type) {
-  return new Promise(function(resolve) {
-    var id = ++lastCallbackId;
-    callbacks[id] = resolve;
-    frame.contentWindow.postMessage({id: id, type: type}, '*');
-  });
-}
-
-// Asks the service worker for data about requests and clients seen. The
-// worker posts a message back with |data| where:
-// |data.requests|: the requests the worker received FetchEvents for
-// |data.clients|: the URLs of all the worker's clients
-// The worker clears its data after responding.
-function getResultsFromWorker(worker) {
-  return new Promise(resolve => {
-    let channel = new MessageChannel();
-    channel.port1.onmessage = msg => {
-      resolve(msg.data);
-    };
-    worker.postMessage({port: channel.port2}, [channel.port2]);
-  });
-}
-
-window.onmessage = function (e) {
-  message = e.data;
-  let id = message['id'];
-  let callback = callbacks[id];
-  delete callbacks[id];
-  callback(message['result']);
-};
-
-const SCOPE = 'resources/sandboxed-iframe-fetch-event-iframe.py';
-const SCRIPT = 'resources/sandboxed-iframe-fetch-event-worker.js';
-const expected_base_url = new URL(SCOPE, location.href);
-// A service worker controlling |SCOPE|.
-let worker;
-// An iframe whose response header has
-// 'Content-Security-Policy: allow-scripts'.
-// This should NOT be controlled by a service worker.
-let sandboxed_frame_by_header;
-// An iframe whose response header has
-// 'Content-Security-Policy: allow-scripts allow-same-origin'.
-// This should be controlled by a service worker.
-let sandboxed_same_origin_frame_by_header;
-
-promise_test(t => {
-  return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
-    .then(function(registration) {
-      add_completion_callback(() => registration.unregister());
-      worker = registration.installing;
-      return wait_for_state(t, registration.installing, 'activated');
-    });
-}, 'Prepare a service worker.');
-
-promise_test(t => {
-  const iframe_full_url = expected_base_url + '?sandbox=allow-scripts&' +
-                          'sandboxed-frame-by-header';
-  return with_iframe(iframe_full_url)
-    .then(f => {
-      sandboxed_frame_by_header = f;
-      add_completion_callback(() => f.remove());
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'Service worker should provide the response');
-      assert_equals(requests[0], iframe_full_url);
-      assert_false(data.clients.includes(iframe_full_url),
-                   'Service worker should NOT control the sandboxed page');
-    });
-}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts.');
-
-promise_test(t => {
-  const iframe_full_url =
-    expected_base_url + '?sandbox=allow-scripts%20allow-same-origin&' +
-    'sandboxed-iframe-same-origin-by-header';
-  return with_iframe(iframe_full_url)
-    .then(f => {
-      sandboxed_same_origin_frame_by_header = f;
-      add_completion_callback(() => f.remove());
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1);
-      assert_equals(requests[0], iframe_full_url);
-      assert_true(data.clients.includes(iframe_full_url));
-    })
-}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and ' +
-   'allow-same-origin.');
-
-promise_test(t => {
-  let frame = sandboxed_frame_by_header;
-  return doTest(frame, 'fetch-from-worker')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      assert_equals(data.requests.length, 0,
-                    'The request should NOT be handled by SW.');
-    });
-}, 'Fetch request from a worker in iframe sandboxed by CSP HTTP header ' +
-   'allow-scripts flag');
-
-promise_test(t => {
-  let frame = sandboxed_same_origin_frame_by_header;
-  return doTest(frame, 'fetch-from-worker')
-    .then(result => {
-      assert_equals(result, 'done');
-      return getResultsFromWorker(worker);
-    })
-    .then(data => {
-      let requests = data.requests;
-      assert_equals(requests.length, 1,
-                    'The request should be handled by SW.');
-      assert_equals(requests[0], frame.src + '&test=fetch-from-worker');
-    });
-}, 'Fetch request from a worker in iframe sandboxed by CSP HTTP header ' +
-   'with allow-scripts and allow-same-origin flag');
-</script>
-</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/OWNERS b/third_party/WebKit/LayoutTests/external/wpt/streams/OWNERS
index 3ffd9fa..041c2b6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/streams/OWNERS
+++ b/third_party/WebKit/LayoutTests/external/wpt/streams/OWNERS
@@ -3,4 +3,3 @@
 # WPT-NOTIFY: true
 domenic@chromium.org
 ricea@chromium.org
-tyoshino@chromium.org
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward-expected.txt
index 8da030b..ff8f71c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward-expected.txt
@@ -28,6 +28,8 @@
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
 PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: abort should not happen until all queued writes complete assert_array_equals: abort should not be called before the second write completes property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
index 8da030b..ff8f71c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
@@ -28,6 +28,8 @@
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
 PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: abort should not happen until all queued writes complete assert_array_equals: abort should not be called before the second write completes property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
index 8da030b..ff8f71c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
@@ -28,6 +28,8 @@
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
 PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
 PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: abort should not happen until all queued writes complete assert_array_equals: abort should not be called before the second write completes property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt_automation/css/selectors/focus-visible-001-manual-automation.js b/third_party/WebKit/LayoutTests/external/wpt_automation/css/selectors/focus-visible-001-manual-automation.js
new file mode 100644
index 0000000..11137788
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt_automation/css/selectors/focus-visible-001-manual-automation.js
@@ -0,0 +1,5 @@
+importAutomationScript('/input-events/inputevent_common_input.js');
+
+function inject_input() {
+  return keyDown("Tab");
+};
diff --git a/third_party/WebKit/LayoutTests/fast/backgrounds/gradient-background-leakage-expected.png b/third_party/WebKit/LayoutTests/fast/backgrounds/gradient-background-leakage-expected.png
index d9758ed..1728352 100644
--- a/third_party/WebKit/LayoutTests/fast/backgrounds/gradient-background-leakage-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/backgrounds/gradient-background-leakage-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/backgrounds/svg-as-mask-expected.png b/third_party/WebKit/LayoutTests/fast/backgrounds/svg-as-mask-expected.png
index 7ecb4560..a766be8 100644
--- a/third_party/WebKit/LayoutTests/fast/backgrounds/svg-as-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/backgrounds/svg-as-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/border-radius-circle-expected.png b/third_party/WebKit/LayoutTests/fast/borders/border-radius-circle-expected.png
index e476af8..01c3b57 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/border-radius-circle-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/border-radius-circle-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/border-radius-different-width-001-expected.png b/third_party/WebKit/LayoutTests/fast/borders/border-radius-different-width-001-expected.png
index 6d2966c6..0066902 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/border-radius-different-width-001-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/border-radius-different-width-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed02-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed02-expected.png
index ada337f..053d96d 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed02-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed02-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed03-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed03-expected.png
index 4065e0f..5c0ac8e6 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed03-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed03-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed04-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed04-expected.png
index 5008f76b..dc21bc33 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed04-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed04-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed05-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed05-expected.png
index 9efe71e..b632fb4 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed05-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed05-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed06-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed06-expected.png
index ebb69c71..3301198 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed06-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed06-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted01-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted01-expected.png
index 5fef672..b0e39abd 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted01-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted01-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted02-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted02-expected.png
index 7a5509a..215b815 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted02-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted02-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted03-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted03-expected.png
index f1850805..ccf5b82 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted03-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted03-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted04-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted04-expected.png
index 167098e8e..2e0d02b4 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted04-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted04-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted06-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted06-expected.png
index f4d0513..076ab0d0 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted06-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDotted06-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble02-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble02-expected.png
index 59fa94b48..b00ce27da 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble02-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble02-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble03-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble03-expected.png
index 939746e..e0c244ba2 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble03-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDouble03-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid01-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid01-expected.png
index 2c9835a..3f2af29 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid01-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid01-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid02-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid02-expected.png
index dd6c40f7..d46aa49 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid02-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid02-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid03-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid03-expected.png
index 2f02c4a..2362d0e 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid03-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusSolid03-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/dotted-border-ajoining-thick-expected.png b/third_party/WebKit/LayoutTests/fast/borders/dotted-border-ajoining-thick-expected.png
index a6692d6..636540c 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/dotted-border-ajoining-thick-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/dotted-border-ajoining-thick-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/fieldsetBorderRadius-expected.png b/third_party/WebKit/LayoutTests/fast/borders/fieldsetBorderRadius-expected.png
index e65a841..889eb97 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/fieldsetBorderRadius-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/borders/fieldsetBorderRadius-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/mixed-border-styles-radius-expected.png b/third_party/WebKit/LayoutTests/fast/borders/mixed-border-styles-radius-expected.png
deleted file mode 100644
index 97b137d..0000000
--- a/third_party/WebKit/LayoutTests/fast/borders/mixed-border-styles-radius-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png
index 0175016..f9284048e 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
index d4bd2b981..7482fd0e 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-fill-expected.png
index 5323902..b8fdf6c 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-fill-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-expected.png
index 392a4a0d..25f6051 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-fill-expected.png
index 5f15f2c..1fc5a0545 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-fill-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-connecting-line-expected.png
index 5b305a15..e9b38cf4 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-connecting-line-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-connecting-line-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
index f46a177a..04be25950 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/downsample-quality-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/downsample-quality-expected.png
index 2d2c5c7..54c3794 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/downsample-quality-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/canvas/downsample-quality-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/css/border-radius-non-negative-expected.png b/third_party/WebKit/LayoutTests/fast/css/border-radius-non-negative-expected.png
index a188ce33..9efe110e 100644
--- a/third_party/WebKit/LayoutTests/fast/css/border-radius-non-negative-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/css/border-radius-non-negative-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png b/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
index 011c851..d9bfa81 100644
--- a/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png b/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
index 61d732d..f2c7166d 100644
--- a/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-Id.html b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-Id.html
new file mode 100644
index 0000000..362bf10f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-Id.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>RTCPeerConnection.id</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+promise_test(function() {
+  var pc = new RTCPeerConnection();
+  assert_equals(typeof pc.id, 'string');
+  return function(){};
+}, 'RTCPeerConnection.id is a string.');
+
+promise_test(function() {
+  var pc1 = new RTCPeerConnection();
+  var pc2 = new RTCPeerConnection();
+  assert_not_equals(pc1.id, pc2.id);
+  return function(){};
+}, 'RTCPeerConnection.id is unique between RTCPeerConnection objects.');
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/fast/text/mac-system-ui-trak.html b/third_party/WebKit/LayoutTests/fast/text/mac-system-ui-trak.html
index 7ef662f..1e13a83 100644
--- a/third_party/WebKit/LayoutTests/fast/text/mac-system-ui-trak.html
+++ b/third_party/WebKit/LayoutTests/fast/text/mac-system-ui-trak.html
@@ -9,48 +9,69 @@
 </style>
 <div id="testDivs"></div>
 <script>
-setup({ explicit_done: true });
-  test(function() {
+setup({
+  explicit_done: true
+});
 
-      for (var i = 10; i < 120; i += 10) {
-          containerDiv = document.createElement('div');
-          el = document.createElement('span');
-          el.classList += "macsystemfont";
-          el.style.fontSize = i + "px";
-          el.appendChild(document.createTextNode('YouWebTorrentVa'));
-          containerDiv.appendChild(el);
-          testDivs.appendChild(containerDiv);
-      }
+test(function() {
 
-      // Width to font size ratios from Safari for ".SF NS Text". If the ratio
-      // is not constant, this means letter spacing is not linearly changing
-      // with font size, which means varying tracking is applied. At font sizes
-      // above 78px, the tracking table ends and values become constant again.
-      var expectedRatios = [ 11.358723958333334,
-                             10.4921875,
-                             10.375,
-                             10.31640625,
-                             10.267578125,
-                             10.208984375,
-                             10.16015625,
-                             10.130859375,
-                             10.130859375,
-                             10.130859375,
-                             10.130859375,
-                             10.130859375 ];
+    // SFNSText's trak table cutoff boundaries are as follow, let's measure width to
+    // font size ratio at these font sizes.
+    // We expect to observe a non linear increase in width, due to tracking.
+    var trakTableFontSizes = [6.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0,
+      16.0, 17.0, 20.0, 22.0, 28.0, 32.0, 36.0, 50.0, 64.0, 80.0, 100.0, 138.0 ];
 
-      var theDivs = document.querySelectorAll(".macsystemfont");
-      assert_equals(theDivs.length, 11);
-      var kCssPixelsPerPoint = 96 / 72;
-      for (oneDiv of theDivs) {
-          var fontSize = parseFloat(getComputedStyle(oneDiv)['fontSize'],10);
-          var width = oneDiv.getBoundingClientRect().width;
-          var ptSize = fontSize / kCssPixelsPerPoint;
-          var ratio = width/ptSize;
-          var expectation = expectedRatios[fontSize / 10 - 1];
-          assert_less_than(Math.abs(ratio - expectation), 0.01);
-      }
-      testDivs.style.display = "none";
-  }, "Font size to width ratio should match Safari and stay constant above 78px, according to the font's trak table.");
+    for (var i = 0; i < trakTableFontSizes.length; i++) {
+      containerDiv = document.createElement('div');
+      el = document.createElement('span');
+      el.classList += "macsystemfont";
+      el.style.fontSize = trakTableFontSizes[i] + "px";
+      el.appendChild(document.createTextNode('YouWebTorrentVa'));
+      containerDiv.appendChild(el);
+      testDivs.appendChild(containerDiv);
+    }
+
+    // Width to font size ratios from Safari for ".SF NS Text". If the ratio
+    // is not constant, this means letter spacing is not linearly changing
+    // with font size, which means varying tracking is applied. At font sizes
+    // above 78px, the tracking table ends and values become constant again.
+    var expectedRatios = [11.873046875,
+      11.443359375,
+      11.306640625,
+      11.189453125,
+      11.072265625,
+      10.955078125,
+      10.857421875,
+      10.759765625,
+      10.681640625,
+      10.61328125,
+      10.159505208333334,
+      10.110677083333334,
+      10.052083333333334,
+      10.032552083333334,
+      10.013020833333334,
+      9.934895833333334,
+      9.856770833333334,
+      9.798177083333334,
+      9.798177083333334,
+      9.798177083333334
+    ];
+
+    var theDivs = document.querySelectorAll(".macsystemfont");
+    assert_equals(theDivs.length, expectedRatios.length);
+    var kCssPixelsPerPoint = 96 / 72;
+    for (var i = 0; i < theDivs.length; ++i) {
+      var fontSize = parseFloat(getComputedStyle(theDivs[i])[
+        'fontSize'], 10);
+      var width = theDivs[i].getBoundingClientRect().width;
+      var ptSize = fontSize / kCssPixelsPerPoint;
+      var ratio = width / ptSize;
+      var expectation = expectedRatios[i];
+      assert_less_than(Math.abs(ratio - expectation), 0.01);
+    }
+    testDivs.style.display = "none";
+  },
+  "Font size to width ratio should match Safari and stay constant above 80px, according to the font's trak table."
+);
 done();
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/text/variable-fonts/cff2-variations.html b/third_party/WebKit/LayoutTests/fast/text/variable-fonts/cff2-variations.html
new file mode 100644
index 0000000..cd0df2c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/text/variable-fonts/cff2-variations.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+    @font-face { font-family: AdobeVFProto; src: url(../../../third_party/AdobeVF/AdobeVFPrototype.otf); }
+    .dollar {
+    font-family: AdobeVFProto;
+    font-variation-settings: "wght" 900;
+    font-size: 200px;
+    }
+</style>
+<body>
+<p>The following should display as bold dollar sign with a non-contiguous vertical bar, only visible at the top and
+    bottom of the glyph:<p><div class="dollar">$</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/composited-iframe-alignment-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/composited-iframe-alignment-expected.txt
new file mode 100644
index 0000000..f719046
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/composited-iframe-alignment-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x60
+      LayoutText {#text} at (0,0) size 769x39
+        text run at (0,0) width 769: "Simple test of composited iframe content. There should be a blue box with a gray background inside the black border. The"
+        text run at (0,20) width 469: "gray background should fit perfectly within the block border with no gaps."
+      LayoutBR {BR} at (469,20) size 0x0
+      LayoutBR {BR} at (0,40) size 0x0
+layer at (100,100) size 440x340
+  LayoutIFrame (positioned) {IFRAME} at (100,100) size 440x340 [border: (20px solid #000000)]
+    layer at (0,0) size 400x300
+      LayoutView at (0,0) size 400x300
+    layer at (0,0) size 400x230
+      LayoutNGBlockFlow {HTML} at (0,0) size 400x230
+        LayoutNGBlockFlow {BODY} at (8,10) size 384x210 [bgcolor=#C0C0C0]
+    layer at (18,10) size 210x210
+      LayoutNGBlockFlow {DIV} at (10,0) size 210x210 [bgcolor=#0000FF]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/iframe-in-composited-layer-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/iframe-in-composited-layer-expected.txt
new file mode 100644
index 0000000..619e4ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/iframe-in-composited-layer-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+layer at (8,8) size 400x400
+  LayoutNGBlockFlow {DIV} at (0,0) size 400x400 [bgcolor=#FFFFE0]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (15,15) size 386x386
+  LayoutIFrame {IFRAME} at (7,7) size 386x386 [border: (3px solid #000000)]
+    layer at (0,0) size 380x380 clip at (0,0) size 365x365 scrollX 535.00 scrollY 535.00 scrollWidth 900 scrollHeight 900
+      LayoutView at (0,0) size 380x380
+    layer at (-535,-535) size 900x900 backgroundClip at (0,0) size 365x365 clip at (0,0) size 365x365
+      LayoutNGBlockFlow (relative positioned) {HTML} at (0,0) size 900x900
+        LayoutNGBlockFlow {BODY} at (8,8) size 884x884
+    layer at (-535,-535) size 100x100 backgroundClip at (0,0) size 365x365 clip at (0,0) size 365x365
+      LayoutNGBlockFlow (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+    layer at (265,265) size 100x100
+      LayoutNGBlockFlow (positioned) {DIV} at (800,800) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/nested-iframe-scrolling-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/nested-iframe-scrolling-expected.txt
new file mode 100644
index 0000000..a133f5d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/nested-iframe-scrolling-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (0,0) size 800x600
+      LayoutNGBlockFlow (anonymous) at (0,0) size 800x200
+        LayoutText {#text} at (0,0) size 0x0
+layer at (0,0) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+layer at (0,0) size 320x200
+  LayoutIFrame {IFRAME} at (0,0) size 320x200
+    layer at (0,0) size 320x200
+      LayoutView at (0,0) size 320x200
+    layer at (0,0) size 320x200
+      LayoutNGBlockFlow {HTML} at (0,0) size 320x200
+        LayoutNGBlockFlow {BODY} at (0,0) size 320x200
+          LayoutText {#text} at (0,0) size 0x0
+    layer at (0,0) size 300x150
+      LayoutIFrame {IFRAME} at (0,0) size 300x150
+        layer at (0,0) size 300x150 scrollY 100.00 scrollHeight 1100
+          LayoutView at (0,0) size 300x150
+        layer at (0,-100) size 300x1100 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
+          LayoutNGBlockFlow {HTML} at (0,0) size 300x1100
+            LayoutNGBlockFlow {BODY} at (0,100) size 300x1000
+              LayoutNGBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/massive-scale-interest-rect-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/massive-scale-interest-rect-expected.txt
index aeef8743..1853f15d 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/massive-scale-interest-rect-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/massive-scale-interest-rect-expected.txt
@@ -7,7 +7,7 @@
   LayoutNGBlockFlow {DIV} at (0,0) size 165x92
 layer at (8,8) size 1920x1080 backgroundClip at (8,8) size 165x92 clip at (8,8) size 165x92
   LayoutNGBlockFlow {DIV} at (0,0) size 1920x1080 [bgcolor=#0000FF]
-layer at (8,5008) size 300x300 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+layer at (8,5008) size 300x300 backgroundClip at (8,8) size 165x92 clip at (8,8) size 165x92
   LayoutNGBlockFlow (positioned) {DIV} at (0,5000) size 300x300
-layer at (8,5008) size 300x300 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+layer at (8,5008) size 300x300 backgroundClip at (8,8) size 165x92 clip at (8,8) size 165x92
   LayoutNGBlockFlow (positioned) {DIV} at (0,5000) size 300x300
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/ancestor-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/ancestor-overflow-expected.txt
new file mode 100644
index 0000000..7d4b054
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/ancestor-overflow-expected.txt
@@ -0,0 +1,54 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x434
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x434
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x410
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 458x19
+          text run at (0,0) width 458: "Test overflow clipping of composited elements in various configurations."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x374
+        LayoutText {#text} at (182,167) size 4x19
+          text run at (182,167) width 4: " "
+        LayoutText {#text} at (368,167) size 4x19
+          text run at (368,167) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (554,167) size 0x0
+        LayoutText {#text} at (182,354) size 4x19
+          text run at (182,354) width 4: " "
+        LayoutText {#text} at (368,354) size 4x19
+          text run at (368,354) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+layer at (28,72) size 142x142 clip at (29,73) size 140x140 scrollHeight 171
+  LayoutNGBlockFlow {DIV} at (20,20) size 142x142 [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (11,11) size 122x122 [border: (1px solid #0000FF)]
+layer at (214,72) size 142x142 clip at (215,73) size 140x140
+  LayoutNGBlockFlow {DIV} at (206,20) size 142x142 [border: (1px solid #000000)]
+layer at (28,259) size 142x142 clip at (29,260) size 140x140 scrollHeight 171
+  LayoutNGBlockFlow {DIV} at (20,207) size 142x142 [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (11,11) size 122x122 [border: (1px solid #0000FF)]
+layer at (214,259) size 142x142 clip at (215,260) size 140x140
+  LayoutNGBlockFlow {DIV} at (206,207) size 142x142 [border: (1px solid #000000)]
+layer at (50,94) size 100x150 backgroundClip at (29,73) size 140x140 clip at (29,73) size 140x140
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
+layer at (225,83) size 122x122
+  LayoutNGBlockFlow (positioned) {DIV} at (225,83) size 122x122 [border: (1px solid #0000FF)]
+layer at (236,94) size 100x150
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
+layer at (400,72) size 142x142 clip at (401,73) size 140x140 scrollHeight 171
+  LayoutNGBlockFlow (relative positioned) {DIV} at (392,20) size 142x142 [border: (1px solid #000000)]
+layer at (411,83) size 122x122
+  LayoutNGBlockFlow (positioned) {DIV} at (11,11) size 122x122 [border: (1px solid #0000FF)]
+layer at (422,94) size 100x150 backgroundClip at (401,73) size 140x140 clip at (401,73) size 140x140
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
+layer at (50,281) size 100x150 backgroundClip at (29,260) size 140x140 clip at (29,260) size 140x140
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
+layer at (225,270) size 122x122
+  LayoutNGBlockFlow (positioned) {DIV} at (225,270) size 122x122 [border: (1px solid #0000FF)]
+layer at (236,281) size 100x150
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
+layer at (400,259) size 142x142 clip at (401,260) size 140x140 scrollHeight 171
+  LayoutNGBlockFlow (relative positioned) {DIV} at (392,207) size 142x142 [border: (1px solid #000000)]
+layer at (411,270) size 122x122
+  LayoutNGBlockFlow (positioned) {DIV} at (11,11) size 122x122 [border: (1px solid #0000FF)]
+layer at (422,281) size 100x150 backgroundClip at (401,260) size 140x140 clip at (401,260) size 140x140
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x150 [bgcolor=#808080]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-compositing-descendant-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-compositing-descendant-expected.txt
new file mode 100644
index 0000000..822c014a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x52
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x52
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x20
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 466x19
+          text run at (0,0) width 466: "You should see a green box under the video. If you see red, the test failed."
+layer at (8,52) size 132x222 clip at (9,53) size 130x220
+  LayoutNGBlockFlow (positioned) {DIV} at (8,52) size 132x222 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    LayoutNGBlockFlow (anonymous) at (11,11) size 110x105
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutNGBlockFlow {DIV} at (11,116) size 100x100 [bgcolor=#FF0000]
+layer at (19,63) size 100x100
+  LayoutVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000]
+layer at (19,63) size 100x100
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100
+    LayoutNGBlockFlow {DIV} at (0,68) size 100x32
+layer at (19,63) size 100x58
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x58
+layer at (19,168) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (11,116) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-scroll-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-scroll-expected.txt
new file mode 100644
index 0000000..f74f0a60
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-scroll-expected.txt
@@ -0,0 +1,126 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x591
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x591
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x567
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 242x19
+          text run at (0,0) width 242: "All of the boxes should look the same."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x531
+        LayoutText {#text} at (172,157) size 4x19
+          text run at (172,157) width 4: " "
+        LayoutText {#text} at (348,157) size 4x19
+          text run at (348,157) width 4: " "
+        LayoutText {#text} at (524,157) size 4x19
+          text run at (524,157) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (700,157) size 0x0
+        LayoutText {#text} at (172,334) size 4x19
+          text run at (172,334) width 4: " "
+        LayoutText {#text} at (348,334) size 4x19
+          text run at (348,334) width 4: " "
+        LayoutText {#text} at (524,334) size 4x19
+          text run at (524,334) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (700,334) size 0x0
+        LayoutText {#text} at (172,511) size 4x19
+          text run at (172,511) width 4: " "
+        LayoutText {#text} at (348,511) size 4x19
+          text run at (348,511) width 4: " "
+        LayoutText {#text} at (524,511) size 4x19
+          text run at (524,511) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+layer at (18,62) size 152x152 clip at (19,63) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (10,10) size 152x152 [border: (1px solid #000000)]
+layer at (194,62) size 152x152 clip at (195,63) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (186,10) size 152x152 [border: (1px solid #000000)]
+layer at (19,13) size 210x510 backgroundClip at (19,63) size 135x135 clip at (19,63) size 135x135
+  LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (195,13) size 210x510 backgroundClip at (195,63) size 135x135 clip at (195,63) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (370,62) size 152x152 clip at (371,63) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (362,10) size 152x152 [border: (1px solid #000000)]
+layer at (371,13) size 210x510 backgroundClip at (371,63) size 135x135 clip at (371,63) size 135x135
+  LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (546,62) size 152x152 clip at (547,63) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (538,10) size 152x152 [border: (1px solid #000000)]
+layer at (547,13) size 210x510 backgroundClip at (547,63) size 135x135 clip at (547,63) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (18,239) size 152x152 clip at (19,240) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (10,187) size 152x152 [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+      LayoutNGBlockFlow {P} at (5,29) size 200x56
+        LayoutText {#text} at (0,0) size 194x55
+          text run at (0,0) width 194: "This is the inner div"
+          text run at (0,28) width 112: "that scrolls."
+layer at (194,239) size 152x152 clip at (195,240) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (186,187) size 152x152 [border: (1px solid #000000)]
+layer at (195,190) size 210x510 backgroundClip at (195,240) size 135x135 clip at (195,240) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (370,239) size 152x152 clip at (371,240) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (362,187) size 152x152 [border: (1px solid #000000)]
+layer at (371,190) size 210x510 backgroundClip at (371,240) size 135x135 clip at (371,240) size 135x135
+  LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (546,239) size 152x152 clip at (547,240) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow {DIV} at (538,187) size 152x152 [border: (1px solid #000000)]
+layer at (547,190) size 210x510 backgroundClip at (547,240) size 135x135 clip at (547,240) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (18,416) size 152x152 clip at (19,417) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (10,364) size 152x152 [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+      LayoutNGBlockFlow {P} at (5,29) size 200x56
+        LayoutText {#text} at (0,0) size 194x55
+          text run at (0,0) width 194: "This is the inner div"
+          text run at (0,28) width 112: "that scrolls."
+layer at (194,416) size 152x152 clip at (195,417) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (186,364) size 152x152 [border: (1px solid #000000)]
+layer at (195,367) size 210x510 backgroundClip at (195,417) size 135x135 clip at (195,417) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (370,416) size 152x152 clip at (371,417) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (362,364) size 152x152 [border: (1px solid #000000)]
+layer at (371,367) size 210x510 backgroundClip at (371,417) size 135x135 clip at (371,417) size 135x135
+  LayoutNGBlockFlow {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
+layer at (546,416) size 152x152 clip at (547,417) size 135x135 scrollY 50.00 scrollWidth 210 scrollHeight 510
+  LayoutNGBlockFlow (relative positioned) {DIV} at (538,364) size 152x152 [border: (1px solid #000000)]
+layer at (547,367) size 210x510 backgroundClip at (547,417) size 135x135 clip at (547,417) size 135x135
+  LayoutNGBlockFlow (relative positioned) {DIV} at (1,1) size 210x510 [bgcolor=#808080]
+    LayoutNGBlockFlow {P} at (5,29) size 200x56
+      LayoutText {#text} at (0,0) size 194x55
+        text run at (0,0) width 194: "This is the inner div"
+        text run at (0,28) width 112: "that scrolls."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/parent-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/parent-overflow-expected.txt
new file mode 100644
index 0000000..8255bbc0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/parent-overflow-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x227
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x227
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x203
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 362x19
+          text run at (0,0) width 362: "Gray box should be clipped by black border in each case."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x167
+        LayoutText {#text} at (162,147) size 4x19
+          text run at (162,147) width 4: " "
+        LayoutText {#text} at (328,147) size 4x19
+          text run at (328,147) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+layer at (28,72) size 122x122 clip at (29,73) size 120x120 scrollHeight 310
+  LayoutNGBlockFlow {DIV} at (20,20) size 122x122 [border: (1px solid #000000)]
+layer at (39,83) size 100x300 backgroundClip at (29,73) size 120x120 clip at (29,73) size 120x120
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x300 [bgcolor=#808080]
+layer at (194,72) size 122x122 clip at (195,73) size 120x120 scrollHeight 310
+  LayoutNGBlockFlow (relative positioned) {DIV} at (186,20) size 122x122 [border: (1px solid #000000)]
+layer at (205,83) size 100x300 backgroundClip at (195,73) size 120x120 clip at (195,73) size 120x120
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x300 [bgcolor=#808080]
+layer at (360,72) size 122x122 clip at (361,73) size 120x120 scrollHeight 310
+  LayoutNGBlockFlow (relative positioned) {DIV} at (352,20) size 122x122 [border: (1px solid #000000)]
+layer at (371,83) size 100x300 backgroundClip at (361,73) size 120x120 clip at (361,73) size 120x120
+  LayoutNGBlockFlow {DIV} at (11,11) size 100x300 [bgcolor=#808080]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/scroll-ancestor-update-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/scroll-ancestor-update-expected.txt
new file mode 100644
index 0000000..07aad48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x105
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x105
+    LayoutNGBlockFlow {BODY} at (0,0) size 800x105
+      LayoutNGBlockFlow (anonymous) at (0,0) size 800x105
+        LayoutText {#text} at (0,0) size 0x0
+layer at (0,0) size 100x100
+  LayoutVideo {VIDEO} at (0,0) size 100x100
+layer at (50,50) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (50,50) size 100x100 [bgcolor=#FF0000]
+layer at (50,50) size 200x200
+  LayoutNGBlockFlow (positioned) {DIV} at (50,50) size 200x200
+    LayoutNGBlockFlow {P} at (0,218) size 200x60
+      LayoutText {#text} at (0,0) size 191x59
+        text run at (0,0) width 191: "The green box should obscure"
+        text run at (0,20) width 180: "the red box, and move when"
+        text run at (0,40) width 141: "you drag the scrollbar."
+layer at (50,50) size 202x202 clip at (51,51) size 185x200 scrollY 50.00 scrollHeight 550
+  LayoutNGBlockFlow {DIV} at (0,0) size 202x202 [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (1,51) size 185x500
+layer at (51,51) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (0,0) size 100x100
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100
+    LayoutNGBlockFlow {DIV} at (0,68) size 100x32
+layer at (0,0) size 100x58
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x58
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/comments-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/comments-expected.txt
new file mode 100644
index 0000000..aa11b21
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/comments-expected.txt
@@ -0,0 +1,101 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 921
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x921 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x921
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x905 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x240
+        LayoutText {#text} at (0,0) size 336x224
+          text run at (0,0) width 232: "/* This is a CSS1 comment. */"
+          text run at (232,0) width 0: " "
+          text run at (0,16) width 336: ".one {color: green;} /* Another comment */"
+          text run at (336,16) width 0: " "
+          text run at (0,32) width 288: "/* The following should not be used:"
+          text run at (288,32) width 0: " "
+          text run at (0,48) width 168: ".two {color: red;} */"
+          text run at (168,48) width 0: " "
+          text run at (0,64) width 320: ".three {color: green; /* color: red; */}"
+          text run at (320,64) width 0: " "
+          text run at (0,80) width 24: "/**"
+          text run at (24,80) width 0: " "
+          text run at (0,96) width 176: ".four {color: red;} */"
+          text run at (176,96) width 0: " "
+          text run at (0,112) width 168: ".five {color: green;}"
+          text run at (168,112) width 0: " "
+          text run at (0,128) width 32: "/**/"
+          text run at (32,128) width 0: " "
+          text run at (0,144) width 160: ".six {color: green;}"
+          text run at (160,144) width 0: " "
+          text run at (0,160) width 88: "/*********/"
+          text run at (88,160) width 0: " "
+          text run at (0,176) width 176: ".seven {color: green;}"
+          text run at (176,176) width 0: " "
+          text run at (0,192) width 128: "/* a comment **/"
+          text run at (128,192) width 0: " "
+          text run at (0,208) width 176: ".eight {color: green;}"
+          text run at (176,208) width 0: " "
+          text run at (0,224) width 0: " "
+      LayoutNGBlockFlow {P} at (0,307) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,343) size 769x20
+        LayoutText {#text} at (0,0) size 193x19
+          text run at (0,0) width 193: "This sentence should be black."
+      LayoutNGBlockFlow {P} at (0,379) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,415) size 769x20
+        LayoutText {#text} at (0,0) size 193x19
+          text run at (0,0) width 193: "This sentence should be black."
+      LayoutNGBlockFlow {P} at (0,451) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,487) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,523) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,559) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutTable {TABLE} at (0,595) size 216x310 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 214x308
+          LayoutTableRow {TR} at (0,0) size 214x28
+            LayoutNGTableCell {TD} at (0,0) size 214x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 214x280
+            LayoutNGTableCell {TD} at (0,154) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,130) size 4x19
+                text run at (4,130) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 202x280 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,40) size 194x20
+                LayoutText {#text} at (0,0) size 193x19
+                  text run at (0,0) width 193: "This sentence should be black."
+              LayoutNGBlockFlow {P} at (4,76) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,112) size 194x20
+                LayoutText {#text} at (0,0) size 193x19
+                  text run at (0,0) width 193: "This sentence should be black."
+              LayoutNGBlockFlow {P} at (4,148) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,184) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,220) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,256) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+layer at (8,297) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,289) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/grouping-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/grouping-expected.txt
new file mode 100644
index 0000000..e55cde2b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/grouping-expected.txt
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x32
+        LayoutText {#text} at (0,0) size 272x16
+          text run at (0,0) width 272: ".one, .two, .three {color: green;}"
+          text run at (272,0) width 0: " "
+          text run at (0,16) width 0: " "
+      LayoutNGBlockFlow {P} at (0,99) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,135) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,171) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutTable {TABLE} at (0,207) size 216x130 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 214x128
+          LayoutTableRow {TR} at (0,0) size 214x28
+            LayoutNGTableCell {TD} at (0,0) size 214x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 214x100
+            LayoutNGTableCell {TD} at (0,64) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,40) size 4x19
+                text run at (4,40) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 202x100 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,40) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,76) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+layer at (8,89) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,81) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/inheritance-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/inheritance-expected.txt
new file mode 100644
index 0000000..e4740caf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/inheritance-expected.txt
@@ -0,0 +1,190 @@
+layer at (0,0) size 800x600 scrollHeight 768
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x768 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x767.59
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x751.59 [color=#008000] [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x112
+        LayoutText {#text} at (0,0) size 272x112
+          text run at (0,0) width 160: "BODY {color: green;}"
+          text run at (160,0) width 0: " "
+          text run at (0,16) width 136: "H3 {color: blue;}"
+          text run at (136,16) width 0: " "
+          text run at (0,32) width 152: "EM {color: purple;}"
+          text run at (152,32) width 0: " "
+          text run at (0,48) width 208: ".one {font-style: italic;}"
+          text run at (208,48) width 0: " "
+          text run at (0,64) width 272: ".two {text-decoration: underline;}"
+          text run at (272,64) width 0: " "
+          text run at (0,80) width 152: "#two {color: navy;}"
+          text run at (152,80) width 0: " "
+          text run at (0,96) width 184: ".three {color: purple;}"
+          text run at (184,96) width 0: " "
+      LayoutNGBlockFlow {H3} at (0,181.72) size 784x24 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 220x22
+          text run at (0,0) width 220: "This sentence should show "
+        LayoutInline {STRONG} at (0,0) size 35x22
+          LayoutText {#text} at (220,0) size 35x22
+            text run at (220,0) width 35: "blue"
+        LayoutText {#text} at (255,0) size 42x22
+          text run at (255,0) width 42: " and "
+        LayoutInline {EM} at (0,0) size 51x22 [color=#800080]
+          LayoutText {#text} at (297,1) size 51x22
+            text run at (297,1) width 51: "purple"
+        LayoutText {#text} at (348,0) size 5x22
+          text run at (348,0) width 5: "."
+      LayoutNGBlockFlow {H3} at (0,224.44) size 784x24 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 197x22
+          text run at (0,0) width 197: "This sentence should be "
+        LayoutInline {SPAN} at (0,0) size 34x22
+          LayoutText {#text} at (197,1) size 34x22
+            text run at (197,1) width 34: "blue"
+        LayoutText {#text} at (231,0) size 104x22
+          text run at (231,0) width 104: " throughout."
+      LayoutNGBlockFlow {P} at (0,267.16) size 784x20
+        LayoutText {#text} at (0,0) size 226x19
+          text run at (0,0) width 226: "This should be green except for the "
+        LayoutInline {EM} at (0,0) size 117x19 [color=#800080]
+          LayoutText {#text} at (226,0) size 117x19
+            text run at (226,0) width 117: "emphasized words"
+        LayoutText {#text} at (342,0) size 161x19
+          text run at (342,0) width 161: ", which should be purple."
+      LayoutNGBlockFlow {H3} at (0,305.88) size 784x23 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 296x22
+          text run at (0,0) width 296: "This should be blue and underlined."
+      LayoutNGBlockFlow {P} at (0,347.59) size 784x20
+        LayoutText {#text} at (0,0) size 293x19
+          text run at (0,0) width 293: "This sentence should be underlined, including "
+        LayoutInline {TT} at (0,0) size 72x16
+          LayoutText {#text} at (293,3) size 72x16
+            text run at (293,3) width 72: "this part"
+        LayoutText {#text} at (365,0) size 8x19
+          text run at (365,0) width 8: ", "
+        LayoutInline {I} at (0,0) size 52x19
+          LayoutText {#text} at (373,0) size 52x19
+            text run at (373,0) width 52: "this part"
+        LayoutText {#text} at (425,0) size 8x19
+          text run at (425,0) width 8: ", "
+        LayoutInline {EM} at (0,0) size 52x19 [color=#800080]
+          LayoutText {#text} at (433,0) size 52x19
+            text run at (433,0) width 52: "this part"
+        LayoutText {#text} at (485,0) size 35x19
+          text run at (485,0) width 35: ", and "
+        LayoutInline {STRONG} at (0,0) size 57x19
+          LayoutText {#text} at (520,0) size 57x19
+            text run at (520,0) width 57: "this part"
+        LayoutText {#text} at (577,0) size 4x19
+          text run at (577,0) width 4: "."
+      LayoutNGBlockFlow {P} at (0,383.59) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 436x19
+          text run at (0,0) width 436: "This sentence should also be underlined, as well as dark blue (navy), "
+        LayoutInline {TT} at (0,0) size 152x16
+          LayoutText {#text} at (436,3) size 152x16
+            text run at (436,3) width 152: "including this part"
+        LayoutText {#text} at (588,0) size 4x19
+          text run at (588,0) width 4: "."
+      LayoutNGBlockFlow {P} at (0,419.59) size 784x20 [color=#800080]
+        LayoutText {#text} at (0,0) size 266x19
+          text run at (0,0) width 266: "This sentence should be purple, including "
+        LayoutInline {STRONG} at (0,0) size 57x19
+          LayoutText {#text} at (266,0) size 57x19
+            text run at (266,0) width 57: "this part"
+        LayoutText {#text} at (323,0) size 31x19
+          text run at (323,0) width 31: " and "
+        LayoutInline {SPAN} at (0,0) size 173x19
+          LayoutText {#text} at (354,0) size 173x19
+            text run at (354,0) width 173: "this part (which is spanned)"
+        LayoutText {#text} at (527,0) size 4x19
+          text run at (527,0) width 4: "."
+      LayoutTable {TABLE} at (0,455.59) size 614x296 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 612x294
+          LayoutTableRow {TR} at (0,0) size 612x28
+            LayoutNGTableCell {TD} at (0,0) size 612x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 612x266
+            LayoutNGTableCell {TD} at (0,147) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,123) size 4x19
+                text run at (4,123) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 600x265.88 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H3} at (4,4) size 592x24 [color=#0000FF]
+                LayoutText {#text} at (0,0) size 220x22
+                  text run at (0,0) width 220: "This sentence should show "
+                LayoutInline {STRONG} at (0,0) size 35x22
+                  LayoutText {#text} at (220,0) size 35x22
+                    text run at (220,0) width 35: "blue"
+                LayoutText {#text} at (255,0) size 42x22
+                  text run at (255,0) width 42: " and "
+                LayoutInline {EM} at (0,0) size 51x22 [color=#800080]
+                  LayoutText {#text} at (297,1) size 51x22
+                    text run at (297,1) width 51: "purple"
+                LayoutText {#text} at (348,0) size 5x22
+                  text run at (348,0) width 5: "."
+              LayoutNGBlockFlow {H3} at (4,46.72) size 592x24 [color=#0000FF]
+                LayoutText {#text} at (0,0) size 197x22
+                  text run at (0,0) width 197: "This sentence should be "
+                LayoutInline {SPAN} at (0,0) size 34x22
+                  LayoutText {#text} at (197,1) size 34x22
+                    text run at (197,1) width 34: "blue"
+                LayoutText {#text} at (231,0) size 104x22
+                  text run at (231,0) width 104: " throughout."
+              LayoutNGBlockFlow {P} at (4,89.44) size 592x20
+                LayoutText {#text} at (0,0) size 226x19
+                  text run at (0,0) width 226: "This should be green except for the "
+                LayoutInline {EM} at (0,0) size 117x19 [color=#800080]
+                  LayoutText {#text} at (226,0) size 117x19
+                    text run at (226,0) width 117: "emphasized words"
+                LayoutText {#text} at (342,0) size 161x19
+                  text run at (342,0) width 161: ", which should be purple."
+              LayoutNGBlockFlow {H3} at (4,128.16) size 592x23 [color=#0000FF]
+                LayoutText {#text} at (0,0) size 296x22
+                  text run at (0,0) width 296: "This should be blue and underlined."
+              LayoutNGBlockFlow {P} at (4,169.88) size 592x20
+                LayoutText {#text} at (0,0) size 293x19
+                  text run at (0,0) width 293: "This sentence should be underlined, including "
+                LayoutInline {TT} at (0,0) size 72x16
+                  LayoutText {#text} at (293,3) size 72x16
+                    text run at (293,3) width 72: "this part"
+                LayoutText {#text} at (365,0) size 8x19
+                  text run at (365,0) width 8: ", "
+                LayoutInline {I} at (0,0) size 52x19
+                  LayoutText {#text} at (373,0) size 52x19
+                    text run at (373,0) width 52: "this part"
+                LayoutText {#text} at (425,0) size 8x19
+                  text run at (425,0) width 8: ", "
+                LayoutInline {EM} at (0,0) size 52x19 [color=#800080]
+                  LayoutText {#text} at (433,0) size 52x19
+                    text run at (433,0) width 52: "this part"
+                LayoutText {#text} at (485,0) size 35x19
+                  text run at (485,0) width 35: ", and "
+                LayoutInline {STRONG} at (0,0) size 57x19
+                  LayoutText {#text} at (520,0) size 57x19
+                    text run at (520,0) width 57: "this part"
+                LayoutText {#text} at (577,0) size 4x19
+                  text run at (577,0) width 4: "."
+              LayoutNGBlockFlow {P} at (4,205.88) size 592x20 [color=#000080]
+                LayoutText {#text} at (0,0) size 436x19
+                  text run at (0,0) width 436: "This sentence should also be underlined, as well as dark blue (navy), "
+                LayoutInline {TT} at (0,0) size 152x16
+                  LayoutText {#text} at (436,3) size 152x16
+                    text run at (436,3) width 152: "including this part"
+                LayoutText {#text} at (588,0) size 4x19
+                  text run at (588,0) width 4: "."
+              LayoutNGBlockFlow {P} at (4,241.88) size 592x20 [color=#800080]
+                LayoutText {#text} at (0,0) size 266x19
+                  text run at (0,0) width 266: "This sentence should be purple, including "
+                LayoutInline {STRONG} at (0,0) size 57x19
+                  LayoutText {#text} at (266,0) size 57x19
+                    text run at (266,0) width 57: "this part"
+                LayoutText {#text} at (323,0) size 31x19
+                  text run at (323,0) width 31: " and "
+                LayoutInline {SPAN} at (0,0) size 173x19
+                  LayoutText {#text} at (354,0) size 173x19
+                    text run at (354,0) width 173: "this part (which is spanned)"
+                LayoutText {#text} at (527,0) size 4x19
+                  text run at (527,0) width 4: "."
+layer at (8,169) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,161) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border-expected.txt
new file mode 100644
index 0000000..d1874ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border-expected.txt
@@ -0,0 +1,183 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1475
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1475 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1475
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1459 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x144
+        LayoutText {#text} at (0,0) size 272x144
+          text run at (0,0) width 272: ".one {border: medium black solid;}"
+          text run at (272,0) width 0: " "
+          text run at (0,16) width 264: ".two {border: thin maroon ridge;}"
+          text run at (264,16) width 0: " "
+          text run at (0,32) width 272: ".three {border: 10px teal outset;}"
+          text run at (272,32) width 0: " "
+          text run at (0,48) width 264: ".four {border: 10px olive inset;}"
+          text run at (264,48) width 0: " "
+          text run at (0,64) width 224: ".five {border: 10px maroon;}"
+          text run at (224,64) width 0: " "
+          text run at (0,80) width 232: ".six {border: maroon double;}"
+          text run at (232,80) width 0: " "
+          text run at (0,96) width 256: ".seven {border: left red solid;}"
+          text run at (256,96) width 0: " "
+          text run at (0,112) width 168: ".eight {border: 0px;}"
+          text run at (168,112) width 0: " "
+          text run at (0,128) width 232: "TD {border: 2px solid green;}"
+          text run at (232,128) width 0: " "
+      LayoutNGBlockFlow {P} at (0,211) size 769x40
+        LayoutText {#text} at (0,0) size 748x39
+          text run at (0,0) width 748: "Note that all table cells on this page should have a two-pixel solid green border along all four sides. This border applies"
+          text run at (0,20) width 317: "only to the cells, not the rows which contain them."
+      LayoutNGBlockFlow {P} at (0,267) size 769x26 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 483x19
+          text run at (3,3) width 483: "This paragraph should have a medium black solid border all the way around."
+      LayoutNGBlockFlow {P} at (0,309) size 769x22 [border: (1px ridge #800000)]
+        LayoutText {#text} at (1,1) size 480x19
+          text run at (1,1) width 480: "This paragraph should have a thin maroon ridged border all the way around."
+      LayoutNGBlockFlow {P} at (0,347) size 769x40 [border: (10px outset #008080)]
+        LayoutText {#text} at (10,10) size 518x19
+          text run at (10,10) width 518: "This paragraph should have a ten-pixel-wide teal outset border all the way around."
+      LayoutNGBlockFlow {P} at (0,403) size 769x40 [border: (10px inset #808000)]
+        LayoutText {#text} at (10,10) size 519x19
+          text run at (10,10) width 519: "This paragraph should have a ten-pixel-wide olive inset border all the way around."
+      LayoutNGBlockFlow {P} at (0,459) size 769x20
+        LayoutText {#text} at (0,0) size 348x19
+          text run at (0,0) width 348: "This paragraph should have no border around it, as the "
+        LayoutInline {TT} at (0,0) size 96x16
+          LayoutText {#text} at (348,3) size 96x16
+            text run at (348,3) width 96: "border-style"
+        LayoutText {#text} at (444,0) size 322x19
+          text run at (444,0) width 322: " was not set, and it should not be offset in any way."
+      LayoutNGBlockFlow {P} at (0,495) size 769x46 [border: (3px double #800000)]
+        LayoutText {#text} at (3,3) size 535x19
+          text run at (3,3) width 535: "This paragraph should have a medium maroon double border around it, even though "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (538,6) size 96x16
+            text run at (538,6) width 96: "border-width"
+        LayoutText {#text} at (634,3) size 746x39
+          text run at (634,3) width 115: " was not explicitly"
+          text run at (3,23) width 21: "set."
+      LayoutNGBlockFlow {P} at (0,557) size 769x20
+        LayoutText {#text} at (0,0) size 621x19
+          text run at (0,0) width 621: "This paragraph should have no border around it, as its declaration is invalid and should be ignored."
+      LayoutNGBlockFlow {P} at (0,593) size 769x20
+        LayoutInline {A} at (0,0) size 25x19
+          LayoutText {#text} at (0,0) size 25x19
+            text run at (0,0) width 25: "The"
+        LayoutText {#text} at (25,0) size 715x19
+          text run at (25,0) width 715: " following image is also an anchor which points to a target on this page, but it should not have a border around it: "
+        LayoutInline {A} at (0,0) size 16x15 [color=#0000FF]
+          LayoutImage {IMG} at (739.72,0) size 15x15
+        LayoutText {#text} at (754,0) size 5x19
+          text run at (754,0) width 5: "."
+      LayoutTable {TABLE} at (0,629) size 769x121 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x119
+          LayoutTableRow {TR} at (0,5) size 767x46
+            LayoutNGTableCell {TD} at (5,5) size 757x46 [border: (2px solid #008000)] [r=0 c=0 rs=1 cs=2]
+              LayoutText {#text} at (3,3) size 710x39
+                text run at (3,3) width 710: "Every cell in this table should have a 2-pixel solid green border. This is also true of the table-testing section in the"
+                text run at (3,23) width 175: "second half of the test page."
+          LayoutTableRow {TR} at (0,56) size 767x58
+            LayoutNGTableCell {TD} at (5,72) size 194x26 [border: (2px solid #008000)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (3,19) size 53x19
+                text run at (3,19) width 53: "Cell one"
+            LayoutNGTableCell {TD} at (204,56) size 558x58 [border: (2px solid #008000)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow (anonymous) at (3,3) size 552x20
+                LayoutText {#text} at (0,0) size 54x19
+                  text run at (0,0) width 54: "Cell two"
+              LayoutTable {TABLE} at (3,23) size 163x32 [border: (1px outset #808080)]
+                LayoutTableSection {TBODY} at (1,1) size 161x30
+                  LayoutTableRow {TR} at (0,2) size 161x26
+                    LayoutNGTableCell {TD} at (2,2) size 157x26 [border: (2px solid #008000)] [r=0 c=0 rs=1 cs=1]
+                      LayoutText {#text} at (3,3) size 151x19
+                        text run at (3,3) width 151: "Nested single-cell table!"
+      LayoutNGBlockFlow {P} at (0,766) size 769x20
+        LayoutText {#text} at (0,0) size 175x19
+          text run at (0,0) width 175: "This is an unstyled element."
+      LayoutTable {TABLE} at (0,802) size 769x657 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x655
+          LayoutTableRow {TR} at (0,0) size 767x30
+            LayoutNGTableCell {TD} at (0,0) size 767x30 [bgcolor=#C0C0C0] [border: (2px solid #008000)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (5,5) size 161x19
+                  text run at (5,5) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,30) size 767x625
+            LayoutNGTableCell {TD} at (0,327) size 14x30 [bgcolor=#C0C0C0] [border: (2px solid #008000)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (5,302) size 4x19
+                text run at (5,302) width 4: " "
+            LayoutNGTableCell {TD} at (14,30) size 753x625 [border: (2px solid #008000)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (5,5) size 743x40
+                LayoutText {#text} at (0,0) size 700x39
+                  text run at (0,0) width 700: "Note that all table cells on this page should have a two-pixel solid green border along all four sides. This border"
+                  text run at (0,20) width 365: "applies only to the cells, not the rows which contain them."
+              LayoutNGBlockFlow {P} at (5,61) size 743x26 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 483x19
+                  text run at (3,3) width 483: "This paragraph should have a medium black solid border all the way around."
+              LayoutNGBlockFlow {P} at (5,103) size 743x22 [border: (1px ridge #800000)]
+                LayoutText {#text} at (1,1) size 480x19
+                  text run at (1,1) width 480: "This paragraph should have a thin maroon ridged border all the way around."
+              LayoutNGBlockFlow {P} at (5,141) size 743x40 [border: (10px outset #008080)]
+                LayoutText {#text} at (10,10) size 518x19
+                  text run at (10,10) width 518: "This paragraph should have a ten-pixel-wide teal outset border all the way around."
+              LayoutNGBlockFlow {P} at (5,197) size 743x40 [border: (10px inset #808000)]
+                LayoutText {#text} at (10,10) size 519x19
+                  text run at (10,10) width 519: "This paragraph should have a ten-pixel-wide olive inset border all the way around."
+              LayoutNGBlockFlow {P} at (5,253) size 743x40
+                LayoutText {#text} at (0,0) size 348x19
+                  text run at (0,0) width 348: "This paragraph should have no border around it, as the "
+                LayoutInline {TT} at (0,0) size 96x16
+                  LayoutText {#text} at (348,3) size 96x16
+                    text run at (348,3) width 96: "border-style"
+                LayoutText {#text} at (444,0) size 732x39
+                  text run at (444,0) width 288: " was not set, and it should not be offset in any"
+                  text run at (0,20) width 30: "way."
+              LayoutNGBlockFlow {P} at (5,309) size 743x46 [border: (3px double #800000)]
+                LayoutText {#text} at (3,3) size 535x19
+                  text run at (3,3) width 535: "This paragraph should have a medium maroon double border around it, even though "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (538,6) size 96x16
+                    text run at (538,6) width 96: "border-width"
+                LayoutText {#text} at (634,3) size 684x39
+                  text run at (634,3) width 53: " was not"
+                  text run at (3,23) width 83: "explicitly set."
+              LayoutNGBlockFlow {P} at (5,371) size 743x20
+                LayoutText {#text} at (0,0) size 621x19
+                  text run at (0,0) width 621: "This paragraph should have no border around it, as its declaration is invalid and should be ignored."
+              LayoutNGBlockFlow {P} at (5,407) size 743x40
+                LayoutInline {A} at (0,0) size 25x19
+                  LayoutText {#text} at (0,0) size 25x19
+                    text run at (0,0) width 25: "The"
+                LayoutText {#text} at (25,0) size 711x19
+                  text run at (25,0) width 711: " following image is also an anchor which points to a target on this page, but it should not have a border around it:"
+                LayoutInline {A} at (0,0) size 15x15 [color=#0000FF]
+                  LayoutImage {IMG} at (0,20) size 15x15
+                LayoutText {#text} at (15,20) size 4x19
+                  text run at (15,20) width 4: "."
+              LayoutTable {TABLE} at (5,463) size 743x121 [border: (1px outset #808080)]
+                LayoutTableSection {TBODY} at (1,1) size 741x119
+                  LayoutTableRow {TR} at (0,5) size 741x46
+                    LayoutNGTableCell {TD} at (5,5) size 731x46 [border: (2px solid #008000)] [r=0 c=0 rs=1 cs=2]
+                      LayoutText {#text} at (3,3) size 710x39
+                        text run at (3,3) width 710: "Every cell in this table should have a 2-pixel solid green border. This is also true of the table-testing section in the"
+                        text run at (3,23) width 175: "second half of the test page."
+                  LayoutTableRow {TR} at (0,56) size 741x58
+                    LayoutNGTableCell {TD} at (5,72) size 187x26 [border: (2px solid #008000)] [r=1 c=0 rs=1 cs=1]
+                      LayoutText {#text} at (3,19) size 53x19
+                        text run at (3,19) width 53: "Cell one"
+                    LayoutNGTableCell {TD} at (197,56) size 539x58 [border: (2px solid #008000)] [r=1 c=1 rs=1 cs=1]
+                      LayoutNGBlockFlow (anonymous) at (3,3) size 533x20
+                        LayoutText {#text} at (0,0) size 54x19
+                          text run at (0,0) width 54: "Cell two"
+                      LayoutTable {TABLE} at (3,23) size 163x32 [border: (1px outset #808080)]
+                        LayoutTableSection {TBODY} at (1,1) size 161x30
+                          LayoutTableRow {TR} at (0,2) size 161x26
+                            LayoutNGTableCell {TD} at (2,2) size 157x26 [border: (2px solid #008000)] [r=0 c=0 rs=1 cs=1]
+                              LayoutText {#text} at (3,3) size 151x19
+                                text run at (3,3) width 151: "Nested single-cell table!"
+              LayoutNGBlockFlow {P} at (5,600) size 743x20
+                LayoutText {#text} at (0,0) size 175x19
+                  text run at (0,0) width 175: "This is an unstyled element."
+layer at (8,201) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,193) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_inline-expected.txt
new file mode 100644
index 0000000..a7e1cce
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_inline-expected.txt
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 328x32
+          text run at (0,0) width 328: ".one {border-bottom: purple double 10px;}"
+          text run at (328,0) width 0: " "
+          text run at (0,16) width 320: ".two {border-bottom: purple thin solid;}"
+          text run at (320,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x60 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 666x19
+          text run at (0,0) width 666: "This is an unstyled element, save for the background color, and containing inline elements with classes of "
+        LayoutInline {SPAN} at (0,0) size 58x29 [border: none (10px double #800080) none]
+          LayoutText {#text} at (665,0) size 58x19
+            text run at (665,0) width 58: "class one"
+        LayoutText {#text} at (722,0) size 770x39
+          text run at (722,0) width 48: ", which"
+          text run at (0,20) width 362: "should have a 10-pixel purple double bottom border; and "
+        LayoutInline {SPAN} at (0,0) size 58x20 [border: none (1px solid #800080) none]
+          LayoutText {#text} at (362,20) size 58x19
+            text run at (362,20) width 58: "class two"
+        LayoutText {#text} at (420,20) size 761x39
+          text run at (420,20) width 341: ", which should have a thin solid purple bottom border."
+          text run at (0,40) width 429: "The line-height of the parent element should not change on any line."
+      LayoutTable {TABLE} at (0,191) size 784x98 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x96
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x68
+            LayoutNGTableCell {TD} at (0,48) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,24) size 4x19
+                text run at (4,24) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x68 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 666x19
+                  text run at (0,0) width 666: "This is an unstyled element, save for the background color, and containing inline elements with classes of "
+                LayoutInline {SPAN} at (0,0) size 58x29 [border: none (10px double #800080) none]
+                  LayoutText {#text} at (665,0) size 58x19
+                    text run at (665,0) width 58: "class one"
+                LayoutText {#text} at (722,0) size 727x39
+                  text run at (722,0) width 5: ","
+                  text run at (0,20) width 405: "which should have a 10-pixel purple double bottom border; and "
+                LayoutInline {SPAN} at (0,0) size 58x20 [border: none (1px solid #800080) none]
+                  LayoutText {#text} at (405,20) size 58x19
+                    text run at (405,20) width 58: "class two"
+                LayoutText {#text} at (463,20) size 755x39
+                  text run at (463,20) width 292: ", which should have a thin solid purple bottom"
+                  text run at (0,40) width 477: "border. The line-height of the parent element should not change on any line."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width-expected.txt
new file mode 100644
index 0000000..0da25a23
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width-expected.txt
@@ -0,0 +1,104 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 919
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x919 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x919
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x903 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 464x96
+          text run at (0,0) width 456: ".zero {background-color: silver; border-bottom-width: 0;}"
+          text run at (456,0) width 0: " "
+          text run at (0,16) width 432: ".one {border-bottom-width: 50px; border-style: solid;}"
+          text run at (432,16) width 0: " "
+          text run at (0,32) width 440: ".two {border-bottom-width: thick; border-style: solid;}"
+          text run at (440,32) width 0: " "
+          text run at (0,48) width 464: ".three {border-bottom-width: medium; border-style: solid;}"
+          text run at (464,48) width 0: " "
+          text run at (0,64) width 440: ".four {border-bottom-width: thin; border-style: solid;}"
+          text run at (440,64) width 0: " "
+          text run at (0,80) width 272: ".five {border-bottom-width: 25px;}"
+          text run at (272,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20
+        LayoutText {#text} at (0,0) size 157x19
+          text run at (0,0) width 157: "(These will only work if "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (157,3) size 96x16
+            text run at (157,3) width 96: "border-style"
+        LayoutText {#text} at (253,0) size 89x19
+          text run at (253,0) width 89: " is supported.)"
+      LayoutNGBlockFlow {P} at (0,199) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,235) size 769x73 [border: (3px solid #000000) (50px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 387x19
+          text run at (3,3) width 387: "This element should have a bottom border width of 50 pixels."
+      LayoutNGBlockFlow {P} at (0,324) size 769x28 [border: (3px solid #000000) (5px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 344x19
+          text run at (3,3) width 344: "This element should have a thick bottom border width."
+      LayoutNGBlockFlow {P} at (0,368) size 769x26 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 364x19
+          text run at (3,3) width 364: "This element should have a medium bottom border width."
+      LayoutNGBlockFlow {P} at (0,410) size 769x24 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 337x19
+          text run at (3,3) width 337: "This element should have a thin bottom border width."
+      LayoutNGBlockFlow {P} at (0,450) size 769x20
+        LayoutText {#text} at (0,0) size 537x19
+          text run at (0,0) width 537: "This element should have no border and no extra \"padding\" on its bottom side, as no "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (537,3) size 96x16
+            text run at (537,3) width 96: "border-style"
+        LayoutText {#text} at (633,0) size 54x19
+          text run at (633,0) width 54: " was set."
+      LayoutNGBlockFlow {P} at (0,486) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutTable {TABLE} at (0,522) size 709x381 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 707x379
+          LayoutTableRow {TR} at (0,0) size 707x28
+            LayoutNGTableCell {TD} at (0,0) size 707x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 707x351
+            LayoutNGTableCell {TD} at (0,189) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,165) size 4x19
+                text run at (4,165) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 695x351 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 687x20
+                LayoutText {#text} at (0,0) size 157x19
+                  text run at (0,0) width 157: "(These will only work if "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (157,3) size 96x16
+                    text run at (157,3) width 96: "border-style"
+                LayoutText {#text} at (253,0) size 89x19
+                  text run at (253,0) width 89: " is supported.)"
+              LayoutNGBlockFlow {P} at (4,40) size 687x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,76) size 687x73 [border: (3px solid #000000) (50px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 387x19
+                  text run at (3,3) width 387: "This element should have a bottom border width of 50 pixels."
+              LayoutNGBlockFlow {P} at (4,165) size 687x28 [border: (3px solid #000000) (5px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 344x19
+                  text run at (3,3) width 344: "This element should have a thick bottom border width."
+              LayoutNGBlockFlow {P} at (4,209) size 687x26 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 364x19
+                  text run at (3,3) width 364: "This element should have a medium bottom border width."
+              LayoutNGBlockFlow {P} at (4,251) size 687x24 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 337x19
+                  text run at (3,3) width 337: "This element should have a thin bottom border width."
+              LayoutNGBlockFlow {P} at (4,291) size 687x20
+                LayoutText {#text} at (0,0) size 537x19
+                  text run at (0,0) width 537: "This element should have no border and no extra \"padding\" on its bottom side, as no "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (537,3) size 96x16
+                    text run at (537,3) width 96: "border-style"
+                LayoutText {#text} at (633,0) size 54x19
+                  text run at (633,0) width 54: " was set."
+              LayoutNGBlockFlow {P} at (4,327) size 687x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width_inline-expected.txt
new file mode 100644
index 0000000..e18c213
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_width_inline-expected.txt
@@ -0,0 +1,84 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 432x48
+          text run at (0,0) width 432: ".one {border-bottom-width: 25px; border-style: solid;}"
+          text run at (432,0) width 0: " "
+          text run at (0,16) width 432: ".two {border-bottom-width: thin; border-style: solid;}"
+          text run at (432,16) width 0: " "
+          text run at (0,32) width 280: ".three {border-bottom-width: 25px;}"
+          text run at (280,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x108 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 172x19
+          text run at (3,3) width 172: "This element has a class of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (175,6) size 24x16
+            text run at (175,6) width 24: "one"
+        LayoutText {#text} at (199,3) size 162x19
+          text run at (199,3) width 162: ". However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 174x23 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+          LayoutText {#text} at (363,3) size 144x19
+            text run at (363,3) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (506,6) size 25x16
+              text run at (506,6) width 25: "two"
+        LayoutText {#text} at (533,3) size 767x59
+          text run at (533,3) width 221: ", which should result in a thin solid"
+          text run at (3,23) width 767: "border on the bottom side of each box in the inline element (and the UA's default border on the other three sides). There is"
+          text run at (3,43) width 48: "also an "
+        LayoutInline {SPAN} at (0,0) size 183x19
+          LayoutText {#text} at (51,43) size 143x19
+            text run at (51,43) width 143: "inline element of class "
+          LayoutInline {TT} at (0,0) size 40x16
+            LayoutText {#text} at (194,46) size 40x16
+              text run at (194,46) width 40: "three"
+        LayoutText {#text} at (234,43) size 770x39
+          text run at (234,43) width 539: ", which should have no bottom border width or visible border because no border style"
+          text run at (3,63) width 50: "was set."
+      LayoutTable {TABLE} at (0,239) size 784x146 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x144
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x116
+            LayoutNGTableCell {TD} at (0,72) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,48) size 4x19
+                text run at (4,48) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x116 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x108 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 172x19
+                  text run at (3,3) width 172: "This element has a class of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (175,6) size 24x16
+                    text run at (175,6) width 24: "one"
+                LayoutText {#text} at (199,3) size 162x19
+                  text run at (199,3) width 162: ". However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 174x23 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+                  LayoutText {#text} at (363,3) size 144x19
+                    text run at (363,3) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (506,6) size 25x16
+                      text run at (506,6) width 25: "two"
+                LayoutText {#text} at (533,3) size 753x59
+                  text run at (533,3) width 221: ", which should result in a thin solid"
+                  text run at (3,23) width 753: "border on the bottom side of each box in the inline element (and the UA's default border on the other three sides). There"
+                  text run at (3,43) width 62: "is also an "
+                LayoutInline {SPAN} at (0,0) size 183x19
+                  LayoutText {#text} at (65,43) size 143x19
+                    text run at (65,43) width 143: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 40x16
+                    LayoutText {#text} at (208,46) size 40x16
+                      text run at (208,46) width 40: "three"
+                LayoutText {#text} at (248,43) size 751x39
+                  text run at (248,43) width 506: ", which should have no bottom border width or visible border because no border"
+                  text run at (3,63) width 83: "style was set."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_color-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_color-expected.txt
new file mode 100644
index 0000000..081a0c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_color-expected.txt
@@ -0,0 +1,50 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 728x48
+          text run at (0,0) width 392: ".one {border-color: purple; border-style: solid;}"
+          text run at (392,0) width 0: " "
+          text run at (0,16) width 568: ".two {border-color: purple; border-width: medium; border-style: solid;}"
+          text run at (568,16) width 0: " "
+          text run at (0,32) width 728: ".three {border-color: purple green blue yellow; border-width: medium; border-style: solid;}"
+          text run at (728,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x26 [border: (3px solid #800080)]
+        LayoutText {#text} at (3,3) size 357x19
+          text run at (3,3) width 357: "This element should have a purple border surrounding it."
+      LayoutNGBlockFlow {P} at (0,157) size 784x26 [border: (3px solid #800080)]
+        LayoutText {#text} at (3,3) size 453x19
+          text run at (3,3) width 453: "This element should have a medium-width purple border surrounding it."
+      LayoutNGBlockFlow {P} at (0,199) size 784x46 [border: (3px solid #800080) (3px solid #008000) (3px solid #0000FF) (3px solid #FFFF00)]
+        LayoutText {#text} at (3,3) size 763x39
+          text run at (3,3) width 763: "This element should be surrounded by a medium width border which is purple on top, green on the right side, blue on the"
+          text run at (3,23) width 222: "bottom, and yellow on the left side."
+      LayoutTable {TABLE} at (0,261) size 784x168 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x166
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x138
+            LayoutNGTableCell {TD} at (0,83) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,59) size 4x19
+                text run at (4,59) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x138 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x26 [border: (3px solid #800080)]
+                LayoutText {#text} at (3,3) size 357x19
+                  text run at (3,3) width 357: "This element should have a purple border surrounding it."
+              LayoutNGBlockFlow {P} at (4,46) size 762x26 [border: (3px solid #800080)]
+                LayoutText {#text} at (3,3) size 453x19
+                  text run at (3,3) width 453: "This element should have a medium-width purple border surrounding it."
+              LayoutNGBlockFlow {P} at (4,88) size 762x46 [border: (3px solid #800080) (3px solid #008000) (3px solid #0000FF) (3px solid #FFFF00)]
+                LayoutText {#text} at (3,3) size 740x39
+                  text run at (3,3) width 740: "This element should be surrounded by a medium width border which is purple on top, green on the right side, blue on"
+                  text run at (3,23) width 245: "the bottom, and yellow on the left side."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_inline-expected.txt
new file mode 100644
index 0000000..30e1758
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_inline-expected.txt
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 256x32
+          text run at (0,0) width 256: ".one {border: 10px teal outset;}"
+          text run at (256,0) width 0: " "
+          text run at (0,16) width 256: ".two {border: 10px olive inset;}"
+          text run at (256,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x60 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 677x19
+          text run at (0,0) width 677: "This is an unstyled element, save for the background color, and containing inline elements with a classes of "
+        LayoutInline {SPAN} at (0,0) size 78x39 [border: (10px outset #008080)]
+          LayoutText {#text} at (686,0) size 58x19
+            text run at (686,0) width 58: "class one"
+        LayoutText {#text} at (753,0) size 758x39
+          text run at (753,0) width 5: ","
+          text run at (0,20) width 353: "which should result in a 10-pixel outset teal border; and "
+        LayoutInline {SPAN} at (0,0) size 78x39 [border: (10px inset #808000)]
+          LayoutText {#text} at (363,20) size 58x19
+            text run at (363,20) width 58: "class two"
+        LayoutText {#text} at (431,20) size 762x39
+          text run at (431,20) width 331: ", which should result in a 10-pixel inset olive border."
+          text run at (0,40) width 429: "The line-height of the parent element should not change on any line."
+      LayoutTable {TABLE} at (0,191) size 784x98 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x96
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x68
+            LayoutNGTableCell {TD} at (0,48) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,24) size 4x19
+                text run at (4,24) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x68 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 677x19
+                  text run at (0,0) width 677: "This is an unstyled element, save for the background color, and containing inline elements with a classes of "
+                LayoutInline {SPAN} at (0,0) size 78x39 [border: (10px outset #008080)]
+                  LayoutText {#text} at (686,0) size 58x19
+                    text run at (686,0) width 58: "class one"
+                LayoutText {#text} at (753,0) size 758x39
+                  text run at (753,0) width 5: ","
+                  text run at (0,20) width 353: "which should result in a 10-pixel outset teal border; and "
+                LayoutInline {SPAN} at (0,0) size 78x39 [border: (10px inset #808000)]
+                  LayoutText {#text} at (363,20) size 58x19
+                    text run at (363,20) width 58: "class two"
+                LayoutText {#text} at (431,20) size 762x39
+                  text run at (431,20) width 331: ", which should result in a 10-pixel inset olive border."
+                  text run at (0,40) width 429: "The line-height of the parent element should not change on any line."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_inline-expected.txt
new file mode 100644
index 0000000..e0b34024
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_inline-expected.txt
@@ -0,0 +1,60 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (20,0) size 764x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 312x48
+          text run at (0,0) width 176: "P {margin-left: 20px;}"
+          text run at (176,0) width 0: " "
+          text run at (0,16) width 312: ".one {border-left: purple double 10px;}"
+          text run at (312,16) width 0: " "
+          text run at (0,32) width 304: ".two {border-left: purple thin solid;}"
+          text run at (304,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (20,131) size 764x60 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 760x19
+          text run at (0,0) width 760: "This paragraph has a background color of silver and a 20-pixel left margin, and it contains inline elements with classes of"
+        LayoutInline {SPAN} at (0,0) size 67x19 [border: none (10px double #800080)]
+          LayoutText {#text} at (10,20) size 57x19
+            text run at (10,20) width 57: "class one"
+        LayoutText {#text} at (67,20) size 389x19
+          text run at (67,20) width 389: ", which should have a 10-pixel purple double left border; and "
+        LayoutInline {SPAN} at (0,0) size 59x19 [border: none (1px solid #800080)]
+          LayoutText {#text} at (457,20) size 58x19
+            text run at (457,20) width 58: "class two"
+        LayoutText {#text} at (515,20) size 759x39
+          text run at (515,20) width 244: ", which should have a thin solid purple"
+          text run at (0,40) width 501: "left border. The line-height of the parent element should not change on any line."
+      LayoutTable {TABLE} at (0,207) size 784x98 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x96
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x68
+            LayoutNGTableCell {TD} at (0,48) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,24) size 4x19
+                text run at (4,24) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x68 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (24,4) size 742x60 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 696x39
+                  text run at (0,0) width 696: "This paragraph has a background color of silver and a 20-pixel left margin, and it contains inline elements with"
+                  text run at (0,20) width 64: "classes of "
+                LayoutInline {SPAN} at (0,0) size 67x19 [border: none (10px double #800080)]
+                  LayoutText {#text} at (74,20) size 57x19
+                    text run at (74,20) width 57: "class one"
+                LayoutText {#text} at (131,20) size 389x19
+                  text run at (131,20) width 389: ", which should have a 10-pixel purple double left border; and "
+                LayoutInline {SPAN} at (0,0) size 59x19 [border: none (1px solid #800080)]
+                  LayoutText {#text} at (521,20) size 58x19
+                    text run at (521,20) width 58: "class two"
+                LayoutText {#text} at (579,20) size 717x39
+                  text run at (579,20) width 138: ", which should have a"
+                  text run at (0,40) width 607: "thin solid purple left border. The line-height of the parent element should not change on any line."
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width-expected.txt
new file mode 100644
index 0000000..2629258
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width-expected.txt
@@ -0,0 +1,104 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 873
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x873 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x873
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x857 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 448x96
+          text run at (0,0) width 440: ".zero {background-color: silver; border-left-width: 0;}"
+          text run at (440,0) width 0: " "
+          text run at (0,16) width 416: ".one {border-left-width: 50px; border-style: solid;}"
+          text run at (416,16) width 0: " "
+          text run at (0,32) width 424: ".two {border-left-width: thick; border-style: solid;}"
+          text run at (424,32) width 0: " "
+          text run at (0,48) width 448: ".three {border-left-width: medium; border-style: solid;}"
+          text run at (448,48) width 0: " "
+          text run at (0,64) width 424: ".four {border-left-width: thin; border-style: solid;}"
+          text run at (424,64) width 0: " "
+          text run at (0,80) width 256: ".five {border-left-width: 25px;}"
+          text run at (256,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20
+        LayoutText {#text} at (0,0) size 157x19
+          text run at (0,0) width 157: "(These will only work if "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (157,3) size 96x16
+            text run at (157,3) width 96: "border-style"
+        LayoutText {#text} at (253,0) size 89x19
+          text run at (253,0) width 89: " is supported.)"
+      LayoutNGBlockFlow {P} at (0,199) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,235) size 769x46 [border: (3px solid #000000) (50px solid #000000)]
+        LayoutText {#text} at (50,3) size 713x39
+          text run at (50,3) width 713: "This element should have a left border width of 50 pixels, which will be more obvious if the element is more than"
+          text run at (50,23) width 86: "one line long."
+      LayoutNGBlockFlow {P} at (0,297) size 769x26 [border: (3px solid #000000) (5px solid #000000)]
+        LayoutText {#text} at (5,3) size 760x19
+          text run at (5,3) width 760: "This element should have a thick left border width, which will be more obvious if the element is more than one line long."
+      LayoutNGBlockFlow {P} at (0,339) size 769x46 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 744x39
+          text run at (3,3) width 744: "This element should have a medium left border width, which will be more obvious if the element is more than one line"
+          text run at (3,23) width 32: "long."
+      LayoutNGBlockFlow {P} at (0,401) size 769x26 [border: (3px solid #000000) (1px solid #000000)]
+        LayoutText {#text} at (1,3) size 753x19
+          text run at (1,3) width 753: "This element should have a thin left border width, which will be more obvious if the element is more than one line long."
+      LayoutNGBlockFlow {P} at (0,443) size 769x20
+        LayoutText {#text} at (0,0) size 513x19
+          text run at (0,0) width 513: "This element should have no border and no extra \"padding\" on its left side, as no "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (513,3) size 96x16
+            text run at (513,3) width 96: "border-style"
+        LayoutText {#text} at (609,0) size 54x19
+          text run at (609,0) width 54: " was set."
+      LayoutTable {TABLE} at (0,479) size 769x378 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x376
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x348
+            LayoutNGTableCell {TD} at (0,188) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,164) size 4x19
+                text run at (4,164) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x348 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20
+                LayoutText {#text} at (0,0) size 157x19
+                  text run at (0,0) width 157: "(These will only work if "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (157,3) size 96x16
+                    text run at (157,3) width 96: "border-style"
+                LayoutText {#text} at (253,0) size 89x19
+                  text run at (253,0) width 89: " is supported.)"
+              LayoutNGBlockFlow {P} at (4,40) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,76) size 747x46 [border: (3px solid #000000) (50px solid #000000)]
+                LayoutText {#text} at (50,3) size 682x39
+                  text run at (50,3) width 682: "This element should have a left border width of 50 pixels, which will be more obvious if the element is more"
+                  text run at (50,23) width 117: "than one line long."
+              LayoutNGBlockFlow {P} at (4,138) size 747x46 [border: (3px solid #000000) (5px solid #000000)]
+                LayoutText {#text} at (5,3) size 724x39
+                  text run at (5,3) width 724: "This element should have a thick left border width, which will be more obvious if the element is more than one line"
+                  text run at (5,23) width 32: "long."
+              LayoutNGBlockFlow {P} at (4,200) size 747x46 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 717x39
+                  text run at (3,3) width 717: "This element should have a medium left border width, which will be more obvious if the element is more than one"
+                  text run at (3,23) width 59: "line long."
+              LayoutNGBlockFlow {P} at (4,262) size 747x46 [border: (3px solid #000000) (1px solid #000000)]
+                LayoutText {#text} at (1,3) size 717x39
+                  text run at (1,3) width 717: "This element should have a thin left border width, which will be more obvious if the element is more than one line"
+                  text run at (1,23) width 32: "long."
+              LayoutNGBlockFlow {P} at (4,324) size 747x20
+                LayoutText {#text} at (0,0) size 513x19
+                  text run at (0,0) width 513: "This element should have no border and no extra \"padding\" on its left side, as no "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (513,3) size 96x16
+                    text run at (513,3) width 96: "border-style"
+                LayoutText {#text} at (609,0) size 54x19
+                  text run at (609,0) width 54: " was set."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width_inline-expected.txt
new file mode 100644
index 0000000..71f020d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_width_inline-expected.txt
@@ -0,0 +1,94 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 416x48
+          text run at (0,0) width 416: ".one {border-left-width: 25px; border-style: solid;}"
+          text run at (416,0) width 0: " "
+          text run at (0,16) width 416: ".two {border-left-width: thin; border-style: solid;}"
+          text run at (416,16) width 0: " "
+          text run at (0,32) width 264: ".three {border-left-width: 25px;}"
+          text run at (264,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x86 [border: (3px solid #000000) (25px solid #000000)]
+        LayoutText {#text} at (25,3) size 172x19
+          text run at (25,3) width 172: "This element has a class of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (197,6) size 24x16
+            text run at (197,6) width 24: "one"
+        LayoutText {#text} at (221,3) size 162x19
+          text run at (221,3) width 162: ". However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 172x25 [border: (3px solid #000000) (1px solid #000000)]
+          LayoutText {#text} at (383,3) size 144x19
+            text run at (383,3) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (526,6) size 25x16
+              text run at (526,6) width 25: "two"
+        LayoutText {#text} at (553,3) size 749x39
+          text run at (553,3) width 221: ", which should result in a thin solid"
+          text run at (25,23) width 181: "border on the left side of the "
+        LayoutInline {STRONG} at (0,0) size 27x19
+          LayoutText {#text} at (206,23) size 27x19
+            text run at (206,23) width 27: "first"
+        LayoutText {#text} at (233,23) size 750x39
+          text run at (233,23) width 542: " box in the inline element (and the UA's default border on the other three sides). There"
+          text run at (25,43) width 62: "is also an "
+        LayoutInline {SPAN} at (0,0) size 183x19
+          LayoutText {#text} at (87,43) size 143x19
+            text run at (87,43) width 143: "inline element of class "
+          LayoutInline {TT} at (0,0) size 40x16
+            LayoutText {#text} at (230,46) size 40x16
+              text run at (230,46) width 40: "three"
+        LayoutText {#text} at (270,43) size 727x39
+          text run at (270,43) width 482: ", which should have no left border width or visible border because no border"
+          text run at (25,63) width 83: "style was set."
+      LayoutTable {TABLE} at (0,217) size 784x124 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x122
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x94
+            LayoutNGTableCell {TD} at (0,61) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,37) size 4x19
+                text run at (4,37) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x94 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x86 [border: (3px solid #000000) (25px solid #000000)]
+                LayoutText {#text} at (25,3) size 172x19
+                  text run at (25,3) width 172: "This element has a class of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (197,6) size 24x16
+                    text run at (197,6) width 24: "one"
+                LayoutText {#text} at (221,3) size 162x19
+                  text run at (221,3) width 162: ". However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 172x25 [border: (3px solid #000000) (1px solid #000000)]
+                  LayoutText {#text} at (383,3) size 144x19
+                    text run at (383,3) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (526,6) size 25x16
+                      text run at (526,6) width 25: "two"
+                LayoutText {#text} at (553,3) size 715x39
+                  text run at (553,3) width 187: ", which should result in a thin"
+                  text run at (25,23) width 215: "solid border on the left side of the "
+                LayoutInline {STRONG} at (0,0) size 27x19
+                  LayoutText {#text} at (240,23) size 27x19
+                    text run at (240,23) width 27: "first"
+                LayoutText {#text} at (267,23) size 699x39
+                  text run at (267,23) width 457: " box in the inline element (and the UA's default border on the other three"
+                  text run at (25,43) width 147: "sides). There is also an "
+                LayoutInline {SPAN} at (0,0) size 184x19
+                  LayoutText {#text} at (171,43) size 144x19
+                    text run at (171,43) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 41x16
+                    LayoutText {#text} at (314,46) size 41x16
+                      text run at (314,46) width 41: "three"
+                LayoutText {#text} at (354,43) size 693x39
+                  text run at (354,43) width 364: ", which should have no left border width or visible border"
+                  text run at (25,63) width 202: "because no border style was set."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right-expected.txt
new file mode 100644
index 0000000..82371b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right-expected.txt
@@ -0,0 +1,61 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 764x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 320x48
+          text run at (0,0) width 184: "P {margin-right: 20px;}"
+          text run at (184,0) width 0: " "
+          text run at (0,16) width 320: ".one {border-right: purple double 10px;}"
+          text run at (320,16) width 0: " "
+          text run at (0,32) width 312: ".two {border-right: purple thin solid;}"
+          text run at (312,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 764x60 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 752x39
+          text run at (0,0) width 752: "This paragraph has a background color of silver and a 20-pixel right margin, and it contains inline elements with classes"
+          text run at (0,20) width 17: "of "
+        LayoutInline {SPAN} at (0,0) size 67x19 [border: none (10px double #800080) none]
+          LayoutText {#text} at (17,20) size 57x19
+            text run at (17,20) width 57: "class one"
+        LayoutText {#text} at (84,20) size 398x19
+          text run at (84,20) width 398: ", which should have a 10-pixel purple double right border; and "
+        LayoutInline {SPAN} at (0,0) size 59x19 [border: none (1px solid #800080) none]
+          LayoutText {#text} at (482,20) size 58x19
+            text run at (482,20) width 58: "class two"
+        LayoutText {#text} at (541,20) size 741x39
+          text run at (541,20) width 200: ", which should have a thin solid"
+          text run at (0,40) width 554: "purple right border. The line-height of the parent element should not change on any line."
+      LayoutTable {TABLE} at (0,207) size 784x98 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x96
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x68
+            LayoutNGTableCell {TD} at (0,48) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,24) size 4x19
+                text run at (4,24) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x68 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 742x60 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 705x39
+                  text run at (0,0) width 705: "This paragraph has a background color of silver and a 20-pixel right margin, and it contains inline elements with"
+                  text run at (0,20) width 64: "classes of "
+                LayoutInline {SPAN} at (0,0) size 67x19 [border: none (10px double #800080) none]
+                  LayoutText {#text} at (64,20) size 57x19
+                    text run at (64,20) width 57: "class one"
+                LayoutText {#text} at (131,20) size 398x19
+                  text run at (131,20) width 398: ", which should have a 10-pixel purple double right border; and "
+                LayoutInline {SPAN} at (0,0) size 59x19 [border: none (1px solid #800080) none]
+                  LayoutText {#text} at (529,20) size 58x19
+                    text run at (529,20) width 58: "class two"
+                LayoutText {#text} at (588,20) size 726x39
+                  text run at (588,20) width 138: ", which should have a"
+                  text run at (0,40) width 616: "thin solid purple right border. The line-height of the parent element should not change on any line."
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width-expected.txt
new file mode 100644
index 0000000..5a29182
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 893
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x893 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x893
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x877 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 456x96
+          text run at (0,0) width 448: ".zero {background-color: silver; border-right-width: 0;}"
+          text run at (448,0) width 0: " "
+          text run at (0,16) width 424: ".one {border-right-width: 25px; border-style: solid;}"
+          text run at (424,16) width 0: " "
+          text run at (0,32) width 432: ".two {border-right-width: thick; border-style: solid;}"
+          text run at (432,32) width 0: " "
+          text run at (0,48) width 456: ".three {border-right-width: medium; border-style: solid;}"
+          text run at (456,48) width 0: " "
+          text run at (0,64) width 432: ".four {border-right-width: thin; border-style: solid;}"
+          text run at (432,64) width 0: " "
+          text run at (0,80) width 272: ".five {border-right-width: 100px;}"
+          text run at (272,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20
+        LayoutText {#text} at (0,0) size 157x19
+          text run at (0,0) width 157: "(These will only work if "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (157,3) size 96x16
+            text run at (157,3) width 96: "border-style"
+        LayoutText {#text} at (253,0) size 89x19
+          text run at (253,0) width 89: " is supported.)"
+      LayoutNGBlockFlow {P} at (0,199) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,235) size 769x46 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 722x39
+          text run at (3,3) width 722: "This element should have a right border width of 25 pixels, which will be more obvious if the element is more than"
+          text run at (3,23) width 86: "one line long."
+      LayoutNGBlockFlow {P} at (0,297) size 769x46 [border: (3px solid #000000) (5px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 733x39
+          text run at (3,3) width 733: "This element should have a thick right border width, which will be more obvious if the element is more than one line"
+          text run at (3,23) width 32: "long."
+      LayoutNGBlockFlow {P} at (0,359) size 769x46 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 753x39
+          text run at (3,3) width 753: "This element should have a medium right border width, which will be more obvious if the element is more than one line"
+          text run at (3,23) width 32: "long."
+      LayoutNGBlockFlow {P} at (0,421) size 769x26 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 762x19
+          text run at (3,3) width 762: "This element should have a thin right border width, which will be more obvious if the element is more than one line long."
+      LayoutNGBlockFlow {P} at (0,463) size 769x20
+        LayoutText {#text} at (0,0) size 522x19
+          text run at (0,0) width 522: "This element should have no border and no extra \"padding\" on its right side, as no "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (522,3) size 96x16
+            text run at (522,3) width 96: "border-style"
+        LayoutText {#text} at (618,0) size 54x19
+          text run at (618,0) width 54: " was set."
+      LayoutTable {TABLE} at (0,499) size 769x378 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x376
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x348
+            LayoutNGTableCell {TD} at (0,188) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,164) size 4x19
+                text run at (4,164) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x348 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20
+                LayoutText {#text} at (0,0) size 157x19
+                  text run at (0,0) width 157: "(These will only work if "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (157,3) size 96x16
+                    text run at (157,3) width 96: "border-style"
+                LayoutText {#text} at (253,0) size 89x19
+                  text run at (253,0) width 89: " is supported.)"
+              LayoutNGBlockFlow {P} at (4,40) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,76) size 747x46 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 691x39
+                  text run at (3,3) width 691: "This element should have a right border width of 25 pixels, which will be more obvious if the element is more"
+                  text run at (3,23) width 117: "than one line long."
+              LayoutNGBlockFlow {P} at (4,138) size 747x46 [border: (3px solid #000000) (5px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 733x39
+                  text run at (3,3) width 733: "This element should have a thick right border width, which will be more obvious if the element is more than one line"
+                  text run at (3,23) width 32: "long."
+              LayoutNGBlockFlow {P} at (4,200) size 747x46 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 726x39
+                  text run at (3,3) width 726: "This element should have a medium right border width, which will be more obvious if the element is more than one"
+                  text run at (3,23) width 59: "line long."
+              LayoutNGBlockFlow {P} at (4,262) size 747x46 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 726x39
+                  text run at (3,3) width 726: "This element should have a thin right border width, which will be more obvious if the element is more than one line"
+                  text run at (3,23) width 32: "long."
+              LayoutNGBlockFlow {P} at (4,324) size 747x20
+                LayoutText {#text} at (0,0) size 522x19
+                  text run at (0,0) width 522: "This element should have no border and no extra \"padding\" on its right side, as no "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (522,3) size 96x16
+                    text run at (522,3) width 96: "border-style"
+                LayoutText {#text} at (618,0) size 54x19
+                  text run at (618,0) width 54: " was set."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width_inline-expected.txt
new file mode 100644
index 0000000..e400507
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right_width_inline-expected.txt
@@ -0,0 +1,94 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 424x48
+          text run at (0,0) width 424: ".one {border-right-width: 25px; border-style: solid;}"
+          text run at (424,0) width 0: " "
+          text run at (0,16) width 424: ".two {border-right-width: thin; border-style: solid;}"
+          text run at (424,16) width 0: " "
+          text run at (0,32) width 272: ".three {border-right-width: 25px;}"
+          text run at (272,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x86 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 172x19
+          text run at (3,3) width 172: "This element has a class of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (175,6) size 24x16
+            text run at (175,6) width 24: "one"
+        LayoutText {#text} at (199,3) size 162x19
+          text run at (199,3) width 162: ". However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 172x25 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+          LayoutText {#text} at (363,3) size 144x19
+            text run at (363,3) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (506,6) size 25x16
+              text run at (506,6) width 25: "two"
+        LayoutText {#text} at (531,3) size 749x39
+          text run at (531,3) width 221: ", which should result in a thin solid"
+          text run at (3,23) width 190: "border on the right side of the "
+        LayoutInline {STRONG} at (0,0) size 23x19
+          LayoutText {#text} at (193,23) size 23x19
+            text run at (193,23) width 23: "last"
+        LayoutText {#text} at (216,23) size 756x39
+          text run at (216,23) width 543: " box of the inline element (and the UA's default border on the other three sides). There"
+          text run at (3,43) width 62: "is also an "
+        LayoutInline {SPAN} at (0,0) size 183x19
+          LayoutText {#text} at (65,43) size 143x19
+            text run at (65,43) width 143: "inline element of class "
+          LayoutInline {TT} at (0,0) size 40x16
+            LayoutText {#text} at (208,46) size 40x16
+              text run at (208,46) width 40: "three"
+        LayoutText {#text} at (248,43) size 736x39
+          text run at (248,43) width 491: ", which should have no right border width or visible border because no border"
+          text run at (3,63) width 83: "style was set."
+      LayoutTable {TABLE} at (0,217) size 784x124 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x122
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x94
+            LayoutNGTableCell {TD} at (0,61) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,37) size 4x19
+                text run at (4,37) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x94 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x86 [border: (3px solid #000000) (25px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 172x19
+                  text run at (3,3) width 172: "This element has a class of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (175,6) size 24x16
+                    text run at (175,6) width 24: "one"
+                LayoutText {#text} at (199,3) size 162x19
+                  text run at (199,3) width 162: ". However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 172x25 [border: (3px solid #000000) (1px solid #000000) (3px solid #000000)]
+                  LayoutText {#text} at (363,3) size 144x19
+                    text run at (363,3) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (506,6) size 25x16
+                      text run at (506,6) width 25: "two"
+                LayoutText {#text} at (531,3) size 715x39
+                  text run at (531,3) width 187: ", which should result in a thin"
+                  text run at (3,23) width 224: "solid border on the right side of the "
+                LayoutInline {STRONG} at (0,0) size 23x19
+                  LayoutText {#text} at (227,23) size 23x19
+                    text run at (227,23) width 23: "last"
+                LayoutText {#text} at (250,23) size 705x39
+                  text run at (250,23) width 458: " box of the inline element (and the UA's default border on the other three"
+                  text run at (3,43) width 147: "sides). There is also an "
+                LayoutInline {SPAN} at (0,0) size 184x19
+                  LayoutText {#text} at (149,43) size 144x19
+                    text run at (149,43) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 41x16
+                    LayoutText {#text} at (292,46) size 41x16
+                      text run at (292,46) width 41: "three"
+                LayoutText {#text} at (332,43) size 702x39
+                  text run at (332,43) width 373: ", which should have no right border width or visible border"
+                  text run at (3,63) width 202: "because no border style was set."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_inline-expected.txt
new file mode 100644
index 0000000..3b74dc6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_inline-expected.txt
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 304x32
+          text run at (0,0) width 304: ".one {border-top: purple double 10px;}"
+          text run at (304,0) width 0: " "
+          text run at (0,16) width 296: ".two {border-top: purple thin solid;}"
+          text run at (296,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x60 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 666x19
+          text run at (0,0) width 666: "This is an unstyled element, save for the background color, and containing inline elements with classes of "
+        LayoutInline {SPAN} at (0,0) size 58x29 [border: (10px double #800080) none]
+          LayoutText {#text} at (665,0) size 58x19
+            text run at (665,0) width 58: "class one"
+        LayoutText {#text} at (722,0) size 770x39
+          text run at (722,0) width 48: ", which"
+          text run at (0,20) width 338: "should have a 10-pixel purple double top border; and "
+        LayoutInline {SPAN} at (0,0) size 58x20 [border: (1px solid #800080) none]
+          LayoutText {#text} at (338,20) size 58x19
+            text run at (338,20) width 58: "class two"
+        LayoutText {#text} at (396,20) size 773x39
+          text run at (396,20) width 377: ", which should have a thin solid purple top border. The line-"
+          text run at (0,40) width 372: "height of the parent element should not change on any line."
+      LayoutTable {TABLE} at (0,191) size 784x98 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x96
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x68
+            LayoutNGTableCell {TD} at (0,48) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,24) size 4x19
+                text run at (4,24) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x68 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 666x19
+                  text run at (0,0) width 666: "This is an unstyled element, save for the background color, and containing inline elements with classes of "
+                LayoutInline {SPAN} at (0,0) size 58x29 [border: (10px double #800080) none]
+                  LayoutText {#text} at (665,0) size 58x19
+                    text run at (665,0) width 58: "class one"
+                LayoutText {#text} at (722,0) size 727x39
+                  text run at (722,0) width 5: ","
+                  text run at (0,20) width 381: "which should have a 10-pixel purple double top border; and "
+                LayoutInline {SPAN} at (0,0) size 58x20 [border: (1px solid #800080) none]
+                  LayoutText {#text} at (381,20) size 58x19
+                    text run at (381,20) width 58: "class two"
+                LayoutText {#text} at (439,20) size 756x39
+                  text run at (439,20) width 317: ", which should have a thin solid purple top border."
+                  text run at (0,40) width 429: "The line-height of the parent element should not change on any line."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width-expected.txt
new file mode 100644
index 0000000..fe647bff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width-expected.txt
@@ -0,0 +1,98 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 797
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x797 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x797
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x781 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 440x96
+          text run at (0,0) width 432: ".zero {background-color: silver; border-top-width: 0;}"
+          text run at (432,0) width 0: " "
+          text run at (0,16) width 408: ".one {border-top-width: 25px; border-style: solid;}"
+          text run at (408,16) width 0: " "
+          text run at (0,32) width 416: ".two {border-top-width: thick; border-style: solid;}"
+          text run at (416,32) width 0: " "
+          text run at (0,48) width 440: ".three {border-top-width: medium; border-style: solid;}"
+          text run at (440,48) width 0: " "
+          text run at (0,64) width 416: ".four {border-top-width: thin; border-style: solid;}"
+          text run at (416,64) width 0: " "
+          text run at (0,80) width 248: ".five {border-top-width: 25px;}"
+          text run at (248,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20
+        LayoutText {#text} at (0,0) size 157x19
+          text run at (0,0) width 157: "(These will only work if "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (157,3) size 96x16
+            text run at (157,3) width 96: "border-style"
+        LayoutText {#text} at (253,0) size 89x19
+          text run at (253,0) width 89: " is supported.)"
+      LayoutNGBlockFlow {P} at (0,199) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,235) size 769x48 [border: (25px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,25) size 377x19
+          text run at (3,25) width 377: "This paragraph should have a top border width of 25 pixels."
+      LayoutNGBlockFlow {P} at (0,299) size 769x28 [border: (5px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,5) size 334x19
+          text run at (3,5) width 334: "This paragraph should have a thick top border width."
+      LayoutNGBlockFlow {P} at (0,343) size 769x26 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 354x19
+          text run at (3,3) width 354: "This paragraph should have a medium top border width."
+      LayoutNGBlockFlow {P} at (0,385) size 769x24 [border: (1px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,1) size 327x19
+          text run at (3,1) width 327: "This paragraph should have a thin top border width."
+      LayoutNGBlockFlow {P} at (0,425) size 769x20
+        LayoutText {#text} at (0,0) size 527x19
+          text run at (0,0) width 527: "This paragraph should have no border and no extra \"padding\" on its top side, as no "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (527,3) size 96x16
+            text run at (527,3) width 96: "border-style"
+        LayoutText {#text} at (623,0) size 54x19
+          text run at (623,0) width 54: " was set."
+      LayoutTable {TABLE} at (0,461) size 699x320 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 697x318
+          LayoutTableRow {TR} at (0,0) size 697x28
+            LayoutNGTableCell {TD} at (0,0) size 697x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 697x290
+            LayoutNGTableCell {TD} at (0,159) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,135) size 4x19
+                text run at (4,135) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 685x290 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 677x20
+                LayoutText {#text} at (0,0) size 157x19
+                  text run at (0,0) width 157: "(These will only work if "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (157,3) size 96x16
+                    text run at (157,3) width 96: "border-style"
+                LayoutText {#text} at (253,0) size 89x19
+                  text run at (253,0) width 89: " is supported.)"
+              LayoutNGBlockFlow {P} at (4,40) size 677x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,76) size 677x48 [border: (25px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,25) size 377x19
+                  text run at (3,25) width 377: "This paragraph should have a top border width of 25 pixels."
+              LayoutNGBlockFlow {P} at (4,140) size 677x28 [border: (5px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,5) size 334x19
+                  text run at (3,5) width 334: "This paragraph should have a thick top border width."
+              LayoutNGBlockFlow {P} at (4,184) size 677x26 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 354x19
+                  text run at (3,3) width 354: "This paragraph should have a medium top border width."
+              LayoutNGBlockFlow {P} at (4,226) size 677x24 [border: (1px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,1) size 327x19
+                  text run at (3,1) width 327: "This paragraph should have a thin top border width."
+              LayoutNGBlockFlow {P} at (4,266) size 677x20
+                LayoutText {#text} at (0,0) size 527x19
+                  text run at (0,0) width 527: "This paragraph should have no border and no extra \"padding\" on its top side, as no "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (527,3) size 96x16
+                    text run at (527,3) width 96: "border-style"
+                LayoutText {#text} at (623,0) size 54x19
+                  text run at (623,0) width 54: " was set."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width_inline-expected.txt
new file mode 100644
index 0000000..f88a426
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_width_inline-expected.txt
@@ -0,0 +1,83 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 408x48
+          text run at (0,0) width 408: ".one {border-top-width: 25px; border-style: solid;}"
+          text run at (408,0) width 0: " "
+          text run at (0,16) width 408: ".two {border-top-width: thin; border-style: solid;}"
+          text run at (408,16) width 0: " "
+          text run at (0,32) width 256: ".three {border-top-width: 25px;}"
+          text run at (256,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x88 [border: (25px solid #000000) (3px solid #000000)]
+        LayoutText {#text} at (3,25) size 172x19
+          text run at (3,25) width 172: "This element has a class of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (175,28) size 24x16
+            text run at (175,28) width 24: "one"
+        LayoutText {#text} at (199,25) size 162x19
+          text run at (199,25) width 162: ". However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 174x23 [border: (1px solid #000000) (3px solid #000000)]
+          LayoutText {#text} at (363,25) size 144x19
+            text run at (363,25) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (506,28) size 25x16
+              text run at (506,28) width 25: "two"
+        LayoutText {#text} at (533,25) size 772x59
+          text run at (533,25) width 221: ", which should result in a thin solid"
+          text run at (3,45) width 772: "border on the top side of each box in the inline element (and the UA's default border on the other three sides). There is also"
+          text run at (3,65) width 19: "an "
+        LayoutInline {SPAN} at (0,0) size 183x19
+          LayoutText {#text} at (22,65) size 143x19
+            text run at (22,65) width 143: "inline element of class "
+          LayoutInline {TT} at (0,0) size 40x16
+            LayoutText {#text} at (165,68) size 40x16
+              text run at (165,68) width 40: "three"
+        LayoutText {#text} at (205,65) size 569x19
+          text run at (205,65) width 569: ", which should have no top border width or visible border because no border style was set."
+      LayoutTable {TABLE} at (0,219) size 784x146 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x144
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x116
+            LayoutNGTableCell {TD} at (0,72) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,48) size 4x19
+                text run at (4,48) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x116 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x108 [border: (25px solid #000000) (3px solid #000000)]
+                LayoutText {#text} at (3,25) size 172x19
+                  text run at (3,25) width 172: "This element has a class of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (175,28) size 24x16
+                    text run at (175,28) width 24: "one"
+                LayoutText {#text} at (199,25) size 162x19
+                  text run at (199,25) width 162: ". However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 174x23 [border: (1px solid #000000) (3px solid #000000)]
+                  LayoutText {#text} at (363,25) size 144x19
+                    text run at (363,25) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (506,28) size 25x16
+                      text run at (506,28) width 25: "two"
+                LayoutText {#text} at (533,25) size 751x59
+                  text run at (533,25) width 221: ", which should result in a thin solid"
+                  text run at (3,45) width 743: "border on the top side of each box in the inline element (and the UA's default border on the other three sides). There is"
+                  text run at (3,65) width 48: "also an "
+                LayoutInline {SPAN} at (0,0) size 183x19
+                  LayoutText {#text} at (51,65) size 143x19
+                    text run at (51,65) width 143: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 40x16
+                    LayoutText {#text} at (194,68) size 40x16
+                      text run at (194,68) width 40: "three"
+                LayoutText {#text} at (234,65) size 746x39
+                  text run at (234,65) width 515: ", which should have no top border width or visible border because no border style"
+                  text run at (3,85) width 50: "was set."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width-expected.txt
new file mode 100644
index 0000000..8ad5e773
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width-expected.txt
@@ -0,0 +1,98 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 941
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x941 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x941
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x925 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 408x96
+          text run at (0,0) width 400: ".zero {background-color: silver; border-width: 0;}"
+          text run at (400,0) width 0: " "
+          text run at (0,16) width 376: ".one {border-width: 50px; border-style: solid;}"
+          text run at (376,16) width 0: " "
+          text run at (0,32) width 384: ".two {border-width: thick; border-style: solid;}"
+          text run at (384,32) width 0: " "
+          text run at (0,48) width 408: ".three {border-width: medium; border-style: solid;}"
+          text run at (408,48) width 0: " "
+          text run at (0,64) width 384: ".four {border-width: thin; border-style: solid;}"
+          text run at (384,64) width 0: " "
+          text run at (0,80) width 216: ".five {border-width: 25px;}"
+          text run at (216,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20
+        LayoutText {#text} at (0,0) size 157x19
+          text run at (0,0) width 157: "(These will only work if "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (157,3) size 96x16
+            text run at (157,3) width 96: "border-style"
+        LayoutText {#text} at (253,0) size 89x19
+          text run at (253,0) width 89: " is supported.)"
+      LayoutNGBlockFlow {P} at (0,199) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,235) size 769x120 [border: (50px solid #000000)]
+        LayoutText {#text} at (50,50) size 394x19
+          text run at (50,50) width 394: "This element should have an overall border width of 50 pixels."
+      LayoutNGBlockFlow {P} at (0,371) size 769x30 [border: (5px solid #000000)]
+        LayoutText {#text} at (5,5) size 343x19
+          text run at (5,5) width 343: "This element should have a thick overall border width."
+      LayoutNGBlockFlow {P} at (0,417) size 769x26 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 363x19
+          text run at (3,3) width 363: "This element should have a medium overall border width."
+      LayoutNGBlockFlow {P} at (0,459) size 769x22 [border: (1px solid #000000)]
+        LayoutText {#text} at (1,1) size 336x19
+          text run at (1,1) width 336: "This element should have a thin overall border width."
+      LayoutNGBlockFlow {P} at (0,497) size 769x20
+        LayoutText {#text} at (0,0) size 498x19
+          text run at (0,0) width 498: "This element should have no border and no extra \"padding\" on any side, as no "
+        LayoutInline {CODE} at (0,0) size 96x16
+          LayoutText {#text} at (498,3) size 96x16
+            text run at (498,3) width 96: "border-style"
+        LayoutText {#text} at (594,0) size 54x19
+          text run at (594,0) width 54: " was set."
+      LayoutTable {TABLE} at (0,533) size 670x392 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 668x390
+          LayoutTableRow {TR} at (0,0) size 668x28
+            LayoutNGTableCell {TD} at (0,0) size 668x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 668x362
+            LayoutNGTableCell {TD} at (0,195) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,171) size 4x19
+                text run at (4,171) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 656x362 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 648x20
+                LayoutText {#text} at (0,0) size 157x19
+                  text run at (0,0) width 157: "(These will only work if "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (157,3) size 96x16
+                    text run at (157,3) width 96: "border-style"
+                LayoutText {#text} at (253,0) size 89x19
+                  text run at (253,0) width 89: " is supported.)"
+              LayoutNGBlockFlow {P} at (4,40) size 648x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,76) size 648x120 [border: (50px solid #000000)]
+                LayoutText {#text} at (50,50) size 394x19
+                  text run at (50,50) width 394: "This element should have an overall border width of 50 pixels."
+              LayoutNGBlockFlow {P} at (4,212) size 648x30 [border: (5px solid #000000)]
+                LayoutText {#text} at (5,5) size 343x19
+                  text run at (5,5) width 343: "This element should have a thick overall border width."
+              LayoutNGBlockFlow {P} at (4,258) size 648x26 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 363x19
+                  text run at (3,3) width 363: "This element should have a medium overall border width."
+              LayoutNGBlockFlow {P} at (4,300) size 648x22 [border: (1px solid #000000)]
+                LayoutText {#text} at (1,1) size 336x19
+                  text run at (1,1) width 336: "This element should have a thin overall border width."
+              LayoutNGBlockFlow {P} at (4,338) size 648x20
+                LayoutText {#text} at (0,0) size 498x19
+                  text run at (0,0) width 498: "This element should have no border and no extra \"padding\" on any side, as no "
+                LayoutInline {CODE} at (0,0) size 96x16
+                  LayoutText {#text} at (498,3) size 96x16
+                    text run at (498,3) width 96: "border-style"
+                LayoutText {#text} at (594,0) size 54x19
+                  text run at (594,0) width 54: " was set."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width_inline-expected.txt
new file mode 100644
index 0000000..392e71a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_width_inline-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 376x48
+          text run at (0,0) width 376: ".one {border-width: 25px; border-style: solid;}"
+          text run at (376,0) width 0: " "
+          text run at (0,16) width 376: ".two {border-width: thin; border-style: solid;}"
+          text run at (376,16) width 0: " "
+          text run at (0,32) width 224: ".three {border-width: 25px;}"
+          text run at (224,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x110 [border: (25px solid #000000)]
+        LayoutText {#text} at (25,25) size 172x19
+          text run at (25,25) width 172: "This element has a class of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (197,28) size 24x16
+            text run at (197,28) width 24: "one"
+        LayoutText {#text} at (221,25) size 162x19
+          text run at (221,25) width 162: ". However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 170x21 [border: (1px solid #000000)]
+          LayoutText {#text} at (383,25) size 144x19
+            text run at (383,25) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (526,28) size 25x16
+              text run at (526,28) width 25: "two"
+        LayoutText {#text} at (551,25) size 713x39
+          text run at (551,25) width 187: ", which should result in a thin"
+          text run at (25,45) width 477: "solid border on each side of each box in the inline element. There is also an "
+        LayoutInline {SPAN} at (0,0) size 184x19
+          LayoutText {#text} at (501,45) size 144x19
+            text run at (501,45) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 41x16
+            LayoutText {#text} at (644,48) size 41x16
+              text run at (644,48) width 41: "three"
+        LayoutText {#text} at (684,45) size 707x39
+          text run at (684,45) width 48: ", which"
+          text run at (25,65) width 387: "should have no border width because no border style was set."
+      LayoutTable {TABLE} at (0,241) size 784x148 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x146
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x118
+            LayoutNGTableCell {TD} at (0,73) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,49) size 4x19
+                text run at (4,49) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x118 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x110 [border: (25px solid #000000)]
+                LayoutText {#text} at (25,25) size 172x19
+                  text run at (25,25) width 172: "This element has a class of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (197,28) size 24x16
+                    text run at (197,28) width 24: "one"
+                LayoutText {#text} at (221,25) size 162x19
+                  text run at (221,25) width 162: ". However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 170x21 [border: (1px solid #000000)]
+                  LayoutText {#text} at (383,25) size 144x19
+                    text run at (383,25) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (526,28) size 25x16
+                      text run at (526,28) width 25: "two"
+                LayoutText {#text} at (551,25) size 685x39
+                  text run at (551,25) width 159: ", which should result in a"
+                  text run at (25,45) width 505: "thin solid border on each side of each box in the inline element. There is also an "
+                LayoutInline {SPAN} at (0,0) size 184x19
+                  LayoutText {#text} at (529,45) size 144x19
+                    text run at (529,45) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 41x16
+                    LayoutText {#text} at (672,48) size 41x16
+                      text run at (672,48) width 41: "three"
+                LayoutText {#text} at (712,45) size 692x39
+                  text run at (712,45) width 5: ","
+                  text run at (25,65) width 430: "which should have no border width because no border style was set."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/clear-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/clear-expected.txt
new file mode 100644
index 0000000..8871a79
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/clear-expected.txt
@@ -0,0 +1,92 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1005
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1005 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1005
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x989 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x64
+        LayoutText {#text} at (0,0) size 168x64
+          text run at (0,0) width 152: ".one {clear: left;}"
+          text run at (152,0) width 0: " "
+          text run at (0,16) width 160: ".two {clear: right;}"
+          text run at (160,16) width 0: " "
+          text run at (0,32) width 168: ".three {clear: both;}"
+          text run at (168,32) width 0: " "
+          text run at (0,48) width 160: ".four {clear: none;}"
+          text run at (160,48) width 0: " "
+      LayoutImage (floating) {IMG} at (0,123) size 15x50
+      LayoutNGBlockFlow {P} at (0,131) size 769x20
+        LayoutText {#text} at (18,0) size 594x19
+          text run at (18,0) width 594: "This text should be flowing past a tall orange rectangle on the left side of the browser window."
+      LayoutNGBlockFlow (anonymous) at (0,167) size 769x20
+        LayoutBR {BR} at (18,0) size 0x0
+        LayoutImage (floating) {IMG} at (0,20) size 15x50
+      LayoutNGBlockFlow {P} at (0,237) size 769x20
+        LayoutText {#text} at (0,0) size 649x19
+          text run at (0,0) width 649: "This paragraph should appear below the tall orange rectangle above and to the left, and not flow past it."
+      LayoutNGBlockFlow (anonymous) at (0,273) size 769x20
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutImage (floating) {IMG} at (754,20) size 15x50
+      LayoutNGBlockFlow {P} at (0,343) size 769x20
+        LayoutText {#text} at (0,0) size 658x19
+          text run at (0,0) width 658: "This paragraph should appear below the tall orange rectangle above and to the right, and not flow past it."
+      LayoutNGBlockFlow (anonymous) at (0,379) size 769x20
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutImage (floating) {IMG} at (0,20) size 15x50
+        LayoutImage (floating) {IMG} at (754,20) size 15x50
+      LayoutNGBlockFlow {P} at (0,449) size 769x20
+        LayoutText {#text} at (0,0) size 602x19
+          text run at (0,0) width 602: "This paragraph should appear below the two tall orange rectangles, and not flow between them."
+      LayoutImage (floating) {IMG} at (0,485) size 15x50
+      LayoutImage (floating) {IMG} at (754,485) size 15x50
+      LayoutNGBlockFlow {P} at (0,485) size 769x20
+        LayoutText {#text} at (18,0) size 390x19
+          text run at (18,0) width 390: "This paragraph should be between both tall orange rectangles."
+      LayoutNGBlockFlow (anonymous) at (0,521) size 769x20
+        LayoutBR {BR} at (18,0) size 0x0
+      LayoutTable {TABLE} at (0,541) size 680x448 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 678x446
+          LayoutTableRow {TR} at (0,0) size 678x28
+            LayoutNGTableCell {TD} at (0,0) size 678x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 678x418
+            LayoutNGTableCell {TD} at (0,223) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,199) size 4x19
+                text run at (4,199) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 666x418 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutImage (floating) {IMG} at (4,4) size 15x50
+              LayoutNGBlockFlow {P} at (4,4) size 658x20
+                LayoutText {#text} at (18,0) size 594x19
+                  text run at (18,0) width 594: "This text should be flowing past a tall orange rectangle on the left side of the browser window."
+              LayoutNGBlockFlow (anonymous) at (4,40) size 658x20
+                LayoutBR {BR} at (18,0) size 0x0
+                LayoutImage (floating) {IMG} at (0,20) size 15x50
+              LayoutNGBlockFlow {P} at (4,110) size 658x20
+                LayoutText {#text} at (0,0) size 649x19
+                  text run at (0,0) width 649: "This paragraph should appear below the tall orange rectangle above and to the left, and not flow past it."
+              LayoutNGBlockFlow (anonymous) at (4,146) size 658x20
+                LayoutBR {BR} at (0,0) size 0x0
+                LayoutImage (floating) {IMG} at (643,20) size 15x50
+              LayoutNGBlockFlow {P} at (4,216) size 658x20
+                LayoutText {#text} at (0,0) size 658x19
+                  text run at (0,0) width 658: "This paragraph should appear below the tall orange rectangle above and to the right, and not flow past it."
+              LayoutNGBlockFlow (anonymous) at (4,252) size 658x20
+                LayoutBR {BR} at (0,0) size 0x0
+                LayoutImage (floating) {IMG} at (0,20) size 15x50
+                LayoutImage (floating) {IMG} at (643,20) size 15x50
+              LayoutNGBlockFlow {P} at (4,322) size 658x20
+                LayoutText {#text} at (0,0) size 602x19
+                  text run at (0,0) width 602: "This paragraph should appear below the two tall orange rectangles, and not flow between them."
+              LayoutImage (floating) {IMG} at (4,358) size 15x50
+              LayoutImage (floating) {IMG} at (647,358) size 15x50
+              LayoutNGBlockFlow {P} at (4,358) size 658x20
+                LayoutText {#text} at (18,0) size 390x19
+                  text run at (18,0) width 390: "This paragraph should be between both tall orange rectangles."
+              LayoutNGBlockFlow (anonymous) at (4,394) size 658x20
+                LayoutBR {BR} at (18,0) size 0x0
+layer at (8,121) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float-expected.txt
new file mode 100644
index 0000000..869cc71
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float-expected.txt
@@ -0,0 +1,57 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 160x32
+          text run at (0,0) width 152: ".one {float: left;}"
+          text run at (152,0) width 0: " "
+          text run at (0,16) width 160: ".two {float: right;}"
+          text run at (160,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutImage (floating) {IMG} at (0,107) size 15x50
+      LayoutNGBlockFlow {P} at (0,115) size 784x40
+        LayoutText {#text} at (15,0) size 763x39
+          text run at (15,0) width 763: "This text should be flowing past a tall orange rectangle on the left side of the browser window. In this case, it is the image"
+          text run at (15,20) width 212: "which has been floated to the left."
+      LayoutNGBlockFlow (anonymous) at (0,171) size 784x20
+        LayoutBR {BR} at (0,0) size 0x0
+      LayoutImage (floating) {IMG} at (769,209) size 15x50
+      LayoutNGBlockFlow {P} at (0,217) size 784x40
+        LayoutText {#text} at (0,0) size 730x39
+          text run at (0,0) width 730: "This text should be flowing past a tall orange rectangle on the right side of the browser window. In this case, it is the"
+          text run at (0,20) width 263: "image which has been floated to the right."
+      LayoutTable {TABLE} at (0,273) size 784x182 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x180
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x152
+            LayoutNGTableCell {TD} at (0,90) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,66) size 4x19
+                text run at (4,66) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x152 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutImage (floating) {IMG} at (4,4) size 15x50
+              LayoutNGBlockFlow {P} at (4,4) size 762x40
+                LayoutText {#text} at (15,0) size 721x39
+                  text run at (15,0) width 721: "This text should be flowing past a tall orange rectangle on the left side of the browser window. In this case, it is the"
+                  text run at (15,20) width 254: "image which has been floated to the left."
+              LayoutNGBlockFlow (anonymous) at (4,60) size 762x20
+                LayoutBR {BR} at (0,0) size 0x0
+              LayoutImage (floating) {IMG} at (751,98) size 15x50
+              LayoutNGBlockFlow {P} at (4,106) size 762x40
+                LayoutText {#text} at (0,0) size 730x39
+                  text run at (0,0) width 730: "This text should be flowing past a tall orange rectangle on the right side of the browser window. In this case, it is the"
+                  text run at (0,20) width 263: "image which has been floated to the right."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (8,207) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,199) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (25,398) size 762x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (4,88) size 762x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/height-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/height-expected.txt
new file mode 100644
index 0000000..eaeae8f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/height-expected.txt
@@ -0,0 +1,77 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 997
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x997 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x997
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x981 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x48
+        LayoutText {#text} at (0,0) size 168x32
+          text run at (0,0) width 160: ".one {height: 50px;}"
+          text run at (160,0) width 0: " "
+          text run at (0,16) width 168: ".two {height: 100px;}"
+          text run at (168,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow (anonymous) at (0,107) size 769x50
+        LayoutImage {IMG} at (0,0) size 50x50
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,173) size 769x20
+        LayoutText {#text} at (0,0) size 275x19
+          text run at (0,0) width 275: "The square above should be fifty pixels tall."
+      LayoutNGBlockFlow (anonymous) at (0,209) size 769x100
+        LayoutImage {IMG} at (0,0) size 100x100
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,325) size 769x20
+        LayoutText {#text} at (0,0) size 335x19
+          text run at (0,0) width 335: "The square above should be 100 pixels tall and wide."
+      LayoutNGBlockFlow (anonymous) at (0,361) size 769x100
+        LayoutImage {IMG} at (0,0) size 30x100
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,477) size 769x40
+        LayoutText {#text} at (0,0) size 750x39
+          text run at (0,0) width 750: "The rectangular image above should be 100 pixels tall and 30 pixels wide (the original image is 50x15, and the size has"
+          text run at (0,20) width 150: "been doubled using the "
+        LayoutInline {CODE} at (0,0) size 48x16
+          LayoutText {#text} at (150,23) size 48x16
+            text run at (150,23) width 48: "height"
+        LayoutText {#text} at (198,20) size 66x19
+          text run at (198,20) width 66: " property)."
+      LayoutTable {TABLE} at (0,533) size 769x448 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x446
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x418
+            LayoutNGTableCell {TD} at (0,223) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,199) size 4x19
+                text run at (4,199) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x418 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow (anonymous) at (4,4) size 747x50
+                LayoutImage {IMG} at (0,0) size 50x50
+                LayoutText {#text} at (0,0) size 0x0
+              LayoutNGBlockFlow {P} at (4,70) size 747x20
+                LayoutText {#text} at (0,0) size 275x19
+                  text run at (0,0) width 275: "The square above should be fifty pixels tall."
+              LayoutNGBlockFlow (anonymous) at (4,106) size 747x100
+                LayoutImage {IMG} at (0,0) size 100x100
+                LayoutText {#text} at (0,0) size 0x0
+              LayoutNGBlockFlow {P} at (4,222) size 747x20
+                LayoutText {#text} at (0,0) size 335x19
+                  text run at (0,0) width 335: "The square above should be 100 pixels tall and wide."
+              LayoutNGBlockFlow (anonymous) at (4,258) size 747x100
+                LayoutImage {IMG} at (0,0) size 30x100
+                LayoutText {#text} at (0,0) size 0x0
+              LayoutNGBlockFlow {P} at (4,374) size 747x40
+                LayoutText {#text} at (0,0) size 725x39
+                  text run at (0,0) width 725: "The rectangular image above should be 100 pixels tall and 30 pixels wide (the original image is 50x15, and the size"
+                  text run at (0,20) width 175: "has been doubled using the "
+                LayoutInline {CODE} at (0,0) size 48x16
+                  LayoutText {#text} at (175,23) size 48x16
+                    text run at (175,23) width 48: "height"
+                LayoutText {#text} at (223,20) size 66x19
+                  text run at (223,20) width 66: " property)."
+layer at (8,105) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom-expected.txt
new file mode 100644
index 0000000..b9a6cc3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom-expected.txt
@@ -0,0 +1,163 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1822
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1822 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1822.25
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1806.25 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x144
+        LayoutText {#text} at (0,0) size 416x128
+          text run at (0,0) width 408: ".zero {background-color: silver; margin-bottom: 0;}"
+          text run at (408,0) width 0: " "
+          text run at (0,16) width 416: ".one {margin-bottom: 0.5in; background-color: aqua;}"
+          text run at (416,16) width 0: " "
+          text run at (0,32) width 408: ".two {margin-bottom: 25px; background-color: aqua;}"
+          text run at (408,32) width 0: " "
+          text run at (0,48) width 416: ".three {margin-bottom: 5em; background-color: aqua;}"
+          text run at (416,48) width 0: " "
+          text run at (0,64) width 408: ".four {margin-bottom: 25%; background-color: aqua;}"
+          text run at (408,64) width 0: " "
+          text run at (0,80) width 224: ".five {margin-bottom: 25px;}"
+          text run at (224,80) width 0: " "
+          text run at (0,96) width 416: ".six {margin-bottom: -10px; background-color: aqua;}"
+          text run at (416,96) width 0: " "
+          text run at (0,112) width 176: "P, UL {margin-top: 0;}"
+          text run at (176,112) width 0: " "
+          text run at (0,128) width 0: " "
+      LayoutNGBlockFlow {P} at (0,203) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,223) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 740x39
+          text run at (0,0) width 740: "This sentence should have a bottom margin of half an inch, which will require extra text in order to make sure that the"
+          text run at (0,20) width 203: "margin isn't applied to each line."
+      LayoutNGBlockFlow {P} at (0,311) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 723x39
+          text run at (0,0) width 723: "This sentence should have a bottom margin of 25 pixels, which will require extra text in order to make sure that the"
+          text run at (0,20) width 203: "margin isn't applied to each line."
+      LayoutNGBlockFlow {P} at (0,376) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 745x39
+          text run at (0,0) width 745: "This sentence should have a bottom margin of 5 em, which will require extra text in order to make sure that the margin"
+          text run at (0,20) width 155: "isn't applied to each line."
+      LayoutNGBlockFlow {P} at (0,496) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 767x39
+          text run at (0,0) width 767: "This element should have a bottom margin of 25%, which will require extra text in order to make sure that the margin isn't"
+          text run at (0,20) width 126: "applied to each line."
+      LayoutNGBlockFlow {P} at (0,728.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,748.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 232x19
+          text run at (0,0) width 232: "This element also has a class of zero."
+      LayoutNGBlockFlow {UL} at (0,768.25) size 769x105 [bgcolor=#00FFFF]
+        LayoutNGListItem {LI} at (40,0) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 424x19
+            text run at (0,0) width 424: "This list has a margin-bottom of 25px, and a light blue background."
+        LayoutNGListItem {LI} at (40,20) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 264x19
+            text run at (0,0) width 264: "Therefore, it ought to have such a margin."
+        LayoutNGListItem {LI} at (40,40) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 591x19
+            text run at (0,0) width 591: "This list item has a bottom margin of 25px, which should cause it to be offset in some fashion."
+        LayoutNGListItem {LI} at (40,85) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 294x19
+            text run at (0,0) width 294: "This list item has no special styles applied to it."
+      LayoutNGBlockFlow {P} at (0,898.25) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 759x59
+          text run at (0,0) width 748: "This paragraph has a bottom margin of -10px, which should cause elements after it to be shifted \"upward\" on the page,"
+          text run at (0,20) width 759: "and no top margin. No other styles have been applied to it besides a light blue background color. In all other respects, the"
+          text run at (0,40) width 166: "element should be normal."
+      LayoutNGBlockFlow {P} at (0,948.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,968.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 232x19
+          text run at (0,0) width 232: "This element also has a class of zero."
+      LayoutTable {TABLE} at (0,988.25) size 769x818 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x816
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x788
+            LayoutNGTableCell {TD} at (0,408) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,384) size 4x19
+                text run at (4,384) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x787.75 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,24) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 740x39
+                  text run at (0,0) width 740: "This sentence should have a bottom margin of half an inch, which will require extra text in order to make sure that the"
+                  text run at (0,20) width 203: "margin isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,112) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 723x39
+                  text run at (0,0) width 723: "This sentence should have a bottom margin of 25 pixels, which will require extra text in order to make sure that the"
+                  text run at (0,20) width 203: "margin isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,177) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 745x39
+                  text run at (0,0) width 745: "This sentence should have a bottom margin of 5 em, which will require extra text in order to make sure that the margin"
+                  text run at (0,20) width 155: "isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,297) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 738x39
+                  text run at (0,0) width 738: "This element should have a bottom margin of 25%, which will require extra text in order to make sure that the margin"
+                  text run at (0,20) width 155: "isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,523.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,543.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 232x19
+                  text run at (0,0) width 232: "This element also has a class of zero."
+              LayoutNGBlockFlow {UL} at (4,563.75) size 747x105 [bgcolor=#00FFFF]
+                LayoutNGListItem {LI} at (40,0) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 424x19
+                    text run at (0,0) width 424: "This list has a margin-bottom of 25px, and a light blue background."
+                LayoutNGListItem {LI} at (40,20) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 264x19
+                    text run at (0,0) width 264: "Therefore, it ought to have such a margin."
+                LayoutNGListItem {LI} at (40,40) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 591x19
+                    text run at (0,0) width 591: "This list item has a bottom margin of 25px, which should cause it to be offset in some fashion."
+                LayoutNGListItem {LI} at (40,85) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 294x19
+                    text run at (0,0) width 294: "This list item has no special styles applied to it."
+              LayoutNGBlockFlow {P} at (4,693.75) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 716x59
+                  text run at (0,0) width 710: "This paragraph has a bottom margin of -10px, which should cause elements after it to be shifted \"upward\" on the"
+                  text run at (0,20) width 716: "page, and no top margin. No other styles have been applied to it besides a light blue background color. In all other"
+                  text run at (0,40) width 247: "respects, the element should be normal."
+              LayoutNGBlockFlow {P} at (4,743.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,763.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 232x19
+                  text run at (0,0) width 232: "This element also has a class of zero."
+layer at (8,201) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,193) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom_inline-expected.txt
new file mode 100644
index 0000000..f5a2509
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom_inline-expected.txt
@@ -0,0 +1,88 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x32
+        LayoutText {#text} at (0,0) size 416x32
+          text run at (0,0) width 408: ".one {margin-bottom: 25px; background-color: aqua;}"
+          text run at (408,0) width 0: " "
+          text run at (0,16) width 416: ".two {margin-bottom: -10px; background-color: aqua;}"
+          text run at (416,16) width 0: " "
+      LayoutNGBlockFlow {P} at (0,99) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 480x19
+          text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+        LayoutInline {SPAN} at (0,0) size 760x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (479,0) size 144x19
+            text run at (479,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (622,3) size 25x16
+              text run at (622,3) width 25: "one"
+          LayoutText {#text} at (646,0) size 760x39
+            text run at (646,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 245: "background and a 25px bottom margin"
+        LayoutText {#text} at (244,20) size 784x39
+          text run at (244,20) width 540: ". Margins on inline elements does not affect line-height calculations, so all lines in this"
+          text run at (0,40) width 263: "element should have the same line-height."
+      LayoutNGBlockFlow {P} at (0,175) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 480x19
+          text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+        LayoutInline {SPAN} at (0,0) size 760x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (479,0) size 144x19
+            text run at (479,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (622,3) size 25x16
+              text run at (622,3) width 25: "two"
+          LayoutText {#text} at (646,0) size 760x39
+            text run at (646,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 250: "background and a -10px bottom margin"
+        LayoutText {#text} at (249,20) size 763x39
+          text run at (249,20) width 514: ". Margins on inline elements does not affect line-height calculations, so all lines in"
+          text run at (0,40) width 289: "this element should have the same line-height."
+      LayoutTable {TABLE} at (0,251) size 784x174 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x172
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x144
+            LayoutNGTableCell {TD} at (0,86) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,62) size 4x19
+                text run at (4,62) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x144 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 480x19
+                  text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+                LayoutInline {SPAN} at (0,0) size 760x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (479,0) size 144x19
+                    text run at (479,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (622,3) size 25x16
+                      text run at (622,3) width 25: "one"
+                  LayoutText {#text} at (646,0) size 760x39
+                    text run at (646,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 245: "background and a 25px bottom margin"
+                LayoutText {#text} at (244,20) size 758x39
+                  text run at (244,20) width 514: ". Margins on inline elements does not affect line-height calculations, so all lines in"
+                  text run at (0,40) width 289: "this element should have the same line-height."
+              LayoutNGBlockFlow {P} at (4,80) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 480x19
+                  text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+                LayoutInline {SPAN} at (0,0) size 760x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (479,0) size 144x19
+                    text run at (479,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (622,3) size 25x16
+                      text run at (622,3) width 25: "two"
+                  LayoutText {#text} at (646,0) size 760x39
+                    text run at (646,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 250: "background and a -10px bottom margin"
+                LayoutText {#text} at (249,20) size 747x39
+                  text run at (249,20) width 498: ". Margins on inline elements does not affect line-height calculations, so all lines"
+                  text run at (0,40) width 305: "in this element should have the same line-height."
+layer at (8,89) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,81) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_inline-expected.txt
new file mode 100644
index 0000000..822ed81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_inline-expected.txt
@@ -0,0 +1,113 @@
+layer at (0,0) size 800x600 scrollHeight 749
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x749 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x749
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x733 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 360x48
+          text run at (0,0) width 352: ".zero {background-color: silver; margin: 0;}"
+          text run at (352,0) width 0: " "
+          text run at (0,16) width 352: ".one {margin: 25px; background-color: aqua;}"
+          text run at (352,16) width 0: " "
+          text run at (0,32) width 360: ".two {margin: -10px; background-color: aqua;}"
+          text run at (360,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,107) size 784x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,143) size 784x80 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 480x19
+          text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+        LayoutInline {SPAN} at (0,0) size 751x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (504,0) size 144x19
+            text run at (504,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (647,3) size 25x16
+              text run at (647,3) width 25: "one"
+          LayoutText {#text} at (671,0) size 751x39
+            text run at (671,0) width 80: ", giving it an"
+            text run at (0,20) width 231: "aqua background and a 25px margin"
+        LayoutText {#text} at (255,20) size 769x59
+          text run at (255,20) width 514: ". Margins on inline elements does not affect line-height calculations, so all lines in"
+          text run at (0,40) width 766: "this element should have the same line-height. However, there should be a 25px margin to the left side of the inline box in"
+          text run at (0,60) width 727: "the first line it appears, and a 25px margin to the right side of the inline element box in the last line where it appears."
+      LayoutNGBlockFlow {P} at (0,239) size 784x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,275) size 784x80 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 480x19
+          text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+        LayoutInline {SPAN} at (0,0) size 750x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (469,0) size 144x19
+            text run at (469,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (612,3) size 25x16
+              text run at (612,3) width 25: "two"
+          LayoutText {#text} at (636,0) size 750x39
+            text run at (636,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 202: "background and a -10px margin"
+        LayoutText {#text} at (191,20) size 784x59
+          text run at (191,20) width 593: ". Margins on inline elements does not affect line-height calculations, so all lines in this element"
+          text run at (0,40) width 782: "should have the same line-height. However, there should be a -10px margin to the left side of the inline box in the first line it"
+          text run at (0,60) width 642: "appears, and a -10px margin to the right side of the inline element box in the last line where it appears."
+      LayoutNGBlockFlow {P} at (0,371) size 784x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutTable {TABLE} at (0,391) size 784x342 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x340
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x312
+            LayoutNGTableCell {TD} at (0,170) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,146) size 4x19
+                text run at (4,146) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x312 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,40) size 762x100 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 480x19
+                  text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+                LayoutInline {SPAN} at (0,0) size 751x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (504,0) size 144x19
+                    text run at (504,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (647,3) size 25x16
+                      text run at (647,3) width 25: "one"
+                  LayoutText {#text} at (671,0) size 751x39
+                    text run at (671,0) width 80: ", giving it an"
+                    text run at (0,20) width 231: "aqua background and a 25px margin"
+                LayoutText {#text} at (255,20) size 753x79
+                  text run at (255,20) width 498: ". Margins on inline elements does not affect line-height calculations, so all lines"
+                  text run at (0,40) width 738: "in this element should have the same line-height. However, there should be a 25px margin to the left side of the inline"
+                  text run at (0,60) width 715: "box in the first line it appears, and a 25px margin to the right side of the inline element box in the last line where it"
+                  text run at (0,80) width 52: "appears."
+              LayoutNGBlockFlow {P} at (4,156) size 762x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,192) size 762x80 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 480x19
+                  text run at (0,0) width 480: "This element is unstyled save for a background color of gray.. It contains an "
+                LayoutInline {SPAN} at (0,0) size 750x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (469,0) size 144x19
+                    text run at (469,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (612,3) size 25x16
+                      text run at (612,3) width 25: "two"
+                  LayoutText {#text} at (636,0) size 750x39
+                    text run at (636,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 202: "background and a -10px margin"
+                LayoutText {#text} at (191,20) size 745x59
+                  text run at (191,20) width 540: ". Margins on inline elements does not affect line-height calculations, so all lines in this"
+                  text run at (0,40) width 745: "element should have the same line-height. However, there should be a -10px margin to the left side of the inline box in"
+                  text run at (0,60) width 732: "the first line it appears, and a -10px margin to the right side of the inline element box in the last line where it appears."
+              LayoutNGBlockFlow {P} at (4,288) size 762x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_left_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_left_inline-expected.txt
new file mode 100644
index 0000000..673caa2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_left_inline-expected.txt
@@ -0,0 +1,96 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x32
+        LayoutText {#text} at (0,0) size 400x32
+          text run at (0,0) width 392: ".one {margin-left: 25px; background-color: aqua;}"
+          text run at (392,0) width 0: " "
+          text run at (0,16) width 400: ".two {margin-left: -10px; background-color: aqua;}"
+          text run at (400,16) width 0: " "
+      LayoutNGBlockFlow {P} at (0,99) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (566,0) size 144x19
+            text run at (566,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (709,3) size 25x16
+              text run at (709,3) width 25: "one"
+        LayoutText {#text} at (733,0) size 781x39
+          text run at (733,0) width 48: ", which"
+          text run at (0,20) width 299: "should result in 25-pixel left margin only in the "
+        LayoutInline {STRONG} at (0,0) size 28x19
+          LayoutText {#text} at (298,20) size 28x19
+            text run at (298,20) width 28: "first"
+        LayoutText {#text} at (325,20) size 233x19
+          text run at (325,20) width 233: " line in which the inline box appears."
+      LayoutNGBlockFlow {P} at (0,155) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (531,0) size 144x19
+            text run at (531,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (674,3) size 25x16
+              text run at (674,3) width 25: "two"
+        LayoutText {#text} at (698,0) size 746x39
+          text run at (698,0) width 48: ", which"
+          text run at (0,20) width 284: "should result in -10px left margin only in the "
+        LayoutInline {STRONG} at (0,0) size 28x19
+          LayoutText {#text} at (283,20) size 28x19
+            text run at (283,20) width 28: "first"
+        LayoutText {#text} at (310,20) size 233x19
+          text run at (310,20) width 233: " line in which the inline box appears."
+      LayoutTable {TABLE} at (0,211) size 784x134 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x132
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x104
+            LayoutNGTableCell {TD} at (0,66) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,42) size 4x19
+                text run at (4,42) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x104 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x40 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (566,0) size 144x19
+                    text run at (566,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (709,3) size 25x16
+                      text run at (709,3) width 25: "one"
+                LayoutText {#text} at (733,0) size 738x39
+                  text run at (733,0) width 5: ","
+                  text run at (0,20) width 342: "which should result in 25-pixel left margin only in the "
+                LayoutInline {STRONG} at (0,0) size 28x19
+                  LayoutText {#text} at (341,20) size 28x19
+                    text run at (341,20) width 28: "first"
+                LayoutText {#text} at (368,20) size 233x19
+                  text run at (368,20) width 233: " line in which the inline box appears."
+              LayoutNGBlockFlow {P} at (4,60) size 762x40 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (531,0) size 144x19
+                    text run at (531,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (674,3) size 25x16
+                      text run at (674,3) width 25: "two"
+                LayoutText {#text} at (698,0) size 746x39
+                  text run at (698,0) width 48: ", which"
+                  text run at (0,20) width 284: "should result in -10px left margin only in the "
+                LayoutInline {STRONG} at (0,0) size 28x19
+                  LayoutText {#text} at (283,20) size 28x19
+                    text run at (283,20) width 28: "first"
+                LayoutText {#text} at (310,20) size 233x19
+                  text run at (310,20) width 233: " line in which the inline box appears."
+layer at (8,89) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,81) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_right_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_right_inline-expected.txt
new file mode 100644
index 0000000..1ad1c91
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_right_inline-expected.txt
@@ -0,0 +1,96 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x32
+        LayoutText {#text} at (0,0) size 552x32
+          text run at (0,0) width 552: ".one {margin-right: 25px; text-align: right; background-color: aqua;}"
+          text run at (552,0) width 0: " "
+          text run at (0,16) width 408: ".two {margin-right: -10px; background-color: aqua;}"
+          text run at (408,16) width 0: " "
+      LayoutNGBlockFlow {P} at (0,99) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (541,0) size 144x19
+            text run at (541,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (684,3) size 25x16
+              text run at (684,3) width 25: "one"
+        LayoutText {#text} at (733,0) size 781x39
+          text run at (733,0) width 48: ", which"
+          text run at (0,20) width 308: "should result in 25-pixel right margin only in the "
+        LayoutInline {STRONG} at (0,0) size 24x19
+          LayoutText {#text} at (307,20) size 24x19
+            text run at (307,20) width 24: "last"
+        LayoutText {#text} at (330,20) size 233x19
+          text run at (330,20) width 233: " line in which the inline box appears."
+      LayoutNGBlockFlow {P} at (0,155) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (541,0) size 144x19
+            text run at (541,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (684,3) size 25x16
+              text run at (684,3) width 25: "two"
+        LayoutText {#text} at (698,0) size 746x39
+          text run at (698,0) width 48: ", which"
+          text run at (0,20) width 293: "should result in -10px right margin only in the "
+        LayoutInline {STRONG} at (0,0) size 24x19
+          LayoutText {#text} at (292,20) size 24x19
+            text run at (292,20) width 24: "last"
+        LayoutText {#text} at (315,20) size 233x19
+          text run at (315,20) width 233: " line in which the inline box appears."
+      LayoutTable {TABLE} at (0,211) size 784x134 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x132
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x104
+            LayoutNGTableCell {TD} at (0,66) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,42) size 4x19
+                text run at (4,42) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x104 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x40 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (541,0) size 144x19
+                    text run at (541,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (684,3) size 25x16
+                      text run at (684,3) width 25: "one"
+                LayoutText {#text} at (733,0) size 738x39
+                  text run at (733,0) width 5: ","
+                  text run at (0,20) width 351: "which should result in 25-pixel right margin only in the "
+                LayoutInline {STRONG} at (0,0) size 24x19
+                  LayoutText {#text} at (350,20) size 24x19
+                    text run at (350,20) width 24: "last"
+                LayoutText {#text} at (373,20) size 233x19
+                  text run at (373,20) width 233: " line in which the inline box appears."
+              LayoutNGBlockFlow {P} at (4,60) size 762x40 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (541,0) size 144x19
+                    text run at (541,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (684,3) size 25x16
+                      text run at (684,3) width 25: "two"
+                LayoutText {#text} at (698,0) size 746x39
+                  text run at (698,0) width 48: ", which"
+                  text run at (0,20) width 293: "should result in -10px right margin only in the "
+                LayoutInline {STRONG} at (0,0) size 24x19
+                  LayoutText {#text} at (292,20) size 24x19
+                    text run at (292,20) width 24: "last"
+                LayoutText {#text} at (315,20) size 233x19
+                  text run at (315,20) width 233: " line in which the inline box appears."
+layer at (8,89) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,81) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top-expected.txt
new file mode 100644
index 0000000..eda2de9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top-expected.txt
@@ -0,0 +1,150 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1723
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1723 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1723.25
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1707.25 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,33) size 769x128
+        LayoutText {#text} at (0,0) size 392x128
+          text run at (0,0) width 384: ".zero {background-color: silver; margin-top: 0;}"
+          text run at (384,0) width 0: " "
+          text run at (0,16) width 392: ".one {margin-top: 0.5in; background-color: aqua;}"
+          text run at (392,16) width 0: " "
+          text run at (0,32) width 384: ".two {margin-top: 25px; background-color: aqua;}"
+          text run at (384,32) width 0: " "
+          text run at (0,48) width 392: ".three {margin-top: 5em; background-color: aqua;}"
+          text run at (392,48) width 0: " "
+          text run at (0,64) width 384: ".four {margin-top: 25%; background-color: aqua;}"
+          text run at (384,64) width 0: " "
+          text run at (0,80) width 200: ".five {margin-top: 25px;}"
+          text run at (200,80) width 0: " "
+          text run at (0,96) width 392: ".six {margin-top: -10px; background-color: aqua;}"
+          text run at (392,96) width 0: " "
+          text run at (0,112) width 200: "P, UL {margin-bottom: 0;}"
+          text run at (200,112) width 0: " "
+      LayoutNGBlockFlow {P} at (0,184) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,204) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 232x19
+          text run at (0,0) width 232: "This element also has a class of zero."
+      LayoutNGBlockFlow {P} at (0,272) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 759x39
+          text run at (0,0) width 759: "This element should have a top margin of half an inch, which will require extra text in order to make sure that the margin"
+          text run at (0,20) width 155: "isn't applied to each line."
+      LayoutNGBlockFlow {P} at (0,337) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 742x39
+          text run at (0,0) width 742: "This element should have a top margin of 25 pixels, which will require extra text in order to make sure that the margin"
+          text run at (0,20) width 155: "isn't applied to each line."
+      LayoutNGBlockFlow {P} at (0,457) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 745x39
+          text run at (0,0) width 745: "This element should have a top margin of 5 em, which will require extra text in order to make sure that the margin isn't"
+          text run at (0,20) width 126: "applied to each line."
+      LayoutNGBlockFlow {P} at (0,689.25) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 753x39
+          text run at (0,0) width 753: "This element should have a top margin of 25%, which is calculated with respect to the width of the parent element. This"
+          text run at (0,20) width 232: "will require extra text in order to test."
+      LayoutNGBlockFlow {UL} at (0,754.25) size 769x105 [bgcolor=#00FFFF]
+        LayoutNGListItem {LI} at (40,0) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 400x19
+            text run at (0,0) width 400: "This list has a margin-top of 25px, and a light blue background."
+        LayoutNGListItem {LI} at (40,20) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 264x19
+            text run at (0,0) width 264: "Therefore, it ought to have such a margin."
+        LayoutNGListItem {LI} at (40,65) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 567x19
+            text run at (0,0) width 567: "This list item has a top margin of 25px, which should cause it to be offset in some fashion."
+        LayoutNGListItem {LI} at (40,85) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 294x19
+            text run at (0,0) width 294: "This list item has no special styles applied to it."
+      LayoutNGBlockFlow {P} at (0,859.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,869.25) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 766x59
+          text run at (0,0) width 766: "This element has a top margin of -10px, which should cause it to be shifted \"upward\" on the page, and no bottom margin."
+          text run at (0,20) width 755: "No other styles have been applied to it besides a light blue background color. In all other respects, the element should be"
+          text run at (0,40) width 48: "normal."
+      LayoutTable {TABLE} at (0,929.25) size 769x778 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x776
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x748
+            LayoutNGTableCell {TD} at (0,388) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,364) size 4x19
+                text run at (4,364) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x747.75 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,24) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 232x19
+                  text run at (0,0) width 232: "This element also has a class of zero."
+              LayoutNGBlockFlow {P} at (4,92) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 711x39
+                  text run at (0,0) width 711: "This element should have a top margin of half an inch, which will require extra text in order to make sure that the"
+                  text run at (0,20) width 203: "margin isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,157) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 742x39
+                  text run at (0,0) width 742: "This element should have a top margin of 25 pixels, which will require extra text in order to make sure that the margin"
+                  text run at (0,20) width 155: "isn't applied to each line."
+              LayoutNGBlockFlow {P} at (4,277) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 745x39
+                  text run at (0,0) width 745: "This element should have a top margin of 5 em, which will require extra text in order to make sure that the margin isn't"
+                  text run at (0,20) width 126: "applied to each line."
+              LayoutNGBlockFlow {P} at (4,503.75) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 721x39
+                  text run at (0,0) width 721: "This element should have a top margin of 25%, which is calculated with respect to the width of the parent element."
+                  text run at (0,20) width 264: "This will require extra text in order to test."
+              LayoutNGBlockFlow {UL} at (4,568.75) size 747x105 [bgcolor=#00FFFF]
+                LayoutNGListItem {LI} at (40,0) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 400x19
+                    text run at (0,0) width 400: "This list has a margin-top of 25px, and a light blue background."
+                LayoutNGListItem {LI} at (40,20) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 264x19
+                    text run at (0,0) width 264: "Therefore, it ought to have such a margin."
+                LayoutNGListItem {LI} at (40,65) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 567x19
+                    text run at (0,0) width 567: "This list item has a top margin of 25px, which should cause it to be offset in some fashion."
+                LayoutNGListItem {LI} at (40,85) size 707x20
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 294x19
+                    text run at (0,0) width 294: "This list item has no special styles applied to it."
+              LayoutNGBlockFlow {P} at (4,673.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,683.75) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 741x59
+                  text run at (0,0) width 714: "This element has a top margin of -10px, which should cause it to be shifted \"upward\" on the page, and no bottom"
+                  text run at (0,20) width 741: "margin. No other styles have been applied to it besides a light blue background color. In all other respects, the element"
+                  text run at (0,40) width 113: "should be normal."
+layer at (8,182) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,174) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top_inline-expected.txt
new file mode 100644
index 0000000..ccc14a6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top_inline-expected.txt
@@ -0,0 +1,91 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 392x48
+          text run at (0,0) width 384: ".zero {background-color: silver; margin-top: 0;}"
+          text run at (384,0) width 0: " "
+          text run at (0,16) width 384: ".one {margin-top: 25px; background-color: aqua;}"
+          text run at (384,16) width 0: " "
+          text run at (0,32) width 392: ".two {margin-top: -10px; background-color: aqua;}"
+          text run at (392,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "one"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 221: "background and a 25px top margin"
+        LayoutText {#text} at (220,20) size 747x39
+          text run at (220,20) width 527: ". Margins on inline elements do not affect line-height calculations, so all lines in this"
+          text run at (0,40) width 263: "element should have the same line-height."
+      LayoutNGBlockFlow {P} at (0,207) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 753x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "two"
+          LayoutText {#text} at (642,0) size 753x39
+            text run at (642,0) width 111: ", giving the inline"
+            text run at (0,20) width 332: "element an aqua background and a -10px top margin"
+        LayoutText {#text} at (331,20) size 783x39
+          text run at (331,20) width 452: ". Margins on inline elements do not affect line-height calculations, so all"
+          text run at (0,40) width 338: "lines in this element should have the same line-height."
+      LayoutTable {TABLE} at (0,283) size 784x174 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x172
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x144
+            LayoutNGTableCell {TD} at (0,86) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,62) size 4x19
+                text run at (4,62) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x144 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "one"
+                  LayoutText {#text} at (642,0) size 756x39
+                    text run at (642,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 221: "background and a 25px top margin"
+                LayoutText {#text} at (220,20) size 747x39
+                  text run at (220,20) width 527: ". Margins on inline elements do not affect line-height calculations, so all lines in this"
+                  text run at (0,40) width 263: "element should have the same line-height."
+              LayoutNGBlockFlow {P} at (4,80) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 753x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "two"
+                  LayoutText {#text} at (642,0) size 753x39
+                    text run at (642,0) width 111: ", giving the inline"
+                    text run at (0,20) width 332: "element an aqua background and a -10px top margin"
+                LayoutText {#text} at (331,20) size 746x39
+                  text run at (331,20) width 415: ". Margins on inline elements do not affect line-height calculations,"
+                  text run at (0,40) width 375: "so all lines in this element should have the same line-height."
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding-expected.txt
new file mode 100644
index 0000000..c2d32b8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding-expected.txt
@@ -0,0 +1,86 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2284
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2284 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2283.50
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2267.50 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 376x96
+          text run at (0,0) width 360: ".zero {background-color: silver; padding: 0;}"
+          text run at (360,0) width 0: " "
+          text run at (0,16) width 368: ".one {padding: 0.5in; background-color: aqua;}"
+          text run at (368,16) width 0: " "
+          text run at (0,32) width 360: ".two {padding: 25px; background-color: aqua;}"
+          text run at (360,32) width 0: " "
+          text run at (0,48) width 368: ".three {padding: 5em; background-color: aqua;}"
+          text run at (368,48) width 0: " "
+          text run at (0,64) width 360: ".four {padding: 25%; background-color: aqua;}"
+          text run at (360,64) width 0: " "
+          text run at (0,80) width 376: ".five {padding: -20px; background-color: aqua;}"
+          text run at (376,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,199) size 769x136 [bgcolor=#00FFFF]
+        LayoutText {#text} at (48,48) size 660x39
+          text run at (48,48) width 660: "This element should have an overall padding of half an inch, which will require extra text in order to test."
+          text run at (48,68) width 464: "Both the content background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,351) size 769x90 [bgcolor=#00FFFF]
+        LayoutText {#text} at (25,25) size 701x39
+          text run at (25,25) width 701: "This element should have an overall padding of 25 pixels, which will require extra text in order to test. Both the"
+          text run at (25,45) width 406: "content background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,457) size 769x200 [bgcolor=#00FFFF]
+        LayoutText {#text} at (80,80) size 588x39
+          text run at (80,80) width 588: "This element should have an overall padding of 5 em, which will require extra text in order to"
+          text run at (80,100) width 493: "test. Both the content background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,673) size 769x464.50 [bgcolor=#00FFFF]
+        LayoutText {#text} at (192,192) size 380x80
+          text run at (192,192) width 380: "This element should have an overall padding of 25%, which"
+          text run at (192,212) width 377: "is calculated with respect to the width of the parent element."
+          text run at (192,232) width 354: "Both the content background and the padding should be"
+          text run at (192,252) width 108: "aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,1153.50) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 751x39
+          text run at (0,0) width 751: "This element should have no padding, since negative padding values are not allowed. Both the content background and"
+          text run at (0,20) width 298: "the normal padding should be aqua (light blue)."
+      LayoutTable {TABLE} at (0,1209.50) size 769x1058 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x1056
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x1028
+            LayoutNGTableCell {TD} at (0,528) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,504) size 4x19
+                text run at (4,504) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x1027.50 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,40) size 747x136 [bgcolor=#00FFFF]
+                LayoutText {#text} at (48,48) size 631x39
+                  text run at (48,48) width 631: "This element should have an overall padding of half an inch, which will require extra text in order to"
+                  text run at (48,68) width 493: "test. Both the content background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,192) size 747x90 [bgcolor=#00FFFF]
+                LayoutText {#text} at (25,25) size 678x39
+                  text run at (25,25) width 678: "This element should have an overall padding of 25 pixels, which will require extra text in order to test. Both"
+                  text run at (25,45) width 429: "the content background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,298) size 747x200 [bgcolor=#00FFFF]
+                LayoutText {#text} at (80,80) size 572x39
+                  text run at (80,80) width 572: "This element should have an overall padding of 5 em, which will require extra text in order"
+                  text run at (80,100) width 509: "to test. Both the content background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,514) size 747x453.50 [bgcolor=#00FFFF]
+                LayoutText {#text} at (186,186) size 363x80
+                  text run at (186,186) width 337: "This element should have an overall padding of 25%,"
+                  text run at (186,206) width 363: "which is calculated with respect to the width of the parent"
+                  text run at (186,226) width 346: "element. Both the content background and the padding"
+                  text run at (186,246) width 173: "should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,983.50) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 724x39
+                  text run at (0,0) width 724: "This element should have no padding, since negative padding values are not allowed. Both the content background"
+                  text run at (0,20) width 325: "and the normal padding should be aqua (light blue)."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom-expected.txt
new file mode 100644
index 0000000..81fa836
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom-expected.txt
@@ -0,0 +1,89 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1610
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1610 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1610.25
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1594.25 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 432x96
+          text run at (0,0) width 416: ".zero {background-color: silver; padding-bottom: 0;}"
+          text run at (416,0) width 0: " "
+          text run at (0,16) width 424: ".one {padding-bottom: 0.5in; background-color: aqua;}"
+          text run at (424,16) width 0: " "
+          text run at (0,32) width 416: ".two {padding-bottom: 25px; background-color: aqua;}"
+          text run at (416,32) width 0: " "
+          text run at (0,48) width 424: ".three {padding-bottom: 5em; background-color: aqua;}"
+          text run at (424,48) width 0: " "
+          text run at (0,64) width 416: ".four {padding-bottom: 25%; background-color: aqua;}"
+          text run at (416,64) width 0: " "
+          text run at (0,80) width 432: ".five {padding-bottom: -20px; background-color: aqua;}"
+          text run at (432,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,199) size 769x88 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 761x39
+          text run at (0,0) width 761: "This element should have a bottom padding of half an inch, which will require extra text in order to test. Both the content"
+          text run at (0,20) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,303) size 769x65 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 744x39
+          text run at (0,0) width 744: "This element should have a bottom padding of 25 pixels, which will require extra text in order to test. Both the content"
+          text run at (0,20) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,384) size 769x120 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 718x39
+          text run at (0,0) width 718: "This element should have a bottom padding of 5 em, which will require extra text in order to test. Both the content"
+          text run at (0,20) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,520) size 769x232.25 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 752x39
+          text run at (0,0) width 752: "This element should have a bottom padding of 25%, which is calculated with respect to the width of the parent element."
+          text run at (0,20) width 732: "This will require extra text in order to test. Both the content background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,768.25) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,804.25) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 693x39
+          text run at (0,0) width 693: "This element should have no bottom padding, since negative padding values are not allowed. Both the content"
+          text run at (0,20) width 404: "background and the normal padding should be aqua (light blue)."
+      LayoutTable {TABLE} at (0,860.25) size 769x734 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x732
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x704
+            LayoutNGTableCell {TD} at (0,366) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,342) size 4x19
+                text run at (4,342) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x703.75 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,40) size 747x88 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 711x39
+                  text run at (0,0) width 711: "This element should have a bottom padding of half an inch, which will require extra text in order to test. Both the"
+                  text run at (0,20) width 406: "content background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,144) size 747x65 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 744x39
+                  text run at (0,0) width 744: "This element should have a bottom padding of 25 pixels, which will require extra text in order to test. Both the content"
+                  text run at (0,20) width 356: "background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,225) size 747x120 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 718x39
+                  text run at (0,0) width 718: "This element should have a bottom padding of 5 em, which will require extra text in order to test. Both the content"
+                  text run at (0,20) width 356: "background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,361) size 747x246.75 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 712x59
+                  text run at (0,0) width 695: "This element should have a bottom padding of 25%, which is calculated with respect to the width of the parent"
+                  text run at (0,20) width 712: "element. This will require extra text in order to test. Both the content background and the padding should be aqua"
+                  text run at (0,40) width 73: "(light blue)."
+              LayoutNGBlockFlow {P} at (4,623.75) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,659.75) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 693x39
+                  text run at (0,0) width 693: "This element should have no bottom padding, since negative padding values are not allowed. Both the content"
+                  text run at (0,20) width 404: "background and the normal padding should be aqua (light blue)."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom_inline-expected.txt
new file mode 100644
index 0000000..284005f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom_inline-expected.txt
@@ -0,0 +1,91 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 424x32
+          text run at (0,0) width 416: ".one {padding-bottom: 25px; background-color: aqua;}"
+          text run at (416,0) width 0: " "
+          text run at (0,16) width 424: ".two {padding-bottom: -10px; background-color: aqua;}"
+          text run at (424,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x80 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x64 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "one"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 252: "background and a 25px bottom padding"
+        LayoutText {#text} at (252,20) size 781x59
+          text run at (252,20) width 513: ". Padding on inline elements does not affect line-height calculations, so all lines in"
+          text run at (0,40) width 781: "this element should have the same line-height. There may be implementation-specific limits on how much of the padding the"
+          text run at (0,60) width 176: "user agent is able to display."
+      LayoutNGBlockFlow {P} at (0,211) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "two"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 522: "background and no bottom padding, since negative padding values are not allowed"
+        LayoutText {#text} at (522,20) size 757x39
+          text run at (522,20) width 235: ". Padding on inline elements does not"
+          text run at (0,40) width 567: "affect line-height calculations, so all lines in this element should have the same line-height."
+      LayoutTable {TABLE} at (0,287) size 784x194 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x192
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x164
+            LayoutNGTableCell {TD} at (0,96) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,72) size 4x19
+                text run at (4,72) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x164 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x80 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 756x64 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "one"
+                  LayoutText {#text} at (642,0) size 756x39
+                    text run at (642,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 252: "background and a 25px bottom padding"
+                LayoutText {#text} at (252,20) size 749x59
+                  text run at (252,20) width 497: ". Padding on inline elements does not affect line-height calculations, so all lines"
+                  text run at (0,40) width 719: "in this element should have the same line-height. There may be implementation-specific limits on how much of the"
+                  text run at (0,60) width 254: "padding the user agent is able to display."
+              LayoutNGBlockFlow {P} at (4,100) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "two"
+                  LayoutText {#text} at (642,0) size 756x39
+                    text run at (642,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 522: "background and no bottom padding, since negative padding values are not allowed"
+                LayoutText {#text} at (522,20) size 757x39
+                  text run at (522,20) width 235: ". Padding on inline elements does not"
+                  text run at (0,40) width 567: "affect line-height calculations, so all lines in this element should have the same line-height."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_inline-expected.txt
new file mode 100644
index 0000000..2a3104d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_inline-expected.txt
@@ -0,0 +1,115 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 809
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x809 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x809
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x793 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x64
+        LayoutText {#text} at (0,0) size 368x48
+          text run at (0,0) width 360: ".zero {background-color: silver; padding: 0;}"
+          text run at (360,0) width 0: " "
+          text run at (0,16) width 360: ".one {padding: 25px; background-color: aqua;}"
+          text run at (360,16) width 0: " "
+          text run at (0,32) width 368: ".two {padding: -10px; background-color: aqua;}"
+          text run at (368,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,167) size 769x120 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 747x89 [bgcolor=#00FFFF]
+          LayoutText {#text} at (500,0) size 144x19
+            text run at (500,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (643,3) size 25x16
+              text run at (643,3) width 25: "one"
+          LayoutText {#text} at (667,0) size 747x39
+            text run at (667,0) width 80: ", giving it an"
+            text run at (0,20) width 238: "aqua background and a 25px padding"
+        LayoutText {#text} at (263,20) size 765x99
+          text run at (263,20) width 497: ". Padding on inline elements does not affect line-height calculations, so all lines"
+          text run at (0,40) width 719: "in this element should have the same line-height. There may be implementation-specific limits on how much of the"
+          text run at (0,60) width 765: "padding the user agent is able to display above and below each line. However, there should be at least 25px of padding to"
+          text run at (0,80) width 753: "the left side of the inline box in the first line it appears, and 25px of padding to the right side of the inline element box in"
+          text run at (0,100) width 182: "the last line where it appears."
+      LayoutNGBlockFlow {P} at (0,303) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,339) size 769x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "two"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 474: "background and no padding, since negative padding values are not allowed"
+        LayoutText {#text} at (474,20) size 748x39
+          text run at (474,20) width 274: ". Padding on inline elements does not affect"
+          text run at (0,40) width 528: "line-height calculations, so all lines in this element should have the same line-height."
+      LayoutNGBlockFlow {P} at (0,415) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutTable {TABLE} at (0,451) size 769x342 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x340
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x312
+            LayoutNGTableCell {TD} at (0,170) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,146) size 4x19
+                text run at (4,146) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x312 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,40) size 747x120 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 747x89 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (500,0) size 144x19
+                    text run at (500,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (643,3) size 25x16
+                      text run at (643,3) width 25: "one"
+                  LayoutText {#text} at (667,0) size 747x39
+                    text run at (667,0) width 80: ", giving it an"
+                    text run at (0,20) width 238: "aqua background and a 25px padding"
+                LayoutText {#text} at (263,20) size 729x99
+                  text run at (263,20) width 464: ". Padding on inline elements does not affect line-height calculations, so all"
+                  text run at (0,40) width 729: "lines in this element should have the same line-height. There may be implementation-specific limits on how much of"
+                  text run at (0,60) width 717: "the padding the user agent is able to display above and below each line. However, there should be at least 25px of"
+                  text run at (0,80) width 727: "padding to the left side of the inline box in the first line it appears, and 25px of padding to the right side of the inline"
+                  text run at (0,100) width 279: "element box in the last line where it appears."
+              LayoutNGBlockFlow {P} at (4,176) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,212) size 747x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 722x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "two"
+                  LayoutText {#text} at (642,0) size 722x39
+                    text run at (642,0) width 80: ", giving it an"
+                    text run at (0,20) width 508: "aqua background and no padding, since negative padding values are not allowed"
+                LayoutText {#text} at (508,20) size 743x39
+                  text run at (508,20) width 235: ". Padding on inline elements does not"
+                  text run at (0,40) width 567: "affect line-height calculations, so all lines in this element should have the same line-height."
+              LayoutNGBlockFlow {P} at (4,288) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+layer at (8,121) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_left_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_left_inline-expected.txt
new file mode 100644
index 0000000..9b1fd01
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_left_inline-expected.txt
@@ -0,0 +1,99 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 408x32
+          text run at (0,0) width 400: ".one {padding-left: 25px; background-color: aqua;}"
+          text run at (400,0) width 0: " "
+          text run at (0,16) width 408: ".two {padding-left: -10px; background-color: aqua;}"
+          text run at (408,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 193x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (566,0) size 144x19
+            text run at (566,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (709,3) size 25x16
+              text run at (709,3) width 25: "one"
+        LayoutText {#text} at (733,0) size 777x39
+          text run at (733,0) width 44: " which"
+          text run at (0,20) width 527: "should result in 25-pixel left padding (which should also be a light blue) only in the "
+        LayoutInline {STRONG} at (0,0) size 27x19
+          LayoutText {#text} at (527,20) size 27x19
+            text run at (527,20) width 27: "first"
+        LayoutText {#text} at (554,20) size 730x39
+          text run at (554,20) width 176: " line in which the inline box"
+          text run at (0,40) width 52: "appears."
+      LayoutNGBlockFlow {P} at (0,191) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (541,0) size 144x19
+            text run at (541,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (684,3) size 25x16
+              text run at (684,3) width 25: "two"
+        LayoutText {#text} at (708,0) size 752x39
+          text run at (708,0) width 44: " which"
+          text run at (0,20) width 512: "should result in -10px left padding (which should also be a light blue) only in the "
+        LayoutInline {STRONG} at (0,0) size 27x19
+          LayoutText {#text} at (512,20) size 27x19
+            text run at (512,20) width 27: "first"
+        LayoutText {#text} at (539,20) size 232x19
+          text run at (539,20) width 232: " line in which the inline box appears."
+      LayoutTable {TABLE} at (0,247) size 784x174 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x172
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x144
+            LayoutNGTableCell {TD} at (0,86) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,62) size 4x19
+                text run at (4,62) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x144 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 193x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (566,0) size 144x19
+                    text run at (566,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (709,3) size 25x16
+                      text run at (709,3) width 25: "one"
+                LayoutText {#text} at (0,20) size 570x19
+                  text run at (0,20) width 570: "which should result in 25-pixel left padding (which should also be a light blue) only in the "
+                LayoutInline {STRONG} at (0,0) size 27x19
+                  LayoutText {#text} at (570,20) size 27x19
+                    text run at (570,20) width 27: "first"
+                LayoutText {#text} at (597,20) size 745x39
+                  text run at (597,20) width 148: " line in which the inline"
+                  text run at (0,40) width 80: "box appears."
+              LayoutNGBlockFlow {P} at (4,80) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (541,0) size 144x19
+                    text run at (541,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (684,3) size 25x16
+                      text run at (684,3) width 25: "two"
+                LayoutText {#text} at (708,0) size 752x39
+                  text run at (708,0) width 44: " which"
+                  text run at (0,20) width 512: "should result in -10px left padding (which should also be a light blue) only in the "
+                LayoutInline {STRONG} at (0,0) size 27x19
+                  LayoutText {#text} at (512,20) size 27x19
+                    text run at (512,20) width 27: "first"
+                LayoutText {#text} at (539,20) size 715x39
+                  text run at (539,20) width 176: " line in which the inline box"
+                  text run at (0,40) width 52: "appears."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_right_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_right_inline-expected.txt
new file mode 100644
index 0000000..f149f12b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_right_inline-expected.txt
@@ -0,0 +1,100 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 568x32
+          text run at (0,0) width 560: ".one {padding-right: 25px; text-align: right; background-color: aqua;}"
+          text run at (560,0) width 0: " "
+          text run at (0,16) width 568: ".two {padding-right: -10px; text-align: right; background-color: aqua;}"
+          text run at (568,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x40 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 193x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (541,0) size 144x19
+            text run at (541,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (684,3) size 25x16
+              text run at (684,3) width 25: "one"
+        LayoutText {#text} at (733,0) size 781x39
+          text run at (733,0) width 48: ", which"
+          text run at (0,20) width 525: "should result in 25-pixel right padding (which should also be light blue) only in the "
+        LayoutInline {STRONG} at (0,0) size 23x19
+          LayoutText {#text} at (525,20) size 23x19
+            text run at (525,20) width 23: "last"
+        LayoutText {#text} at (548,20) size 232x19
+          text run at (548,20) width 232: " line in which the inline box appears."
+      LayoutNGBlockFlow {P} at (0,171) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 542x19
+          text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+        LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+          LayoutText {#text} at (541,0) size 144x19
+            text run at (541,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (684,3) size 25x16
+              text run at (684,3) width 25: "two"
+        LayoutText {#text} at (708,0) size 756x39
+          text run at (708,0) width 48: ", which"
+          text run at (0,20) width 548: "should result in no right padding, since negative padding values are not allowed, in the "
+        LayoutInline {STRONG} at (0,0) size 23x19
+          LayoutText {#text} at (548,20) size 23x19
+            text run at (548,20) width 23: "last"
+        LayoutText {#text} at (571,20) size 747x39
+          text run at (571,20) width 176: " line in which the inline box"
+          text run at (0,40) width 52: "appears."
+      LayoutTable {TABLE} at (0,247) size 784x174 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x172
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x144
+            LayoutNGTableCell {TD} at (0,86) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,62) size 4x19
+                text run at (4,62) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x144 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 193x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (541,0) size 144x19
+                    text run at (541,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (684,3) size 25x16
+                      text run at (684,3) width 25: "one"
+                LayoutText {#text} at (733,0) size 738x39
+                  text run at (733,0) width 5: ","
+                  text run at (0,20) width 568: "which should result in 25-pixel right padding (which should also be light blue) only in the "
+                LayoutInline {STRONG} at (0,0) size 23x19
+                  LayoutText {#text} at (568,20) size 23x19
+                    text run at (568,20) width 23: "last"
+                LayoutText {#text} at (591,20) size 739x39
+                  text run at (591,20) width 148: " line in which the inline"
+                  text run at (0,40) width 80: "box appears."
+              LayoutNGBlockFlow {P} at (4,80) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 542x19
+                  text run at (0,0) width 542: "This element is unstyled save for a background color of gray. However, it contains an "
+                LayoutInline {SPAN} at (0,0) size 168x19 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (541,0) size 144x19
+                    text run at (541,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (684,3) size 25x16
+                      text run at (684,3) width 25: "two"
+                LayoutText {#text} at (708,0) size 756x39
+                  text run at (708,0) width 48: ", which"
+                  text run at (0,20) width 548: "should result in no right padding, since negative padding values are not allowed, in the "
+                LayoutInline {STRONG} at (0,0) size 23x19
+                  LayoutText {#text} at (548,20) size 23x19
+                    text run at (548,20) width 23: "last"
+                LayoutText {#text} at (571,20) size 747x39
+                  text run at (571,20) width 176: " line in which the inline box"
+                  text run at (0,40) width 52: "appears."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top-expected.txt
new file mode 100644
index 0000000..5ed995b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1518
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1518 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1518.25
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1502.25 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x96
+        LayoutText {#text} at (0,0) size 408x96
+          text run at (0,0) width 392: ".zero {background-color: silver; padding-top: 0;}"
+          text run at (392,0) width 0: " "
+          text run at (0,16) width 400: ".one {padding-top: 0.5in; background-color: aqua;}"
+          text run at (400,16) width 0: " "
+          text run at (0,32) width 392: ".two {padding-top: 25px; background-color: aqua;}"
+          text run at (392,32) width 0: " "
+          text run at (0,48) width 400: ".three {padding-top: 5em; background-color: aqua;}"
+          text run at (400,48) width 0: " "
+          text run at (0,64) width 392: ".four {padding-top: 25%; background-color: aqua;}"
+          text run at (392,64) width 0: " "
+          text run at (0,80) width 408: ".five {padding-top: -20px; background-color: aqua;}"
+          text run at (408,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,163) size 769x20 [bgcolor=#C0C0C0]
+        LayoutText {#text} at (0,0) size 203x19
+          text run at (0,0) width 203: "This element has a class of zero."
+      LayoutNGBlockFlow {P} at (0,199) size 769x88 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,48) size 737x39
+          text run at (0,48) width 737: "This element should have a top padding of half an inch, which will require extra text in order to test. Both the content"
+          text run at (0,68) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,303) size 769x65 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,25) size 720x39
+          text run at (0,25) width 720: "This element should have a top padding of 25 pixels, which will require extra text in order to test. Both the content"
+          text run at (0,45) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,384) size 769x120 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,80) size 694x39
+          text run at (0,80) width 694: "This element should have a top padding of 5 em, which will require extra text in order to test. Both the content"
+          text run at (0,100) width 356: "background and the padding should be aqua (light blue)."
+      LayoutNGBlockFlow {P} at (0,520) size 769x232.25 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,192) size 763x40
+          text run at (0,192) width 763: "This element should have a top padding of 25%, which is calculated with respect to the width of the parent element. Both"
+          text run at (0,212) width 697: "the content background and the padding should be aqua (light blue). This will require extra text in order to test."
+      LayoutNGBlockFlow {P} at (0,768.25) size 769x40 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 748x39
+          text run at (0,0) width 748: "This element should have no top padding, since negative padding values are not allowed. Both the content background"
+          text run at (0,20) width 325: "and the normal padding should be aqua (light blue)."
+      LayoutTable {TABLE} at (0,824.25) size 769x678 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x676
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x648
+            LayoutNGTableCell {TD} at (0,338) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,314) size 4x19
+                text run at (4,314) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x647.75 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [bgcolor=#C0C0C0]
+                LayoutText {#text} at (0,0) size 203x19
+                  text run at (0,0) width 203: "This element has a class of zero."
+              LayoutNGBlockFlow {P} at (4,40) size 747x88 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,48) size 737x39
+                  text run at (0,48) width 737: "This element should have a top padding of half an inch, which will require extra text in order to test. Both the content"
+                  text run at (0,68) width 356: "background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,144) size 747x65 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,25) size 720x39
+                  text run at (0,25) width 720: "This element should have a top padding of 25 pixels, which will require extra text in order to test. Both the content"
+                  text run at (0,45) width 356: "background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,225) size 747x120 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,80) size 694x39
+                  text run at (0,80) width 694: "This element should have a top padding of 5 em, which will require extra text in order to test. Both the content"
+                  text run at (0,100) width 356: "background and the padding should be aqua (light blue)."
+              LayoutNGBlockFlow {P} at (4,361) size 747x226.75 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,186) size 732x40
+                  text run at (0,186) width 728: "This element should have a top padding of 25%, which is calculated with respect to the width of the parent element."
+                  text run at (0,206) width 732: "Both the content background and the padding should be aqua (light blue). This will require extra text in order to test."
+              LayoutNGBlockFlow {P} at (4,603.75) size 747x40 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 669x39
+                  text run at (0,0) width 669: "This element should have no top padding, since negative padding values are not allowed. Both the content"
+                  text run at (0,20) width 404: "background and the normal padding should be aqua (light blue)."
+layer at (8,153) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,145) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top_inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top_inline-expected.txt
new file mode 100644
index 0000000..20b1a15
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top_inline-expected.txt
@@ -0,0 +1,91 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 400x32
+          text run at (0,0) width 392: ".one {padding-top: 25px; background-color: aqua;}"
+          text run at (392,0) width 0: " "
+          text run at (0,16) width 400: ".two {padding-top: -10px; background-color: aqua;}"
+          text run at (400,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x80 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x64 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "one"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 228: "background and a 25px top padding"
+        LayoutText {#text} at (228,20) size 767x59
+          text run at (228,20) width 539: ". Padding on inline elements does not affect line-height calculations, so all lines in this"
+          text run at (0,40) width 755: "element should have the same line-height. There may be implementation-specific limits on how much of the padding the"
+          text run at (0,60) width 176: "user agent is able to display."
+      LayoutNGBlockFlow {P} at (0,211) size 784x60 [bgcolor=#808080]
+        LayoutText {#text} at (0,0) size 476x19
+          text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+        LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+          LayoutText {#text} at (475,0) size 144x19
+            text run at (475,0) width 144: "inline element of class "
+          LayoutInline {TT} at (0,0) size 25x16
+            LayoutText {#text} at (618,3) size 25x16
+              text run at (618,3) width 25: "two"
+          LayoutText {#text} at (642,0) size 756x39
+            text run at (642,0) width 114: ", giving it an aqua"
+            text run at (0,20) width 498: "background and no top padding, since negative padding values are not allowed"
+        LayoutText {#text} at (498,20) size 772x39
+          text run at (498,20) width 274: ". Padding on inline elements does not affect"
+          text run at (0,40) width 528: "line-height calculations, so all lines in this element should have the same line-height."
+      LayoutTable {TABLE} at (0,287) size 784x194 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x192
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x164
+            LayoutNGTableCell {TD} at (0,96) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,72) size 4x19
+                text run at (4,72) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x164 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x80 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 756x64 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "one"
+                  LayoutText {#text} at (642,0) size 756x39
+                    text run at (642,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 228: "background and a 25px top padding"
+                LayoutText {#text} at (228,20) size 758x59
+                  text run at (228,20) width 513: ". Padding on inline elements does not affect line-height calculations, so all lines in"
+                  text run at (0,40) width 758: "this element should have the same line-height. There may be implementation-specific limits on how much of the padding"
+                  text run at (0,60) width 199: "the user agent is able to display."
+              LayoutNGBlockFlow {P} at (4,100) size 762x60 [bgcolor=#808080]
+                LayoutText {#text} at (0,0) size 476x19
+                  text run at (0,0) width 476: "This element is unstyled save for a background color of gray. It contains an "
+                LayoutInline {SPAN} at (0,0) size 756x39 [bgcolor=#00FFFF]
+                  LayoutText {#text} at (475,0) size 144x19
+                    text run at (475,0) width 144: "inline element of class "
+                  LayoutInline {TT} at (0,0) size 25x16
+                    LayoutText {#text} at (618,3) size 25x16
+                      text run at (618,3) width 25: "two"
+                  LayoutText {#text} at (642,0) size 756x39
+                    text run at (642,0) width 114: ", giving it an aqua"
+                    text run at (0,20) width 498: "background and no top padding, since negative padding values are not allowed"
+                LayoutText {#text} at (498,20) size 733x39
+                  text run at (498,20) width 235: ". Padding on inline elements does not"
+                  text run at (0,40) width 567: "affect line-height calculations, so all lines in this element should have the same line-height."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/width-expected.txt
new file mode 100644
index 0000000..c0b9d65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/width-expected.txt
@@ -0,0 +1,85 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1391
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1391 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1390.50
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1374.50 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x48
+        LayoutText {#text} at (0,0) size 152x48
+          text run at (0,0) width 152: ".one {width: 50px;}"
+          text run at (152,0) width 0: " "
+          text run at (0,16) width 144: ".two {width: 50%;}"
+          text run at (144,16) width 0: " "
+          text run at (0,32) width 152: "TABLE {width: 50%;}"
+          text run at (152,32) width 0: " "
+      LayoutNGBlockFlow (anonymous) at (0,107) size 769x50
+        LayoutImage {IMG} at (0,0) size 50x50
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,173) size 769x20
+        LayoutText {#text} at (0,0) size 287x19
+          text run at (0,0) width 287: "The square above should be fifty pixels wide."
+      LayoutNGBlockFlow (anonymous) at (0,209) size 769x384.50
+        LayoutImage {IMG} at (0,0) size 384.50x384.50
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,609.50) size 769x20
+        LayoutText {#text} at (0,0) size 671x19
+          text run at (0,0) width 671: "The square above should be half as wide as the image's parent element (either the BODY or the table cell)."
+      LayoutNGBlockFlow {P} at (0,645.50) size 384.50x100
+        LayoutText {#text} at (0,0) size 382x79
+          text run at (0,0) width 382: "This paragraph should be half the width of its parent element"
+          text run at (0,20) width 379: "(either the BODY or the table, which should itself be half as"
+          text run at (0,40) width 366: "wide as the BODY element). This is extra text included to"
+          text run at (0,60) width 246: "ensure that this will be a fair test of the "
+        LayoutInline {CODE} at (0,0) size 40x16
+          LayoutText {#text} at (246,63) size 40x16
+            text run at (246,63) width 40: "width"
+        LayoutText {#text} at (286,60) size 373x39
+          text run at (286,60) width 57: " property"
+          text run at (0,80) width 373: "without the need for the user to resize the viewing window."
+      LayoutTable {TABLE} at (0,761.50) size 384x613 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 382x611
+          LayoutTableRow {TR} at (0,0) size 382x28
+            LayoutNGTableCell {TD} at (0,0) size 382x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 382x583
+            LayoutNGTableCell {TD} at (0,305) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,281) size 4x19
+                text run at (4,281) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 370x583 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow (anonymous) at (4,4) size 362x50
+                LayoutImage {IMG} at (0,0) size 50x50
+                LayoutText {#text} at (0,0) size 0x0
+              LayoutNGBlockFlow {P} at (4,70) size 362x20
+                LayoutText {#text} at (0,0) size 287x19
+                  text run at (0,0) width 287: "The square above should be fifty pixels wide."
+              LayoutNGBlockFlow (anonymous) at (4,106) size 362x181
+                LayoutImage {IMG} at (0,0) size 181x181
+                LayoutText {#text} at (0,0) size 0x0
+              LayoutNGBlockFlow {P} at (4,303) size 362x40
+                LayoutText {#text} at (0,0) size 348x39
+                  text run at (0,0) width 348: "The square above should be half as wide as the image's"
+                  text run at (0,20) width 319: "parent element (either the BODY or the table cell)."
+              LayoutNGBlockFlow {P} at (4,359) size 181x220
+                LayoutText {#text} at (0,0) size 177x179
+                  text run at (0,0) width 160: "This paragraph should be"
+                  text run at (0,20) width 165: "half the width of its parent"
+                  text run at (0,40) width 167: "element (either the BODY"
+                  text run at (0,60) width 163: "or the table, which should"
+                  text run at (0,80) width 169: "itself be half as wide as the"
+                  text run at (0,100) width 155: "BODY element). This is"
+                  text run at (0,120) width 177: "extra text included to ensure"
+                  text run at (0,140) width 174: "that this will be a fair test of"
+                  text run at (0,160) width 23: "the "
+                LayoutInline {CODE} at (0,0) size 40x16
+                  LayoutText {#text} at (23,163) size 40x16
+                    text run at (23,163) width 40: "width"
+                LayoutText {#text} at (63,160) size 173x59
+                  text run at (63,160) width 109: " property without"
+                  text run at (0,180) width 144: "the need for the user to"
+                  text run at (0,200) width 173: "resize the viewing window."
+layer at (8,105) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/cascade/important-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/cascade/important-expected.txt
new file mode 100644
index 0000000..f930851
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/cascade/important-expected.txt
@@ -0,0 +1,65 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 232x48
+          text run at (0,0) width 232: "P {color: green ! important;}"
+          text run at (232,0) width 0: " "
+          text run at (0,16) width 120: "P {color: red;}"
+          text run at (120,16) width 0: " "
+          text run at (0,32) width 176: "P#id1 {color: purple;}"
+          text run at (176,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 784x40 [color=#008000]
+        LayoutText {#text} at (0,0) size 767x39
+          text run at (0,0) width 767: "This sentence should be green, because the declaration marked important should override any other normal declaration for"
+          text run at (0,20) width 355: "the same element, even if it occurs later in the stylesheet."
+      LayoutNGBlockFlow {P} at (0,187) size 784x40 [color=#008000]
+        LayoutText {#text} at (0,0) size 403x19
+          text run at (0,0) width 403: "This sentence should also be green, even though it has an ID of "
+        LayoutInline {TT} at (0,0) size 24x16
+          LayoutText {#text} at (403,3) size 24x16
+            text run at (403,3) width 24: "id1"
+        LayoutText {#text} at (427,0) size 781x39
+          text run at (427,0) width 354: ", which would ordinarily make it purple. This is because"
+          text run at (0,20) width 645: "declarations marked important have more weight than normal declarations given in a STYLE attribute."
+      LayoutNGBlockFlow {P} at (0,243) size 784x40 [color=#008000]
+        LayoutText {#text} at (0,0) size 779x39
+          text run at (0,0) width 779: "This sentence should also be green, even though it has a STYLE attribute declaring it to be red. This is because declarations"
+          text run at (0,20) width 566: "marked important have more weight than normal declarations given in a STYLE attribute."
+      LayoutTable {TABLE} at (0,299) size 784x190 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x188
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x160
+            LayoutNGTableCell {TD} at (0,94) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,70) size 4x19
+                text run at (4,70) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x160 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x40 [color=#008000]
+                LayoutText {#text} at (0,0) size 745x39
+                  text run at (0,0) width 745: "This sentence should be green, because the declaration marked important should override any other normal declaration"
+                  text run at (0,20) width 377: "for the same element, even if it occurs later in the stylesheet."
+              LayoutNGBlockFlow {P} at (4,60) size 762x40 [color=#008000]
+                LayoutText {#text} at (0,0) size 403x19
+                  text run at (0,0) width 403: "This sentence should also be green, even though it has an ID of "
+                LayoutInline {TT} at (0,0) size 24x16
+                  LayoutText {#text} at (403,3) size 24x16
+                    text run at (403,3) width 24: "id1"
+                LayoutText {#text} at (427,0) size 727x39
+                  text run at (427,0) width 300: ", which would ordinarily make it purple. This is"
+                  text run at (0,20) width 699: "because declarations marked important have more weight than normal declarations given in a STYLE attribute."
+              LayoutNGBlockFlow {P} at (4,116) size 762x40 [color=#008000]
+                LayoutText {#text} at (0,0) size 700x39
+                  text run at (0,0) width 700: "This sentence should also be green, even though it has a STYLE attribute declaring it to be red. This is because"
+                  text run at (0,20) width 645: "declarations marked important have more weight than normal declarations given in a STYLE attribute."
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/white_space-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/white_space-expected.txt
new file mode 100644
index 0000000..c807ba3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/white_space-expected.txt
@@ -0,0 +1,79 @@
+layer at (0,0) size 800x600 scrollWidth 921
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 232x48
+          text run at (0,0) width 192: ".one {white-space: pre;}"
+          text run at (192,0) width 0: " "
+          text run at (0,16) width 216: ".two {white-space: nowrap;}"
+          text run at (216,16) width 0: " "
+          text run at (0,32) width 232: ".three {white-space: normal;}"
+          text run at (232,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 784x100
+        LayoutText {#text} at (0,0) size 568x79
+          text run at (0,0) width 0: " "
+          text run at (0,20) width 568: "This sentence should     show extra space  where there    would ordinarily         not be any."
+          text run at (567,20) width 1: " "
+          text run at (0,40) width 296: "     There should also be preservation of returns"
+          text run at (295,40) width 1: " "
+          text run at (0,60) width 97: "as this sentence"
+          text run at (97,60) width 0: " "
+          text run at (0,80) width 184: "     very clearly demonstrates."
+          text run at (184,80) width 0: " "
+      LayoutNGBlockFlow {P} at (0,247) size 784x20
+        LayoutText {#text} at (0,0) size 891x19
+          text run at (0,0) width 891: "This sentence should not word-wrap, no matter how long the sentence is, as it has been set to nowrap and that should have the obvious effect."
+      LayoutNGBlockFlow {P} at (0,283) size 784x40
+        LayoutText {#text} at (0,0) size 296x19
+          text run at (0,0) width 0: " "
+          text run at (0,20) width 296: "This sentence      should     show extra   space, "
+        LayoutInline {SPAN} at (0,0) size 156x19
+          LayoutText {#text} at (296,20) size 156x19
+            text run at (296,20) width 156: "except in the second half"
+        LayoutText {#text} at (452,20) size 4x19
+          text run at (452,20) width 4: "."
+          text run at (456,20) width 0: " "
+      LayoutTable {TABLE} at (0,339) size 913x230 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 911x228
+          LayoutTableRow {TR} at (0,0) size 911x28
+            LayoutNGTableCell {TD} at (0,0) size 911x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 911x200
+            LayoutNGTableCell {TD} at (0,114) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,90) size 4x19
+                text run at (4,90) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 899x200 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 891x100
+                LayoutText {#text} at (0,0) size 568x79
+                  text run at (0,0) width 0: " "
+                  text run at (0,20) width 568: "This sentence should     show extra space  where there    would ordinarily         not be any."
+                  text run at (567,20) width 1: " "
+                  text run at (0,40) width 296: "     There should also be preservation of returns"
+                  text run at (295,40) width 1: " "
+                  text run at (0,60) width 97: "as this sentence"
+                  text run at (97,60) width 0: " "
+                  text run at (0,80) width 184: "     very clearly demonstrates."
+                  text run at (184,80) width 0: " "
+              LayoutNGBlockFlow {P} at (4,120) size 891x20
+                LayoutText {#text} at (0,0) size 891x19
+                  text run at (0,0) width 891: "This sentence should not word-wrap, no matter how long the sentence is, as it has been set to nowrap and that should have the obvious effect."
+              LayoutNGBlockFlow {P} at (4,156) size 891x40
+                LayoutText {#text} at (0,0) size 296x19
+                  text run at (0,0) width 0: " "
+                  text run at (0,20) width 296: "This sentence      should     show extra   space, "
+                LayoutInline {SPAN} at (0,0) size 156x19
+                  LayoutText {#text} at (296,20) size 156x19
+                    text run at (296,20) width 156: "except in the second half"
+                LayoutText {#text} at (452,20) size 4x19
+                  text run at (452,20) width 4: "."
+                  text run at (456,20) width 0: " "
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background-expected.txt
new file mode 100644
index 0000000..4f271e54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background-expected.txt
@@ -0,0 +1,80 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 777
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x777 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x777
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x761 [bgcolor=#008000]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x64
+        LayoutText {#text} at (0,0) size 648x64
+          text run at (0,0) width 648: "BODY {background: green url(../resources/oransqr.gif) repeat-x center top fixed;}"
+          text run at (648,0) width 0: " "
+          text run at (0,16) width 568: ".one {background: lime url(../resources/oransqr.gif) repeat-y 100% 0%;}"
+          text run at (568,16) width 0: " "
+          text run at (0,32) width 592: ".two {background: lime url(../resources/oransqr.gif) repeat-y center top;}"
+          text run at (592,32) width 0: " "
+          text run at (0,48) width 592: ".three {background: lime url(../resources/oransqr.gif) repeat-x left top;}"
+          text run at (592,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 769x60
+        LayoutText {#text} at (0,0) size 728x19
+          text run at (0,0) width 728: "This document should have a green background with an orange strip running across the entire top of the page, since"
+        LayoutInline {CODE} at (0,0) size 64x16
+          LayoutText {#text} at (0,23) size 64x16
+            text run at (0,23) width 64: "repeat-x"
+        LayoutText {#text} at (64,20) size 753x39
+          text run at (64,20) width 689: " indicates tiling in both directions of the x-axis. Furthermore, the strip should be fixed in place. I'll have to add"
+          text run at (0,40) width 491: "extra text at the end of this page to make it long enough to scroll conveniently."
+      LayoutNGBlockFlow {P} at (0,207) size 769x60 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 762x59
+          text run at (0,0) width 743: "This paragraph should have a lime background and an orange strip which starts at the top right and runs to the bottom."
+          text run at (0,20) width 762: "Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser in handling"
+          text run at (0,40) width 425: "these declarations. Hey, I didn't say the page would be pretty, did I?"
+      LayoutNGBlockFlow {P} at (0,283) size 769x60 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 762x59
+          text run at (0,0) width 752: "This paragraph should have a lime background and an orange strip which starts at the center top and runs to the bottom."
+          text run at (0,20) width 762: "Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser in handling"
+          text run at (0,40) width 425: "these declarations. Hey, I didn't say the page would be pretty, did I?"
+      LayoutNGBlockFlow {P} at (0,359) size 769x60 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 762x59
+          text run at (0,0) width 743: "This paragraph should have a lime background and an orange strip which starts at the top left and runs to the top right."
+          text run at (0,20) width 762: "Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser in handling"
+          text run at (0,40) width 425: "these declarations. Hey, I didn't say the page would be pretty, did I?"
+      LayoutTable {TABLE} at (0,435) size 769x326 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x324
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x296
+            LayoutNGTableCell {TD} at (0,162) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,138) size 4x19
+                text run at (4,138) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x296 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x60
+                LayoutText {#text} at (0,0) size 728x19
+                  text run at (0,0) width 728: "This document should have a green background with an orange strip running across the entire top of the page, since"
+                LayoutInline {CODE} at (0,0) size 64x16
+                  LayoutText {#text} at (0,23) size 64x16
+                    text run at (0,23) width 64: "repeat-x"
+                LayoutText {#text} at (64,20) size 726x39
+                  text run at (64,20) width 662: " indicates tiling in both directions of the x-axis. Furthermore, the strip should be fixed in place. I'll have to"
+                  text run at (0,40) width 518: "add extra text at the end of this page to make it long enough to scroll conveniently."
+              LayoutNGBlockFlow {P} at (4,80) size 747x60 [bgcolor=#00FF00]
+                LayoutText {#text} at (0,0) size 743x59
+                  text run at (0,0) width 743: "This paragraph should have a lime background and an orange strip which starts at the top right and runs to the bottom."
+                  text run at (0,20) width 703: "Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser in"
+                  text run at (0,40) width 484: "handling these declarations. Hey, I didn't say the page would be pretty, did I?"
+              LayoutNGBlockFlow {P} at (4,156) size 747x60 [bgcolor=#00FF00]
+                LayoutText {#text} at (0,0) size 739x59
+                  text run at (0,0) width 700: "This paragraph should have a lime background and an orange strip which starts at the center top and runs to the"
+                  text run at (0,20) width 739: "bottom. Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser"
+                  text run at (0,40) width 500: "in handling these declarations. Hey, I didn't say the page would be pretty, did I?"
+              LayoutNGBlockFlow {P} at (4,232) size 747x60 [bgcolor=#00FF00]
+                LayoutText {#text} at (0,0) size 743x59
+                  text run at (0,0) width 743: "This paragraph should have a lime background and an orange strip which starts at the top left and runs to the top right."
+                  text run at (0,20) width 703: "Therefore, extra text would be in order, so that we can intelligently evaluate the performance of your browser in"
+                  text run at (0,40) width 484: "handling these declarations. Hey, I didn't say the page would be pretty, did I?"
+layer at (8,121) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_image-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_image-expected.txt
new file mode 100644
index 0000000..bdcade0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_image-expected.txt
@@ -0,0 +1,89 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x48
+        LayoutText {#text} at (0,0) size 376x32
+          text run at (0,0) width 376: "P {background-image: url(../resources/bg.gif);}"
+          text run at (376,0) width 0: " "
+          text run at (0,16) width 240: ".one {background-image: none;}"
+          text run at (240,16) width 0: " "
+          text run at (0,32) width 0: " "
+      LayoutNGBlockFlow {P} at (0,115) size 784x40
+        LayoutText {#text} at (0,0) size 746x39
+          text run at (0,0) width 746: "This sentence should be backed by an image-- a green grid pattern, in this case. The background image should also tile"
+          text run at (0,20) width 664: "along both axes, because no repeat direction is specified (specific tests for repeating are found elsewhere)."
+      LayoutNGBlockFlow {P} at (0,171) size 784x80
+        LayoutText {#text} at (0,0) size 596x19
+          text run at (0,0) width 596: "This sentence should be backed by a repeated green-grid image, as should the last three words "
+        LayoutInline {STRONG} at (0,0) size 102x19
+          LayoutInline {SPAN} at (0,0) size 102x19
+            LayoutText {#text} at (596,0) size 102x19
+              text run at (596,0) width 102: "in this sentence"
+        LayoutText {#text} at (698,0) size 770x39
+          text run at (698,0) width 72: ". If it is not,"
+          text run at (0,20) width 31: "then "
+        LayoutInline {CODE} at (0,0) size 32x16
+          LayoutText {#text} at (31,23) size 32x16
+            text run at (31,23) width 32: "none"
+        LayoutText {#text} at (63,20) size 168x19
+          text run at (63,20) width 168: " is interpreted incorrectly. ("
+        LayoutInline {CODE} at (0,0) size 33x16
+          LayoutText {#text} at (230,23) size 33x16
+            text run at (230,23) width 33: "none"
+        LayoutText {#text} at (262,20) size 771x59
+          text run at (262,20) width 503: " means that the element has no background image, allowing the parent to \"shine"
+          text run at (0,40) width 771: "through\" by default; since the parent of the words \"in this sentence\" is the paragraph, then the paragraph's image should be"
+          text run at (0,60) width 50: "visible.)"
+      LayoutNGBlockFlow {P} at (0,267) size 784x40
+        LayoutText {#text} at (0,0) size 765x39
+          text run at (0,0) width 765: "This sentence should NOT be backed by a repeated green-grid image, allowing the page's background to \"shine through\""
+          text run at (0,20) width 48: "instead."
+      LayoutTable {TABLE} at (0,323) size 784x230 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x228
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x200
+            LayoutNGTableCell {TD} at (0,114) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,90) size 4x19
+                text run at (4,90) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x200 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x40
+                LayoutText {#text} at (0,0) size 746x39
+                  text run at (0,0) width 746: "This sentence should be backed by an image-- a green grid pattern, in this case. The background image should also tile"
+                  text run at (0,20) width 664: "along both axes, because no repeat direction is specified (specific tests for repeating are found elsewhere)."
+              LayoutNGBlockFlow {P} at (4,60) size 762x80
+                LayoutText {#text} at (0,0) size 596x19
+                  text run at (0,0) width 596: "This sentence should be backed by a repeated green-grid image, as should the last three words "
+                LayoutInline {STRONG} at (0,0) size 102x19
+                  LayoutInline {SPAN} at (0,0) size 102x19
+                    LayoutText {#text} at (596,0) size 102x19
+                      text run at (596,0) width 102: "in this sentence"
+                LayoutText {#text} at (698,0) size 742x39
+                  text run at (698,0) width 44: ". If it is"
+                  text run at (0,20) width 59: "not, then "
+                LayoutInline {CODE} at (0,0) size 32x16
+                  LayoutText {#text} at (59,23) size 32x16
+                    text run at (59,23) width 32: "none"
+                LayoutText {#text} at (91,20) size 168x19
+                  text run at (91,20) width 168: " is interpreted incorrectly. ("
+                LayoutInline {CODE} at (0,0) size 33x16
+                  LayoutText {#text} at (258,23) size 33x16
+                    text run at (258,23) width 33: "none"
+                LayoutText {#text} at (290,20) size 750x59
+                  text run at (290,20) width 459: " means that the element has no background image, allowing the parent to"
+                  text run at (0,40) width 750: "\"shine through\" by default; since the parent of the words \"in this sentence\" is the paragraph, then the paragraph's image"
+                  text run at (0,60) width 115: "should be visible.)"
+              LayoutNGBlockFlow {P} at (4,156) size 762x40
+                LayoutText {#text} at (0,0) size 705x39
+                  text run at (0,0) width 705: "This sentence should NOT be backed by a repeated green-grid image, allowing the page's background to \"shine"
+                  text run at (0,20) width 108: "through\" instead."
+layer at (8,105) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_position-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_position-expected.txt
new file mode 100644
index 0000000..b91baf6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_position-expected.txt
@@ -0,0 +1,136 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1573
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1573 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1573
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1557 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x272
+        LayoutText {#text} at (0,0) size 688x256
+          text run at (0,0) width 648: "BODY {background-image: url(../resources/bg.gif); background-position: right top;"
+          text run at (648,0) width 0: " "
+          text run at (0,16) width 288: "      background-repeat: no-repeat;}"
+          text run at (288,16) width 0: " "
+          text run at (0,32) width 624: ".one {background-image: url(../resources/bg.gif); background-position: center;"
+          text run at (624,32) width 0: " "
+          text run at (0,48) width 480: "      background-repeat: no-repeat; background-color: aqua;}"
+          text run at (480,48) width 0: " "
+          text run at (0,64) width 632: ".two {background-image: url(../resources/bg.gif); background-position: 50% 50%;"
+          text run at (632,64) width 0: " "
+          text run at (0,80) width 480: "      background-repeat: no-repeat; background-color: aqua;}"
+          text run at (480,80) width 0: " "
+          text run at (0,96) width 688: ".three {background-image: url(../resources/bg.gif); background-position: bottom right;"
+          text run at (688,96) width 0: " "
+          text run at (0,112) width 496: "        background-repeat: no-repeat; background-color: aqua;}"
+          text run at (496,112) width 0: " "
+          text run at (0,128) width 656: ".four {background-image: url(../resources/bg.gif); background-position: 100% 100%;"
+          text run at (656,128) width 0: " "
+          text run at (0,144) width 488: "       background-repeat: no-repeat; background-color: aqua;}"
+          text run at (488,144) width 0: " "
+          text run at (0,160) width 632: ".five {background-image: url(../resources/bg.gif); background-position: 0% 50%;"
+          text run at (632,160) width 0: " "
+          text run at (0,176) width 488: "       background-repeat: no-repeat; background-color: aqua;}"
+          text run at (488,176) width 0: " "
+          text run at (0,192) width 632: ".six {background-image: url(../resources/bg.gif); background-position: 75% 25%;"
+          text run at (632,192) width 0: " "
+          text run at (0,208) width 488: "       background-repeat: no-repeat; background-color: aqua;}"
+          text run at (488,208) width 0: " "
+          text run at (0,224) width 664: ".seven {background-image: url(../resources/bg.gif); background-position: 20px 20px;"
+          text run at (664,224) width 0: " "
+          text run at (0,240) width 488: "       background-repeat: no-repeat; background-color: aqua;}"
+          text run at (488,240) width 0: " "
+          text run at (0,256) width 0: " "
+      LayoutNGBlockFlow {P} at (0,339) size 769x20
+        LayoutText {#text} at (0,0) size 503x19
+          text run at (0,0) width 503: "This document should have a single, small green image in its upper right corner."
+      LayoutNGBlockFlow {P} at (0,375) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 768x59
+          text run at (0,0) width 735: "This paragraph should have a single, small green image exactly in its center; that is, the center of the image should be"
+          text run at (0,20) width 768: "fixed at the center of the paragraph. The background color will make it easier to determine the edges of the paragraph, and"
+          text run at (0,40) width 262: "therefore allow you to calculate its center."
+      LayoutNGBlockFlow {P} at (0,451) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 768x59
+          text run at (0,0) width 735: "This paragraph should have a single, small green image exactly in its center; that is, the center of the image should be"
+          text run at (0,20) width 768: "fixed at the center of the paragraph. The background color will make it easier to determine the edges of the paragraph, and"
+          text run at (0,40) width 262: "therefore allow you to calculate its center."
+      LayoutNGBlockFlow {P} at (0,527) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 749x59
+          text run at (0,0) width 730: "This paragraph should have a single, small green image in its lower-right corner; that is, the lower right corner of the"
+          text run at (0,20) width 749: "image should be fixed at the lower right corner of the paragraph. The background color will make it easier to determine"
+          text run at (0,40) width 436: "the edges of the paragraph, and therefore allow you to see its corners."
+      LayoutNGBlockFlow {P} at (0,603) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 749x59
+          text run at (0,0) width 730: "This paragraph should have a single, small green image in its lower-right corner; that is, the lower right corner of the"
+          text run at (0,20) width 749: "image should be fixed at the lower right corner of the paragraph. The background color will make it easier to determine"
+          text run at (0,40) width 436: "the edges of the paragraph, and therefore allow you to see its corners."
+      LayoutNGBlockFlow {P} at (0,679) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 768x59
+          text run at (0,0) width 768: "This paragraph should have a single, small green image exactly at the left center; that is, the left center of the image should"
+          text run at (0,20) width 713: "be fixed at the left center of the paragraph. The background color will make it easier to determine the edges of the"
+          text run at (0,40) width 360: "paragraph, and therefore allow you to calculate its center."
+      LayoutNGBlockFlow {P} at (0,755) size 769x60 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 761x59
+          text run at (0,0) width 749: "This paragraph should have a single, small green image positioned 75% of the way across the element, and 25% down."
+          text run at (0,20) width 761: "The background color will make it easier to determine the edges of the paragraph, which should help in determining if all"
+          text run at (0,40) width 647: "this is so, and the extra text should make the element long enough for this test to be simpler to evaluate."
+      LayoutNGBlockFlow {P} at (0,831) size 769x80 [bgcolor=#00FFFF]
+        LayoutText {#text} at (0,0) size 760x79
+          text run at (0,0) width 749: "This paragraph should have a single, small green image positioned 20 pixels down and to the left of the upper left-hand"
+          text run at (0,20) width 760: "corner; that is, the upper left-hand corner of the image should be 20 pixels down and to the left of the upper-left corner of"
+          text run at (0,40) width 736: "the element. The background color will make it easier to determine the edges of the paragraph, which should assist in"
+          text run at (0,60) width 120: "evaluating this test."
+      LayoutTable {TABLE} at (0,927) size 769x630 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x628
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x600
+            LayoutNGTableCell {TD} at (0,314) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,290) size 4x19
+                text run at (4,290) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x600 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20
+                LayoutText {#text} at (0,0) size 503x19
+                  text run at (0,0) width 503: "This document should have a single, small green image in its upper right corner."
+              LayoutNGBlockFlow {P} at (4,40) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 741x59
+                  text run at (0,0) width 735: "This paragraph should have a single, small green image exactly in its center; that is, the center of the image should be"
+                  text run at (0,20) width 741: "fixed at the center of the paragraph. The background color will make it easier to determine the edges of the paragraph,"
+                  text run at (0,40) width 289: "and therefore allow you to calculate its center."
+              LayoutNGBlockFlow {P} at (4,116) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 741x59
+                  text run at (0,0) width 735: "This paragraph should have a single, small green image exactly in its center; that is, the center of the image should be"
+                  text run at (0,20) width 741: "fixed at the center of the paragraph. The background color will make it easier to determine the edges of the paragraph,"
+                  text run at (0,40) width 289: "and therefore allow you to calculate its center."
+              LayoutNGBlockFlow {P} at (4,192) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 730x59
+                  text run at (0,0) width 730: "This paragraph should have a single, small green image in its lower-right corner; that is, the lower right corner of the"
+                  text run at (0,20) width 683: "image should be fixed at the lower right corner of the paragraph. The background color will make it easier to"
+                  text run at (0,40) width 502: "determine the edges of the paragraph, and therefore allow you to see its corners."
+              LayoutNGBlockFlow {P} at (4,268) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 730x59
+                  text run at (0,0) width 730: "This paragraph should have a single, small green image in its lower-right corner; that is, the lower right corner of the"
+                  text run at (0,20) width 683: "image should be fixed at the lower right corner of the paragraph. The background color will make it easier to"
+                  text run at (0,40) width 502: "determine the edges of the paragraph, and therefore allow you to see its corners."
+              LayoutNGBlockFlow {P} at (4,344) size 747x60 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 736x59
+                  text run at (0,0) width 722: "This paragraph should have a single, small green image exactly at the left center; that is, the left center of the image"
+                  text run at (0,20) width 736: "should be fixed at the left center of the paragraph. The background color will make it easier to determine the edges of"
+                  text run at (0,40) width 383: "the paragraph, and therefore allow you to calculate its center."
+              LayoutNGBlockFlow {P} at (4,420) size 747x80 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 705x79
+                  text run at (0,0) width 705: "This paragraph should have a single, small green image positioned 75% of the way across the element, and 25%"
+                  text run at (0,20) width 694: "down. The background color will make it easier to determine the edges of the paragraph, which should help in"
+                  text run at (0,40) width 698: "determining if all this is so, and the extra text should make the element long enough for this test to be simpler to"
+                  text run at (0,60) width 56: "evaluate."
+              LayoutNGBlockFlow {P} at (4,516) size 747x80 [bgcolor=#00FFFF]
+                LayoutText {#text} at (0,0) size 744x79
+                  text run at (0,0) width 718: "This paragraph should have a single, small green image positioned 20 pixels down and to the left of the upper left-"
+                  text run at (0,20) width 734: "hand corner; that is, the upper left-hand corner of the image should be 20 pixels down and to the left of the upper-left"
+                  text run at (0,40) width 744: "corner of the element. The background color will make it easier to determine the edges of the paragraph, which should"
+                  text run at (0,60) width 173: "assist in evaluating this test."
+layer at (8,329) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,321) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/color-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/color-expected.txt
new file mode 100644
index 0000000..9204b1b6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/color-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x32
+        LayoutText {#text} at (0,0) size 160x16
+          text run at (0,0) width 160: ".one {color: green;}"
+          text run at (160,0) width 0: " "
+          text run at (0,16) width 0: " "
+      LayoutNGBlockFlow {P} at (0,99) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,135) size 784x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutTable {TABLE} at (0,171) size 216x94 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 214x92
+          LayoutTableRow {TR} at (0,0) size 214x28
+            LayoutNGTableCell {TD} at (0,0) size 214x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 214x64
+            LayoutNGTableCell {TD} at (0,46) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,22) size 4x19
+                text run at (4,22) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 202x64 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,40) size 194x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+layer at (8,89) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,81) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/conformance/forward_compatible_parsing-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/conformance/forward_compatible_parsing-expected.txt
new file mode 100644
index 0000000..b156883
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/conformance/forward_compatible_parsing-expected.txt
@@ -0,0 +1,526 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 4321
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x4321 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x4321
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x4305 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x864
+        LayoutText {#text} at (0,0) size 568x848
+          text run at (0,0) width 304: "P.one {color: green; rotation: 70deg;}"
+          text run at (304,0) width 0: " "
+          text run at (0,16) width 176: "P.oneb {color: green;}"
+          text run at (176,16) width 0: " "
+          text run at (0,32) width 232: "P.oneb {color: invalidValue;}"
+          text run at (232,32) width 0: " "
+          text run at (0,48) width 272: "P.two {background-color: inherit;}"
+          text run at (272,48) width 0: " "
+          text run at (0,64) width 216: "H1 + P.three {color: blue;}"
+          text run at (216,64) width 0: " "
+          text run at (0,80) width 200: "P.four + H1 {color: red;}"
+          text run at (200,80) width 0: " "
+          text run at (0,96) width 264: "P.five {background-color: \"red\";}"
+          text run at (264,96) width 0: " "
+          text run at (0,112) width 408: "P.sixa {border-width: medium; border-style: solid;}"
+          text run at (408,112) width 0: " "
+          text run at (0,128) width 400: "P.sixb {border-width: funny; border-style: solid;}"
+          text run at (400,128) width 0: " "
+          text run at (0,144) width 392: "P.sixc {border-width: 50zu; border-style: solid;}"
+          text run at (392,144) width 0: " "
+          text run at (0,160) width 376: "P.sixd {border-width: px; border-style: solid;}"
+          text run at (376,160) width 0: " "
+          text run at (0,176) width 96: "@three-dee {"
+          text run at (96,176) width 0: " "
+          text run at (0,192) width 184: " @background-lighting {"
+          text run at (184,192) width 0: " "
+          text run at (0,208) width 136: "  azimuth: 30deg;"
+          text run at (136,208) width 0: " "
+          text run at (0,224) width 160: "  elevation: 190deg;"
+          text run at (160,224) width 0: " "
+          text run at (0,240) width 24: "  }"
+          text run at (24,240) width 0: " "
+          text run at (0,256) width 184: " P.seven { color: red }"
+          text run at (184,256) width 0: " "
+          text run at (0,272) width 16: " }"
+          text run at (16,272) width 0: " "
+          text run at (0,288) width 184: "P.eight {COLOR: GREEN;}"
+          text run at (184,288) width 0: " "
+          text run at (0,304) width 192: "OL:wait {color: maroon;}"
+          text run at (192,304) width 0: " "
+          text run at (0,320) width 272: "P.ten:first-child {color: maroon;}"
+          text run at (272,320) width 0: " "
+          text run at (0,336) width 208: "UL:lang(fr) {color: gray;}"
+          text run at (208,336) width 0: " "
+          text run at (0,352) width 248: "BLOCKQUOTE[href] {color: navy;}"
+          text run at (248,352) width 0: " "
+          text run at (0,368) width 288: "ACRONYM[href=\"foo\"] {color: purple;}"
+          text run at (288,368) width 0: " "
+          text run at (0,384) width 296: "ADDRESS[href~=\"foo\"] {color: purple;}"
+          text run at (296,384) width 0: " "
+          text run at (0,400) width 248: "SPAN[lang|=\"fr\"] {color: #c37;}"
+          text run at (248,400) width 0: " "
+          text run at (0,416) width 96: "@media tty {"
+          text run at (96,416) width 0: " "
+          text run at (0,432) width 136: " H1 {color: red;}"
+          text run at (136,432) width 0: " "
+          text run at (0,448) width 192: " P.sixteen {color: red;}"
+          text run at (192,448) width 0: " "
+          text run at (0,464) width 16: " }"
+          text run at (16,464) width 0: " "
+          text run at (0,480) width 96: "@three-dee {"
+          text run at (96,480) width 0: " "
+          text run at (0,496) width 208: " P.seventeen {color: red }"
+          text run at (208,496) width 0: " "
+          text run at (0,512) width 16: " }"
+          text run at (16,512) width 0: " "
+          text run at (0,528) width 568: "P.eighteena {text-decoration: underline overline line-through diagonal;"
+          text run at (568,528) width 0: " "
+          text run at (0,544) width 416: "            font: bold highlighted 100% sans-serif;}"
+          text run at (416,544) width 0: " "
+          text run at (0,560) width 568: "P.eighteenb {text-decoration: underline overline line-through diagonal;"
+          text run at (568,560) width 0: " "
+          text run at (0,576) width 376: "            font: bold highlighted 100% serif;}"
+          text run at (376,576) width 0: " "
+          text run at (0,592) width 384: "EM, P.nineteena ! EM, STRONG {font-size: 200%; }"
+          text run at (384,592) width 0: " "
+          text run at (0,608) width 0: " "
+          text run at (0,624) width 128: "// UL.nineteenb,"
+          text run at (128,624) width 0: " "
+          text run at (0,640) width 200: "P.nineteenb {color: red;}"
+          text run at (200,640) width 0: " "
+          text run at (0,656) width 0: " "
+          text run at (0,672) width 360: "P.twentya {rotation-code: \"}\"; color: blue;} "
+          text run at (360,672) width 0: " "
+          text run at (0,688) width 392: "P.twentyb {rotation-code: \"\\\"}\\\"\"; color: green;}"
+          text run at (392,688) width 0: " "
+          text run at (0,704) width 400: "P.twentyonea {rotation-code: '}'; color: purple;} "
+          text run at (400,704) width 0: " "
+          text run at (0,720) width 416: "P.twentyoneb {rotation-code: '\\'}\\''; color: green;}"
+          text run at (416,720) width 0: " "
+          text run at (0,736) width 104: "P.twentytwo {"
+          text run at (104,736) width 0: " "
+          text run at (0,752) width 376: " type-display: @threedee {rotation-code: '}';};"
+          text run at (376,752) width 0: " "
+          text run at (0,768) width 112: " color: green;"
+          text run at (112,768) width 0: " "
+          text run at (0,784) width 16: " }"
+          text run at (16,784) width 0: " "
+          text run at (0,800) width 280: "P.twentythree {text-indent: 0.5in;}"
+          text run at (280,800) width 0: " "
+          text run at (0,816) width 112: " color: maroon"
+          text run at (112,816) width 0: " "
+          text run at (0,832) width 208: "P.twentyfour {color: red;}"
+          text run at (208,832) width 0: " "
+          text run at (0,848) width 0: " "
+      LayoutNGBlockFlow {P} at (0,931) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 485x19
+          text run at (0,0) width 485: "This paragraph should be green, because only the rotation should be ignored."
+      LayoutNGBlockFlow {P} at (0,967) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 622x19
+          text run at (0,0) width 622: "This paragraph should be green, since error-checking should be done before calculating specificity."
+      LayoutNGBlockFlow {P} at (0,1003) size 769x40
+        LayoutText {#text} at (0,0) size 560x19
+          text run at (0,0) width 560: "This paragraph should have a solid gray background (or a white grid), because in CSS1, "
+        LayoutInline {CODE} at (0,0) size 56x16
+          LayoutText {#text} at (560,3) size 56x16
+            text run at (560,3) width 56: "inherit"
+        LayoutText {#text} at (616,0) size 760x39
+          text run at (616,0) width 144: " is an invalid keyword,"
+          text run at (0,20) width 520: "and in CSS2, it will cause the gray background (not the white grid) to be inherited."
+      LayoutNGBlockFlow {P} at (0,1059) size 769x20
+        LayoutText {#text} at (0,0) size 638x19
+          text run at (0,0) width 638: "This paragraph should be black, since in CSS1, the selector is invalid, and in CSS2, it does not apply."
+      LayoutNGBlockFlow {P} at (0,1095) size 769x20
+        LayoutText {#text} at (0,0) size 638x19
+          text run at (0,0) width 638: "This paragraph should be black, since in CSS1, the selector is invalid, and in CSS2, it does not apply."
+      LayoutNGBlockFlow {P} at (0,1131) size 769x20
+        LayoutText {#text} at (0,0) size 526x19
+          text run at (0,0) width 526: "This paragraph should have a white background, since keywords cannot be quoted."
+      LayoutNGBlockFlow {P} at (0,1167) size 769x46 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 756x39
+          text run at (3,3) width 756: "This paragraph should have a medium-width border around it (the same as the next three paragraphs). This should cause"
+          text run at (3,23) width 318: "the user agent to use the default value of 'medium'."
+      LayoutNGBlockFlow {P} at (0,1229) size 769x46 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 740x39
+          text run at (3,3) width 740: "This paragraph should have a medium-width border around it (the same as the previous and the next two paragraphs),"
+          text run at (3,23) width 663: "because the border-width is invalid. This should cause the user agent to use the default value of 'medium'."
+      LayoutNGBlockFlow {P} at (0,1291) size 769x66 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 754x59
+          text run at (3,3) width 740: "This paragraph should have a medium-width border around it (the same as the next and the previous two paragraphs),"
+          text run at (3,23) width 754: "because the border-width units are invalid, and therefore the border-width should be ignored. This should cause the user"
+          text run at (3,43) width 265: "agent to use the default value of 'medium'."
+      LayoutNGBlockFlow {P} at (0,1373) size 769x66 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 751x59
+          text run at (3,3) width 743: "This paragraph should have a medium-width border around it (the same as the previous three paragraphs), because the"
+          text run at (3,23) width 751: "border-width does not have any value to go with its pixel unit, and is therefore invalid. This should cause the user agent"
+          text run at (3,43) width 227: "to use the default value of 'medium'."
+      LayoutNGBlockFlow {P} at (0,1455) size 769x20
+        LayoutText {#text} at (0,0) size 660x19
+          text run at (0,0) width 660: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule."
+      LayoutNGBlockFlow {P} at (0,1491) size 769x40 [color=#008000]
+        LayoutText {#text} at (0,0) size 760x39
+          text run at (0,0) width 760: "This paragraph should be green. CSS is case-insensitive, unless required to be case sensitive due to interaction with other"
+          text run at (0,20) width 237: "standards (e.g., font names or URLs.)"
+      LayoutNGBlockFlow {OL} at (0,1547) size 769x20
+        LayoutNGListItem {LI} at (40,0) size 729x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "1. "
+          LayoutText {#text} at (0,0) size 621x19
+            text run at (0,0) width 621: "This ordered list item should be black, because the declaration has an invalid pseudo-class selector."
+      LayoutNGBlockFlow {P} at (0,1583) size 769x40
+        LayoutText {#text} at (0,0) size 752x39
+          text run at (0,0) width 752: "This paragraph should be black, because, in CSS1, :first-child is an invalid pseudo-class, and in CSS2, this paragraph is"
+          text run at (0,20) width 110: "not the first child."
+      LayoutNGBlockFlow {UL} at (0,1639) size 769x40
+        LayoutNGListItem {LI} at (40,0) size 729x40
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 690x39
+            text run at (0,0) width 690: "This unordered list item should be black, because, according to CSS1, the selector is invalid, and according to"
+            text run at (0,20) width 228: "CSS2, the selector should not apply."
+      LayoutNGBlockFlow {BLOCKQUOTE} at (40,1695) size 689x40
+        LayoutText {#text} at (0,0) size 688x39
+          text run at (0,0) width 688: "This blockquote should be black, because, according to CSS1, the selector is invalid, and according to CSS2,"
+          text run at (0,20) width 183: "the selector should not apply."
+      LayoutNGBlockFlow {P} at (0,1751) size 769x40
+        LayoutInline {ACRONYM} at (0,0) size 748x39
+          LayoutText {#text} at (0,0) size 748x39
+            text run at (0,0) width 748: "This acronym should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the selector"
+            text run at (0,20) width 108: "should not apply."
+      LayoutNGBlockFlow {ADDRESS} at (0,1807) size 769x40
+        LayoutText {#text} at (0,0) size 744x39
+          text run at (0,0) width 744: "This address should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the selector"
+          text run at (0,20) width 109: "should not apply."
+      LayoutNGBlockFlow {P} at (0,1863) size 769x40
+        LayoutInline {SPAN} at (0,0) size 768x39
+          LayoutText {#text} at (0,0) size 768x39
+            text run at (0,0) width 768: "This span should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the selector should"
+            text run at (0,20) width 62: "not apply."
+      LayoutNGBlockFlow {P} at (0,1919) size 769x40
+        LayoutText {#text} at (0,0) size 753x39
+          text run at (0,0) width 753: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule. However, it is"
+          text run at (0,20) width 592: "valid in CSS2, so if this is being viewed on a tty browser that supports CSS2, it should be red."
+      LayoutNGBlockFlow {P} at (0,1975) size 769x20
+        LayoutText {#text} at (0,0) size 660x19
+          text run at (0,0) width 660: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule."
+      LayoutNGBlockFlow {P} at (0,2011) size 769x80
+        LayoutText {#text} at (0,0) size 737x19
+          text run at (0,0) width 737: "The text of this paragraph should be normal (that is, it should not be underlined, overlined, stricken, or bold), because"
+        LayoutInline {CODE} at (0,0) size 64x16
+          LayoutText {#text} at (0,23) size 64x16
+            text run at (0,23) width 64: "diagonal"
+        LayoutText {#text} at (64,20) size 226x19
+          text run at (64,20) width 226: " is not a valid keyword, making the "
+        LayoutInline {CODE} at (0,0) size 120x16
+          LayoutText {#text} at (290,23) size 120x16
+            text run at (290,23) width 120: "text-decoration"
+        LayoutText {#text} at (410,20) size 131x19
+          text run at (410,20) width 131: " invalid. In addition, "
+        LayoutInline {CODE} at (0,0) size 88x16
+          LayoutText {#text} at (541,23) size 88x16
+            text run at (541,23) width 88: "highlighted"
+        LayoutText {#text} at (629,20) size 758x39
+          text run at (629,20) width 129: " is not a valid part of"
+          text run at (0,40) width 23: "the "
+        LayoutInline {CODE} at (0,0) size 32x16
+          LayoutText {#text} at (23,43) size 32x16
+            text run at (23,43) width 32: "font"
+        LayoutText {#text} at (55,40) size 719x39
+          text run at (55,40) width 664: " property, making it invalid. Therefore, this paragraph's font should be the UA default, and match the next"
+          text run at (0,60) width 261: "paragraph. If this is not the case, then the "
+        LayoutInline {CODE} at (0,0) size 32x16
+          LayoutText {#text} at (261,63) size 32x16
+            text run at (261,63) width 32: "font"
+        LayoutText {#text} at (293,60) size 248x19
+          text run at (293,60) width 248: " declaration is being improperly parsed."
+      LayoutNGBlockFlow {P} at (0,2107) size 769x80
+        LayoutText {#text} at (0,0) size 737x19
+          text run at (0,0) width 737: "The text of this paragraph should be normal (that is, it should not be underlined, overlined, stricken, or bold), because"
+        LayoutInline {CODE} at (0,0) size 64x16
+          LayoutText {#text} at (0,23) size 64x16
+            text run at (0,23) width 64: "diagonal"
+        LayoutText {#text} at (64,20) size 226x19
+          text run at (64,20) width 226: " is not a valid keyword, making the "
+        LayoutInline {CODE} at (0,0) size 120x16
+          LayoutText {#text} at (290,23) size 120x16
+            text run at (290,23) width 120: "text-decoration"
+        LayoutText {#text} at (410,20) size 131x19
+          text run at (410,20) width 131: " invalid. In addition, "
+        LayoutInline {CODE} at (0,0) size 88x16
+          LayoutText {#text} at (541,23) size 88x16
+            text run at (541,23) width 88: "highlighted"
+        LayoutText {#text} at (629,20) size 758x39
+          text run at (629,20) width 129: " is not a valid part of"
+          text run at (0,40) width 23: "the "
+        LayoutInline {CODE} at (0,0) size 32x16
+          LayoutText {#text} at (23,43) size 32x16
+            text run at (23,43) width 32: "font"
+        LayoutText {#text} at (55,40) size 746x39
+          text run at (55,40) width 691: " property, making it invalid. Therefore, this paragraph's font should be the UA default, and match the previous"
+          text run at (0,60) width 261: "paragraph. If this is not the case, then the "
+        LayoutInline {CODE} at (0,0) size 32x16
+          LayoutText {#text} at (261,63) size 32x16
+            text run at (261,63) width 32: "font"
+        LayoutText {#text} at (293,60) size 248x19
+          text run at (293,60) width 248: " declaration is being improperly parsed."
+      LayoutNGBlockFlow {P} at (0,2203) size 769x60
+        LayoutText {#text} at (0,0) size 530x19
+          text run at (0,0) width 530: "The text of this paragraph should be normal size because the selector is invalid. The "
+        LayoutInline {EM} at (0,0) size 101x19
+          LayoutText {#text} at (529,0) size 101x19
+            text run at (529,0) width 101: "emphasized text"
+        LayoutText {#text} at (629,0) size 55x19
+          text run at (629,0) width 55: " and the "
+        LayoutInline {STRONG} at (0,0) size 73x19
+          LayoutText {#text} at (683,0) size 73x19
+            text run at (683,0) width 73: "strong text"
+        LayoutText {#text} at (0,20) size 761x39
+          text run at (0,20) width 761: "within it should also be normal size, since the entire ruleset should be skipped (since in some future version of CSS, there"
+          text run at (0,40) width 520: "could be an operator within the selector that has higher precedence than a comma)."
+      LayoutNGBlockFlow {P} at (0,2279) size 769x40
+        LayoutText {#text} at (0,0) size 464x19
+          text run at (0,0) width 464: "This paragraph should be black, because the line before the declaration is "
+        LayoutInline {STRONG} at (0,0) size 22x19
+          LayoutText {#text} at (464,0) size 22x19
+            text run at (464,0) width 22: "not"
+        LayoutText {#text} at (486,0) size 743x39
+          text run at (486,0) width 257: " a comment and therefore the selector for"
+          text run at (0,20) width 138: "P.nineteenb is invalid."
+      LayoutNGBlockFlow {P} at (0,2335) size 769x20 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 470x19
+          text run at (0,0) width 470: "This paragraph should be blue, because only the first declaration is invalid."
+      LayoutNGBlockFlow {P} at (0,2371) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 478x19
+          text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+      LayoutNGBlockFlow {P} at (0,2407) size 769x20 [color=#800080]
+        LayoutText {#text} at (0,0) size 483x19
+          text run at (0,0) width 483: "This paragraph should be purple, because only the first declaration is invalid."
+      LayoutNGBlockFlow {P} at (0,2443) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 478x19
+          text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+      LayoutNGBlockFlow {P} at (0,2479) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 478x19
+          text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+      LayoutNGBlockFlow {P} at (0,2515) size 769x20
+        LayoutText {#text} at (48,0) size 601x19
+          text run at (48,0) width 601: "This paragraph should be indented half an inch, but it should not be maroon. It should be black."
+      LayoutNGBlockFlow {P} at (0,2551) size 769x40
+        LayoutText {#text} at (0,0) size 751x39
+          text run at (0,0) width 751: "This paragraph should be black, because the color declaration after the previous ruleset should be considered part of the"
+          text run at (0,20) width 616: "selector for this ruleset, and this ruleset therefore has an invalid selector and should not be applied."
+      LayoutTable {TABLE} at (0,2607) size 769x1698 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x1696
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x1668
+            LayoutNGTableCell {TD} at (0,848) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,824) size 4x19
+                text run at (4,824) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x1668 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 485x19
+                  text run at (0,0) width 485: "This paragraph should be green, because only the rotation should be ignored."
+              LayoutNGBlockFlow {P} at (4,40) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 622x19
+                  text run at (0,0) width 622: "This paragraph should be green, since error-checking should be done before calculating specificity."
+              LayoutNGBlockFlow {P} at (4,76) size 747x40
+                LayoutText {#text} at (0,0) size 560x19
+                  text run at (0,0) width 560: "This paragraph should have a solid gray background (or a white grid), because in CSS1, "
+                LayoutInline {CODE} at (0,0) size 56x16
+                  LayoutText {#text} at (560,3) size 56x16
+                    text run at (560,3) width 56: "inherit"
+                LayoutText {#text} at (616,0) size 696x39
+                  text run at (616,0) width 80: " is an invalid"
+                  text run at (0,20) width 584: "keyword, and in CSS2, it will cause the gray background (not the white grid) to be inherited."
+              LayoutNGBlockFlow {P} at (4,132) size 747x20
+                LayoutText {#text} at (0,0) size 638x19
+                  text run at (0,0) width 638: "This paragraph should be black, since in CSS1, the selector is invalid, and in CSS2, it does not apply."
+              LayoutNGBlockFlow {P} at (4,168) size 747x20
+                LayoutText {#text} at (0,0) size 638x19
+                  text run at (0,0) width 638: "This paragraph should be black, since in CSS1, the selector is invalid, and in CSS2, it does not apply."
+              LayoutNGBlockFlow {P} at (4,204) size 747x20
+                LayoutText {#text} at (0,0) size 526x19
+                  text run at (0,0) width 526: "This paragraph should have a white background, since keywords cannot be quoted."
+              LayoutNGBlockFlow {P} at (4,240) size 747x46 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 717x39
+                  text run at (3,3) width 717: "This paragraph should have a medium-width border around it (the same as the next three paragraphs). This should"
+                  text run at (3,23) width 357: "cause the user agent to use the default value of 'medium'."
+              LayoutNGBlockFlow {P} at (4,302) size 747x46 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 740x39
+                  text run at (3,3) width 740: "This paragraph should have a medium-width border around it (the same as the previous and the next two paragraphs),"
+                  text run at (3,23) width 663: "because the border-width is invalid. This should cause the user agent to use the default value of 'medium'."
+              LayoutNGBlockFlow {P} at (4,364) size 747x66 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 740x59
+                  text run at (3,3) width 740: "This paragraph should have a medium-width border around it (the same as the next and the previous two paragraphs),"
+                  text run at (3,23) width 724: "because the border-width units are invalid, and therefore the border-width should be ignored. This should cause the"
+                  text run at (3,43) width 295: "user agent to use the default value of 'medium'."
+              LayoutNGBlockFlow {P} at (4,446) size 747x66 [border: (3px solid #000000)]
+                LayoutText {#text} at (3,3) size 736x59
+                  text run at (3,3) width 720: "This paragraph should have a medium-width border around it (the same as the previous three paragraphs), because"
+                  text run at (3,23) width 736: "the border-width does not have any value to go with its pixel unit, and is therefore invalid. This should cause the user"
+                  text run at (3,43) width 265: "agent to use the default value of 'medium'."
+              LayoutNGBlockFlow {P} at (4,528) size 747x20
+                LayoutText {#text} at (0,0) size 660x19
+                  text run at (0,0) width 660: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule."
+              LayoutNGBlockFlow {P} at (4,564) size 747x40 [color=#008000]
+                LayoutText {#text} at (0,0) size 724x39
+                  text run at (0,0) width 724: "This paragraph should be green. CSS is case-insensitive, unless required to be case sensitive due to interaction with"
+                  text run at (0,20) width 273: "other standards (e.g., font names or URLs.)"
+              LayoutNGBlockFlow {OL} at (4,620) size 747x20
+                LayoutNGListItem {LI} at (40,0) size 707x20
+                  LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+                    LayoutText (anonymous) at (0,0) size 16x19
+                      text run at (0,0) width 16: "1. "
+                  LayoutText {#text} at (0,0) size 621x19
+                    text run at (0,0) width 621: "This ordered list item should be black, because the declaration has an invalid pseudo-class selector."
+              LayoutNGBlockFlow {P} at (4,656) size 747x40
+                LayoutText {#text} at (0,0) size 738x39
+                  text run at (0,0) width 738: "This paragraph should be black, because, in CSS1, :first-child is an invalid pseudo-class, and in CSS2, this paragraph"
+                  text run at (0,20) width 124: "is not the first child."
+              LayoutNGBlockFlow {UL} at (4,712) size 747x40
+                LayoutNGListItem {LI} at (40,0) size 707x40
+                  LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+                    LayoutText (anonymous) at (0,0) size 10x19
+                      text run at (0,0) width 10: "\x{2022} "
+                  LayoutText {#text} at (0,0) size 690x39
+                    text run at (0,0) width 690: "This unordered list item should be black, because, according to CSS1, the selector is invalid, and according to"
+                    text run at (0,20) width 228: "CSS2, the selector should not apply."
+              LayoutNGBlockFlow {BLOCKQUOTE} at (44,768) size 667x40
+                LayoutText {#text} at (0,0) size 643x39
+                  text run at (0,0) width 643: "This blockquote should be black, because, according to CSS1, the selector is invalid, and according to"
+                  text run at (0,20) width 228: "CSS2, the selector should not apply."
+              LayoutNGBlockFlow {P} at (4,824) size 747x40
+                LayoutInline {ACRONYM} at (0,0) size 696x39
+                  LayoutText {#text} at (0,0) size 696x39
+                    text run at (0,0) width 696: "This acronym should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the"
+                    text run at (0,20) width 160: "selector should not apply."
+              LayoutNGBlockFlow {ADDRESS} at (4,880) size 747x40
+                LayoutText {#text} at (0,0) size 744x39
+                  text run at (0,0) width 744: "This address should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the selector"
+                  text run at (0,20) width 109: "should not apply."
+              LayoutNGBlockFlow {P} at (4,936) size 747x40
+                LayoutInline {SPAN} at (0,0) size 722x39
+                  LayoutText {#text} at (0,0) size 722x39
+                    text run at (0,0) width 722: "This span should be black, because, according to CSS1, the selector is invalid, and according to CSS2, the selector"
+                    text run at (0,20) width 108: "should not apply."
+              LayoutNGBlockFlow {P} at (4,992) size 747x40
+                LayoutText {#text} at (0,0) size 739x39
+                  text run at (0,0) width 739: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule. However, it"
+                  text run at (0,20) width 606: "is valid in CSS2, so if this is being viewed on a tty browser that supports CSS2, it should be red."
+              LayoutNGBlockFlow {P} at (4,1048) size 747x20
+                LayoutText {#text} at (0,0) size 660x19
+                  text run at (0,0) width 660: "This paragraph should be black, because the style declaration that applies to it is within an invalid at-rule."
+              LayoutNGBlockFlow {P} at (4,1084) size 747x80
+                LayoutText {#text} at (0,0) size 737x19
+                  text run at (0,0) width 737: "The text of this paragraph should be normal (that is, it should not be underlined, overlined, stricken, or bold), because"
+                LayoutInline {CODE} at (0,0) size 64x16
+                  LayoutText {#text} at (0,23) size 64x16
+                    text run at (0,23) width 64: "diagonal"
+                LayoutText {#text} at (64,20) size 226x19
+                  text run at (64,20) width 226: " is not a valid keyword, making the "
+                LayoutInline {CODE} at (0,0) size 120x16
+                  LayoutText {#text} at (290,23) size 120x16
+                    text run at (290,23) width 120: "text-decoration"
+                LayoutText {#text} at (410,20) size 131x19
+                  text run at (410,20) width 131: " invalid. In addition, "
+                LayoutInline {CODE} at (0,0) size 88x16
+                  LayoutText {#text} at (541,23) size 88x16
+                    text run at (541,23) width 88: "highlighted"
+                LayoutText {#text} at (629,20) size 741x39
+                  text run at (629,20) width 112: " is not a valid part"
+                  text run at (0,40) width 40: "of the "
+                LayoutInline {CODE} at (0,0) size 32x16
+                  LayoutText {#text} at (40,43) size 32x16
+                    text run at (40,43) width 32: "font"
+                LayoutText {#text} at (72,40) size 736x39
+                  text run at (72,40) width 664: " property, making it invalid. Therefore, this paragraph's font should be the UA default, and match the next"
+                  text run at (0,60) width 261: "paragraph. If this is not the case, then the "
+                LayoutInline {CODE} at (0,0) size 32x16
+                  LayoutText {#text} at (261,63) size 32x16
+                    text run at (261,63) width 32: "font"
+                LayoutText {#text} at (293,60) size 248x19
+                  text run at (293,60) width 248: " declaration is being improperly parsed."
+              LayoutNGBlockFlow {P} at (4,1180) size 747x80
+                LayoutText {#text} at (0,0) size 737x19
+                  text run at (0,0) width 737: "The text of this paragraph should be normal (that is, it should not be underlined, overlined, stricken, or bold), because"
+                LayoutInline {CODE} at (0,0) size 64x16
+                  LayoutText {#text} at (0,23) size 64x16
+                    text run at (0,23) width 64: "diagonal"
+                LayoutText {#text} at (64,20) size 226x19
+                  text run at (64,20) width 226: " is not a valid keyword, making the "
+                LayoutInline {CODE} at (0,0) size 120x16
+                  LayoutText {#text} at (290,23) size 120x16
+                    text run at (290,23) width 120: "text-decoration"
+                LayoutText {#text} at (410,20) size 131x19
+                  text run at (410,20) width 131: " invalid. In addition, "
+                LayoutInline {CODE} at (0,0) size 88x16
+                  LayoutText {#text} at (541,23) size 88x16
+                    text run at (541,23) width 88: "highlighted"
+                LayoutText {#text} at (629,20) size 741x39
+                  text run at (629,20) width 112: " is not a valid part"
+                  text run at (0,40) width 40: "of the "
+                LayoutInline {CODE} at (0,0) size 32x16
+                  LayoutText {#text} at (40,43) size 32x16
+                    text run at (40,43) width 32: "font"
+                LayoutText {#text} at (72,40) size 705x39
+                  text run at (72,40) width 633: " property, making it invalid. Therefore, this paragraph's font should be the UA default, and match the"
+                  text run at (0,60) width 319: "previous paragraph. If this is not the case, then the "
+                LayoutInline {CODE} at (0,0) size 32x16
+                  LayoutText {#text} at (319,63) size 32x16
+                    text run at (319,63) width 32: "font"
+                LayoutText {#text} at (351,60) size 248x19
+                  text run at (351,60) width 248: " declaration is being improperly parsed."
+              LayoutNGBlockFlow {P} at (4,1276) size 747x60
+                LayoutText {#text} at (0,0) size 530x19
+                  text run at (0,0) width 530: "The text of this paragraph should be normal size because the selector is invalid. The "
+                LayoutInline {EM} at (0,0) size 101x19
+                  LayoutText {#text} at (529,0) size 101x19
+                    text run at (529,0) width 101: "emphasized text"
+                LayoutText {#text} at (629,0) size 55x19
+                  text run at (629,0) width 55: " and the "
+                LayoutInline {STRONG} at (0,0) size 727x39
+                  LayoutText {#text} at (683,0) size 727x39
+                    text run at (683,0) width 44: "strong"
+                    text run at (0,20) width 25: "text"
+                LayoutText {#text} at (25,20) size 718x39
+                  text run at (25,20) width 693: " within it should also be normal size, since the entire ruleset should be skipped (since in some future version of"
+                  text run at (0,40) width 592: "CSS, there could be an operator within the selector that has higher precedence than a comma)."
+              LayoutNGBlockFlow {P} at (4,1352) size 747x40
+                LayoutText {#text} at (0,0) size 464x19
+                  text run at (0,0) width 464: "This paragraph should be black, because the line before the declaration is "
+                LayoutInline {STRONG} at (0,0) size 22x19
+                  LayoutText {#text} at (464,0) size 22x19
+                    text run at (464,0) width 22: "not"
+                LayoutText {#text} at (486,0) size 743x39
+                  text run at (486,0) width 257: " a comment and therefore the selector for"
+                  text run at (0,20) width 138: "P.nineteenb is invalid."
+              LayoutNGBlockFlow {P} at (4,1408) size 747x20 [color=#0000FF]
+                LayoutText {#text} at (0,0) size 470x19
+                  text run at (0,0) width 470: "This paragraph should be blue, because only the first declaration is invalid."
+              LayoutNGBlockFlow {P} at (4,1444) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 478x19
+                  text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+              LayoutNGBlockFlow {P} at (4,1480) size 747x20 [color=#800080]
+                LayoutText {#text} at (0,0) size 483x19
+                  text run at (0,0) width 483: "This paragraph should be purple, because only the first declaration is invalid."
+              LayoutNGBlockFlow {P} at (4,1516) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 478x19
+                  text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+              LayoutNGBlockFlow {P} at (4,1552) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 478x19
+                  text run at (0,0) width 478: "This paragraph should be green, because only the first declaration is invalid."
+              LayoutNGBlockFlow {P} at (4,1588) size 747x20
+                LayoutText {#text} at (48,0) size 601x19
+                  text run at (48,0) width 601: "This paragraph should be indented half an inch, but it should not be maroon. It should be black."
+              LayoutNGBlockFlow {P} at (4,1624) size 747x40
+                LayoutText {#text} at (0,0) size 728x39
+                  text run at (0,0) width 728: "This paragraph should be black, because the color declaration after the previous ruleset should be considered part of"
+                  text run at (0,20) width 639: "the selector for this ruleset, and this ruleset therefore has an invalid selector and should not be applied."
+layer at (8,921) size 769x2 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,913) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/replaced_elements-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/replaced_elements-expected.txt
new file mode 100644
index 0000000..1a3c80b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/replaced_elements-expected.txt
@@ -0,0 +1,84 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2377
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2377 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2377
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2361 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x128
+        LayoutText {#text} at (0,0) size 504x128
+          text run at (0,0) width 208: "IMG.one {display: inline;}"
+          text run at (208,0) width 0: " "
+          text run at (0,16) width 200: "IMG.two {display: block;}"
+          text run at (200,16) width 0: " "
+          text run at (0,32) width 208: "IMG.three {display: block;"
+          text run at (208,32) width 0: " "
+          text run at (0,48) width 504: "           margin-right: auto; margin-left: auto; width: auto;}"
+          text run at (504,48) width 0: " "
+          text run at (0,64) width 200: "IMG.four {display: block;"
+          text run at (200,64) width 0: " "
+          text run at (0,80) width 488: "          margin-right: auto; margin-left: auto; width: 50%;}"
+          text run at (488,80) width 0: " "
+          text run at (0,96) width 200: "IMG.five {display: block;"
+          text run at (200,96) width 0: " "
+          text run at (0,112) width 464: "          margin-right: 0; margin-left: auto; width: 50%;}"
+          text run at (464,112) width 0: " "
+      LayoutNGBlockFlow {P} at (0,195) size 769x20
+        LayoutImage {IMG} at (0,0) size 15x15
+        LayoutText {#text} at (15,0) size 434x19
+          text run at (15,0) width 434: "The image at the beginning of this sentence should be a 15px square."
+      LayoutImage {IMG} at (0,231) size 15x15
+      LayoutNGBlockFlow {P} at (0,262) size 769x20
+        LayoutText {#text} at (0,0) size 489x19
+          text run at (0,0) width 489: "The above image should be a 15px square with the same left edge as this text."
+      LayoutImage {IMG} at (377,298) size 15x15
+      LayoutNGBlockFlow {P} at (0,329) size 769x20
+        LayoutText {#text} at (0,0) size 400x19
+          text run at (0,0) width 400: "The above image should be a 15px square aligned at the center."
+      LayoutImage {IMG} at (192.25,365) size 384.50x384.50
+      LayoutNGBlockFlow {P} at (0,765.50) size 769x40
+        LayoutText {#text} at (0,0) size 766x39
+          text run at (0,0) width 766: "The above image should be a square resized so its width is 50% of the its parent element, and centered horizontally within"
+          text run at (0,20) width 518: "the parent element: the document body in the first half, and the table in the second."
+      LayoutImage {IMG} at (384.50,821.50) size 384.50x384.50
+      LayoutNGBlockFlow {P} at (0,1222) size 769x40
+        LayoutText {#text} at (0,0) size 758x39
+          text run at (0,0) width 758: "The above image should be a square resized so its width is 50% of its parent element, and aligned at the right edge of the"
+          text run at (0,20) width 495: "parent element: the document body in the first half, and the table in the second."
+      LayoutTable {TABLE} at (0,1278) size 769x1083 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x1081
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x1053
+            LayoutNGTableCell {TD} at (0,540) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,516) size 4x19
+                text run at (4,516) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x1053 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20
+                LayoutImage {IMG} at (0,0) size 15x15
+                LayoutText {#text} at (15,0) size 434x19
+                  text run at (15,0) width 434: "The image at the beginning of this sentence should be a 15px square."
+              LayoutImage {IMG} at (4,40) size 15x15
+              LayoutNGBlockFlow {P} at (4,71) size 747x20
+                LayoutText {#text} at (0,0) size 489x19
+                  text run at (0,0) width 489: "The above image should be a 15px square with the same left edge as this text."
+              LayoutImage {IMG} at (370,107) size 15x15
+              LayoutNGBlockFlow {P} at (4,138) size 747x20
+                LayoutText {#text} at (0,0) size 400x19
+                  text run at (0,0) width 400: "The above image should be a 15px square aligned at the center."
+              LayoutImage {IMG} at (190.75,174) size 373.50x373.50
+              LayoutNGBlockFlow {P} at (4,563.50) size 747x40
+                LayoutText {#text} at (0,0) size 722x39
+                  text run at (0,0) width 722: "The above image should be a square resized so its width is 50% of the its parent element, and centered horizontally"
+                  text run at (0,20) width 562: "within the parent element: the document body in the first half, and the table in the second."
+              LayoutImage {IMG} at (377.50,619.50) size 373.50x373.50
+              LayoutNGBlockFlow {P} at (4,1009) size 747x40
+                LayoutText {#text} at (0,0) size 735x39
+                  text run at (0,0) width 735: "The above image should be a square resized so its width is 50% of its parent element, and aligned at the right edge of"
+                  text run at (0,20) width 518: "the parent element: the document body in the first half, and the table in the second."
+layer at (8,185) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,177) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/vertical_formatting-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/vertical_formatting-expected.txt
new file mode 100644
index 0000000..d4d4e4e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/vertical_formatting-expected.txt
@@ -0,0 +1,171 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2599
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2599 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2598.78
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2582.78 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x320
+        LayoutText {#text} at (0,0) size 496x304
+          text run at (0,0) width 368: "P.one {margin-bottom: 2cm; padding-bottom: 0;}"
+          text run at (368,0) width 0: " "
+          text run at (0,16) width 320: "P.two {margin-top: 2cm; padding-top: 0;}"
+          text run at (320,16) width 0: " "
+          text run at (0,32) width 320: "P.three {margin-top: 0; padding-top: 0;}"
+          text run at (320,32) width 0: " "
+          text run at (0,48) width 344: "P.four {margin-top: -1cm; margin-bottom: 0;"
+          text run at (344,48) width 0: " "
+          text run at (0,64) width 344: "        padding-top: 0; padding-bottom: 0;}"
+          text run at (344,64) width 0: " "
+          text run at (0,80) width 368: "DIV.five {margin-top: 1cm; margin-bottom: 1cm;"
+          text run at (368,80) width 0: " "
+          text run at (0,96) width 376: "          padding-top: 1cm; padding-bottom: 0;}"
+          text run at (376,96) width 0: " "
+          text run at (0,112) width 344: "P.six {margin-top: 1cm; margin-bottom: 1cm;"
+          text run at (344,112) width 0: " "
+          text run at (0,128) width 336: "       padding-top: 0; padding-bottom: 0;}"
+          text run at (336,128) width 0: " "
+          text run at (0,144) width 336: "P.seven {margin-top: 1cm; padding-top: 0;}"
+          text run at (336,144) width 0: " "
+          text run at (0,160) width 408: "P.eight {margin-bottom: -1cm; padding-bottom: 2cm;}"
+          text run at (408,160) width 0: " "
+          text run at (0,176) width 344: "P.nine {margin-top: -1cm; padding-top: 1cm;"
+          text run at (344,176) width 0: " "
+          text run at (0,192) width 376: "        padding-bottom: 0; margin-bottom: 1cm;}"
+          text run at (376,192) width 0: " "
+          text run at (0,208) width 304: "P.ten {margin-top: 1cm;padding-top: 0;"
+          text run at (304,208) width 0: " "
+          text run at (0,224) width 248: "       float: left;width: 50%;}"
+          text run at (248,224) width 0: " "
+          text run at (0,240) width 448: "P.eleven {margin-top: 1cm; padding-top: 0; clear: none;}"
+          text run at (448,240) width 0: " "
+          text run at (0,256) width 496: "P.twelve {margin-bottom: 0; padding-bottom: 1cm; clear: both;}"
+          text run at (496,256) width 0: " "
+          text run at (0,272) width 360: "P.thirteen {margin-top: 0; padding-top: 1cm;}"
+          text run at (360,272) width 0: " "
+          text run at (0,288) width 160: "TABLE {clear: both;}"
+          text run at (160,288) width 0: " "
+          text run at (0,304) width 0: " "
+      LayoutNGBlockFlow {P} at (0,387) size 769x40
+        LayoutText {#text} at (0,0) size 754x39
+          text run at (0,0) width 754: "There should be a two-centimeter margin between this paragraph and the next, because adjacent vertical margins should"
+          text run at (0,20) width 255: "collapse to the maximum of the margins."
+      LayoutNGBlockFlow {P} at (0,502.58) size 769x20
+        LayoutText {#text} at (0,0) size 164x19
+          text run at (0,0) width 164: "This is another paragraph."
+      LayoutNGBlockFlow {P} at (0,538.58) size 769x20
+        LayoutText {#text} at (0,0) size 494x19
+          text run at (0,0) width 494: "There should be a two-centimeter margin between this paragraph and the next."
+      LayoutNGBlockFlow {P} at (0,634.16) size 769x20
+        LayoutText {#text} at (0,0) size 164x19
+          text run at (0,0) width 164: "This is another paragraph."
+      LayoutNGBlockFlow {P} at (0,670.16) size 769x40
+        LayoutText {#text} at (0,0) size 719x39
+          text run at (0,0) width 719: "There should be a one-centimeter margin between this paragraph and the next, because when there is one negative"
+          text run at (0,20) width 465: "margin, the two margins should be added (the minus sign should be kept)."
+      LayoutNGBlockFlow {P} at (0,747.95) size 769x20
+        LayoutText {#text} at (0,0) size 164x19
+          text run at (0,0) width 164: "This is another paragraph."
+      LayoutNGBlockFlow {DIV} at (0,805.73) size 769x135.56
+        LayoutNGBlockFlow {P} at (0,75.56) size 769x60
+          LayoutText {#text} at (0,0) size 759x59
+            text run at (0,0) width 757: "There should be three centimeters between this text and the text above, but only one centimeter between this text and the"
+            text run at (0,20) width 759: "text below, because vertical margins of nested elements should collapse only if there is no border or padding between the"
+            text run at (0,40) width 54: "margins."
+      LayoutNGBlockFlow {P} at (0,979.08) size 769x20
+        LayoutText {#text} at (0,0) size 109x19
+          text run at (0,0) width 109: "This is more text."
+      LayoutNGBlockFlow {P} at (0,1015.08) size 769x115.58
+        LayoutText {#text} at (0,0) size 725x39
+          text run at (0,0) width 725: "There should be two centimeters between this paragraph and the one below, because negative margins collapse to a"
+          text run at (0,20) width 456: "negative margin with the largest absolute value of the margins collapsed."
+      LayoutNGBlockFlow {P} at (0,1092.88) size 769x77.78
+        LayoutText {#text} at (0,37) size 765x40
+          text run at (0,37) width 765: "This is a paragraph, which I should make very long so that you can easily see how much space there is between it and the"
+          text run at (0,57) width 181: "one below it and to the right."
+      LayoutNGBlockFlow (floating) {P} at (0,1246.22) size 384.50x60
+        LayoutText {#text} at (0,0) size 382x59
+          text run at (0,0) width 382: "There should be two centimeters between this paragraph and"
+          text run at (0,20) width 365: "the one above it, since margins do not collapse on floating"
+          text run at (0,40) width 59: "elements."
+      LayoutNGBlockFlow {P} at (0,1208.44) size 769x60
+        LayoutText {#text} at (384,0) size 376x59
+          text run at (384,0) width 376: "There should be one centimeter between this paragraph and"
+          text run at (384,20) width 357: "the (non-floating) one above it, since the float should not"
+          text run at (384,40) width 182: "effect the paragraph spacing."
+      LayoutNGBlockFlow {P} at (0,1322.22) size 769x77.78
+        LayoutText {#text} at (0,0) size 749x39
+          text run at (0,0) width 749: "There should be two centimeters of padding between this paragraph and the one below. Padding does not collapse, and"
+          text run at (0,20) width 234: "there is 1cm of padding on each side."
+      LayoutNGBlockFlow {P} at (0,1400) size 769x57.78
+        LayoutText {#text} at (0,37) size 167x20
+          text run at (0,37) width 167: "This is the next paragraph."
+      LayoutTable {TABLE} at (0,1473.78) size 769x1109 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x1107
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x1079
+            LayoutNGTableCell {TD} at (0,553) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,529) size 4x19
+                text run at (4,529) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x1078.78 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x40
+                LayoutText {#text} at (0,0) size 708x39
+                  text run at (0,0) width 708: "There should be a two-centimeter margin between this paragraph and the next, because adjacent vertical margins"
+                  text run at (0,20) width 301: "should collapse to the maximum of the margins."
+              LayoutNGBlockFlow {P} at (4,119.58) size 747x20
+                LayoutText {#text} at (0,0) size 164x19
+                  text run at (0,0) width 164: "This is another paragraph."
+              LayoutNGBlockFlow {P} at (4,155.58) size 747x20
+                LayoutText {#text} at (0,0) size 494x19
+                  text run at (0,0) width 494: "There should be a two-centimeter margin between this paragraph and the next."
+              LayoutNGBlockFlow {P} at (4,251.16) size 747x20
+                LayoutText {#text} at (0,0) size 164x19
+                  text run at (0,0) width 164: "This is another paragraph."
+              LayoutNGBlockFlow {P} at (4,287.16) size 747x40
+                LayoutText {#text} at (0,0) size 719x39
+                  text run at (0,0) width 719: "There should be a one-centimeter margin between this paragraph and the next, because when there is one negative"
+                  text run at (0,20) width 465: "margin, the two margins should be added (the minus sign should be kept)."
+              LayoutNGBlockFlow {P} at (4,364.95) size 747x20
+                LayoutText {#text} at (0,0) size 164x19
+                  text run at (0,0) width 164: "This is another paragraph."
+              LayoutNGBlockFlow {DIV} at (4,422.73) size 747x135.56
+                LayoutNGBlockFlow {P} at (0,75.56) size 747x60
+                  LayoutText {#text} at (0,0) size 734x59
+                    text run at (0,0) width 734: "There should be three centimeters between this text and the text above, but only one centimeter between this text and"
+                    text run at (0,20) width 702: "the text below, because vertical margins of nested elements should collapse only if there is no border or padding"
+                    text run at (0,40) width 134: "between the margins."
+              LayoutNGBlockFlow {P} at (4,596.08) size 747x20
+                LayoutText {#text} at (0,0) size 109x19
+                  text run at (0,0) width 109: "This is more text."
+              LayoutNGBlockFlow {P} at (4,632.08) size 747x115.58
+                LayoutText {#text} at (0,0) size 725x39
+                  text run at (0,0) width 725: "There should be two centimeters between this paragraph and the one below, because negative margins collapse to a"
+                  text run at (0,20) width 456: "negative margin with the largest absolute value of the margins collapsed."
+              LayoutNGBlockFlow {P} at (4,709.88) size 747x77.78
+                LayoutText {#text} at (0,37) size 742x40
+                  text run at (0,37) width 742: "This is a paragraph, which I should make very long so that you can easily see how much space there is between it and"
+                  text run at (0,57) width 204: "the one below it and to the right."
+              LayoutNGBlockFlow (floating) {P} at (4,863.22) size 373.50x60
+                LayoutText {#text} at (0,0) size 355x59
+                  text run at (0,0) width 355: "There should be two centimeters between this paragraph"
+                  text run at (0,20) width 340: "and the one above it, since margins do not collapse on"
+                  text run at (0,40) width 111: "floating elements."
+              LayoutNGBlockFlow {P} at (4,825.44) size 747x60
+                LayoutText {#text} at (373,0) size 360x59
+                  text run at (373,0) width 349: "There should be one centimeter between this paragraph"
+                  text run at (373,20) width 360: "and the (non-floating) one above it, since the float should"
+                  text run at (373,40) width 206: "not effect the paragraph spacing."
+              LayoutNGBlockFlow {P} at (4,939.22) size 747x77.78
+                LayoutText {#text} at (0,0) size 722x39
+                  text run at (0,0) width 722: "There should be two centimeters of padding between this paragraph and the one below. Padding does not collapse,"
+                  text run at (0,20) width 261: "and there is 1cm of padding on each side."
+              LayoutNGBlockFlow {P} at (4,1017) size 747x57.78
+                LayoutText {#text} at (0,37) size 167x20
+                  text run at (0,37) width 167: "This is the next paragraph."
+layer at (8,377) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,369) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/firstletter-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/firstletter-expected.txt
new file mode 100644
index 0000000..b80e7be
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/firstletter-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 751
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x751 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x751
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x735 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 10x19 [color=#800000]
+          LayoutTextFragment (anonymous) at (0,0) size 10x19
+            text run at (0,0) width 10: "T"
+        LayoutTextFragment {#text} at (10,0) size 345x19
+          text run at (10,0) width 345: "he style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x64
+        LayoutText {#text} at (0,0) size 312x48
+          text run at (0,0) width 248: "P:first-letter {color: maroon;}"
+          text run at (248,0) width 0: " "
+          text run at (0,16) width 288: ".two:first-letter {font-size: 200%;}"
+          text run at (288,16) width 0: " "
+          text run at (0,32) width 312: "P.three:first-letter {font-size: 350%;}"
+          text run at (312,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 769x60
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 10x19 [color=#800000]
+          LayoutTextFragment (anonymous) at (0,0) size 10x19
+            text run at (0,0) width 10: "T"
+        LayoutTextFragment {#text} at (10,0) size 764x59
+          text run at (10,0) width 754: "he first letter of this paragraph, and only that one, should be maroon. If this precise combination does not occur, then the"
+          text run at (0,20) width 761: "user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed on more"
+          text run at (0,40) width 85: "than one line."
+      LayoutNGBlockFlow {P} at (0,207) size 769x77
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#800000]
+          LayoutTextFragment (anonymous) at (0,0) size 20x36
+            text run at (0,0) width 20: "T"
+        LayoutTextFragment {#text} at (20,13) size 757x63
+          text run at (20,13) width 695: "he first letter of this paragraph, and only that one, should be a larger font size, as well as maroon. If this precise"
+          text run at (0,37) width 757: "combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test, the"
+          text run at (0,57) width 325: "paragraph must be displayed on more than one line."
+      LayoutNGBlockFlow {P} at (0,300) size 769x106
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 76x64 [color=#800000]
+          LayoutTextFragment (anonymous) at (0,1) size 76x64
+            text run at (0,1) width 76: "\"W"
+        LayoutTextFragment {#text} at (76,36) size 760x69
+          text run at (76,36) width 684: "e should check for quotation support,\" it was said. The first two characters in this paragraph-- a double-quote"
+          text run at (0,66) width 756: "mark and a capital 'W'-- should be 350% bigger than the rest of the paragraph, and maroon. Note that this is not required"
+          text run at (0,86) width 228: "under CSS1, but it is recommended."
+      LayoutTable {TABLE} at (0,422) size 769x313 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x311
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x283
+            LayoutNGTableCell {TD} at (0,155) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,131) size 4x19
+                text run at (4,131) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x283 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x60
+                LayoutInline {<pseudo:first-letter>} at (0,0) size 10x19 [color=#800000]
+                  LayoutTextFragment (anonymous) at (0,0) size 10x19
+                    text run at (0,0) width 10: "T"
+                LayoutTextFragment {#text} at (10,0) size 741x59
+                  text run at (10,0) width 731: "he first letter of this paragraph, and only that one, should be maroon. If this precise combination does not occur, then"
+                  text run at (0,20) width 728: "the user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed"
+                  text run at (0,40) width 141: "on more than one line."
+              LayoutNGBlockFlow {P} at (4,80) size 747x77
+                LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#800000]
+                  LayoutTextFragment (anonymous) at (0,0) size 20x36
+                    text run at (0,0) width 20: "T"
+                LayoutTextFragment {#text} at (20,13) size 734x63
+                  text run at (20,13) width 695: "he first letter of this paragraph, and only that one, should be a larger font size, as well as maroon. If this precise"
+                  text run at (0,37) width 734: "combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test,"
+                  text run at (0,57) width 348: "the paragraph must be displayed on more than one line."
+              LayoutNGBlockFlow {P} at (4,173) size 747x106
+                LayoutInline {<pseudo:first-letter>} at (0,0) size 76x64 [color=#800000]
+                  LayoutTextFragment (anonymous) at (0,1) size 76x64
+                    text run at (0,1) width 76: "\"W"
+                LayoutTextFragment {#text} at (76,36) size 739x69
+                  text run at (76,36) width 649: "e should check for quotation support,\" it was said. The first two characters in this paragraph-- a double-"
+                  text run at (0,66) width 739: "quote mark and a capital 'W'-- should be 350% bigger than the rest of the paragraph, and maroon. Note that this is not"
+                  text run at (0,86) width 284: "required under CSS1, but it is recommended."
+layer at (8,121) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/color_units-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/color_units-expected.txt
new file mode 100644
index 0000000..e101e38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/color_units-expected.txt
@@ -0,0 +1,239 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1805
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1805 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1805
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1789 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x192
+        LayoutText {#text} at (0,0) size 288x192
+          text run at (0,0) width 160: "BODY {color: black;}"
+          text run at (160,0) width 0: " "
+          text run at (0,16) width 152: ".one {color: #080;}"
+          text run at (152,16) width 0: " "
+          text run at (0,32) width 176: ".two {color: #008000;}"
+          text run at (176,32) width 0: " "
+          text run at (0,48) width 232: ".three {color: rgb(0,128,0);}"
+          text run at (232,48) width 0: " "
+          text run at (0,64) width 240: ".four {color: rgb(0%,50%,0%);}"
+          text run at (240,64) width 0: " "
+          text run at (0,80) width 288: ".five {color: rgb(0.0%,50.0%,0.0%);}"
+          text run at (288,80) width 0: " "
+          text run at (0,96) width 160: ".six {color: green;}"
+          text run at (160,96) width 0: " "
+          text run at (0,112) width 232: ".seven {color: invalidValue;}"
+          text run at (232,112) width 0: " "
+          text run at (0,128) width 256: ".eight {color: rgb(0,128,1280);}"
+          text run at (256,128) width 0: " "
+          text run at (0,144) width 240: ".nine {color: rgb(0,128,255);}"
+          text run at (240,144) width 0: " "
+          text run at (0,160) width 264: ".ten {color: rgb(50%,-500%,60%);}"
+          text run at (264,160) width 0: " "
+          text run at (0,176) width 264: ".eleven {color: rgb(50%,0%,60%);}"
+          text run at (264,176) width 0: " "
+      LayoutNGBlockFlow {P} at (0,259) size 769x20
+        LayoutText {#text} at (0,0) size 193x19
+          text run at (0,0) width 193: "This sentence should be black."
+      LayoutNGBlockFlow {P} at (0,295) size 769x20 [color=#008800]
+        LayoutText {#text} at (0,0) size 506x19
+          text run at (0,0) width 506: "This sentence should be green, although slightly different from those that follow."
+      LayoutNGBlockFlow {P} at (0,331) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,367) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,403) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,439) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,475) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 194x19
+          text run at (0,0) width 194: "This sentence should be green."
+      LayoutNGBlockFlow {P} at (0,511) size 769x20
+        LayoutText {#text} at (0,0) size 407x19
+          text run at (0,0) width 407: "This sentence should be black, because the value given for class "
+        LayoutInline {CODE} at (0,0) size 48x16
+          LayoutText {#text} at (407,3) size 48x16
+            text run at (407,3) width 48: ".seven"
+        LayoutText {#text} at (455,0) size 65x19
+          text run at (455,0) width 65: " is invalid."
+      LayoutNGBlockFlow {P} at (0,547) size 769x40 [color=#0080FF]
+        LayoutText {#text} at (0,0) size 725x39
+          text run at (0,0) width 725: "This sentence should be a shade of blue-green which, on a typical RGB computer display, exactly matches the next"
+          text run at (0,20) width 67: "paragraph."
+      LayoutNGBlockFlow {P} at (0,603) size 769x40 [color=#0080FF]
+        LayoutText {#text} at (0,0) size 752x39
+          text run at (0,0) width 752: "This sentence should be a shade of blue-green which, on a typical RGB computer display, exactly matches the previous"
+          text run at (0,20) width 67: "paragraph."
+      LayoutNGBlockFlow {P} at (0,659) size 769x20 [color=#800099]
+        LayoutText {#text} at (0,0) size 769x19
+          text run at (0,0) width 769: "This sentence should be a shade of purple which, on a typical RGB computer display, exactly matches the next paragraph."
+      LayoutNGBlockFlow {P} at (0,695) size 769x40 [color=#800099]
+        LayoutText {#text} at (0,0) size 725x39
+          text run at (0,0) width 725: "This sentence should be a shade of purple which, on a typical RGB computer display, exactly matches the previous"
+          text run at (0,20) width 67: "paragraph."
+      LayoutNGBlockFlow {P} at (0,751) size 769x20
+        LayoutText {#text} at (0,0) size 193x19
+          text run at (0,0) width 193: "This sentence should be black."
+      LayoutNGBlockFlow {P} at (0,787) size 769x20 [color=#008800]
+        LayoutText {#text} at (0,0) size 399x19
+          text run at (0,0) width 399: "This sentence should be a slightly different green, and used the "
+        LayoutInline {TT} at (0,0) size 41x16
+          LayoutText {#text} at (398,3) size 41x16
+            text run at (398,3) width 41: "style"
+        LayoutText {#text} at (438,0) size 60x19
+          text run at (438,0) width 60: " attribute."
+      LayoutNGBlockFlow {P} at (0,823) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 281x19
+          text run at (0,0) width 281: "This sentence should be green, and used the "
+        LayoutInline {TT} at (0,0) size 40x16
+          LayoutText {#text} at (281,3) size 40x16
+            text run at (281,3) width 40: "style"
+        LayoutText {#text} at (321,0) size 59x19
+          text run at (321,0) width 59: " attribute."
+      LayoutNGBlockFlow {P} at (0,859) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 281x19
+          text run at (0,0) width 281: "This sentence should be green, and used the "
+        LayoutInline {TT} at (0,0) size 40x16
+          LayoutText {#text} at (281,3) size 40x16
+            text run at (281,3) width 40: "style"
+        LayoutText {#text} at (321,0) size 59x19
+          text run at (321,0) width 59: " attribute."
+      LayoutNGBlockFlow {P} at (0,895) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 281x19
+          text run at (0,0) width 281: "This sentence should be green, and used the "
+        LayoutInline {TT} at (0,0) size 40x16
+          LayoutText {#text} at (281,3) size 40x16
+            text run at (281,3) width 40: "style"
+        LayoutText {#text} at (321,0) size 59x19
+          text run at (321,0) width 59: " attribute."
+      LayoutNGBlockFlow {P} at (0,931) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 281x19
+          text run at (0,0) width 281: "This sentence should be green, and used the "
+        LayoutInline {TT} at (0,0) size 40x16
+          LayoutText {#text} at (281,3) size 40x16
+            text run at (281,3) width 40: "style"
+        LayoutText {#text} at (321,0) size 59x19
+          text run at (321,0) width 59: " attribute."
+      LayoutNGBlockFlow {P} at (0,967) size 769x20 [color=#008000]
+        LayoutText {#text} at (0,0) size 281x19
+          text run at (0,0) width 281: "This sentence should be green, and used the "
+        LayoutInline {TT} at (0,0) size 40x16
+          LayoutText {#text} at (281,3) size 40x16
+            text run at (281,3) width 40: "style"
+        LayoutText {#text} at (321,0) size 59x19
+          text run at (321,0) width 59: " attribute."
+      LayoutTable {TABLE} at (0,1003) size 769x786 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x784
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x756
+            LayoutNGTableCell {TD} at (0,392) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,368) size 4x19
+                text run at (4,368) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x756 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 747x20
+                LayoutText {#text} at (0,0) size 193x19
+                  text run at (0,0) width 193: "This sentence should be black."
+              LayoutNGBlockFlow {P} at (4,40) size 747x20 [color=#008800]
+                LayoutText {#text} at (0,0) size 506x19
+                  text run at (0,0) width 506: "This sentence should be green, although slightly different from those that follow."
+              LayoutNGBlockFlow {P} at (4,76) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,112) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,148) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,184) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,220) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 194x19
+                  text run at (0,0) width 194: "This sentence should be green."
+              LayoutNGBlockFlow {P} at (4,256) size 747x20
+                LayoutText {#text} at (0,0) size 407x19
+                  text run at (0,0) width 407: "This sentence should be black, because the value given for class "
+                LayoutInline {CODE} at (0,0) size 48x16
+                  LayoutText {#text} at (407,3) size 48x16
+                    text run at (407,3) width 48: ".seven"
+                LayoutText {#text} at (455,0) size 65x19
+                  text run at (455,0) width 65: " is invalid."
+              LayoutNGBlockFlow {P} at (4,292) size 747x40 [color=#0080FF]
+                LayoutText {#text} at (0,0) size 725x39
+                  text run at (0,0) width 725: "This sentence should be a shade of blue-green which, on a typical RGB computer display, exactly matches the next"
+                  text run at (0,20) width 67: "paragraph."
+              LayoutNGBlockFlow {P} at (4,348) size 747x40 [color=#0080FF]
+                LayoutText {#text} at (0,0) size 694x39
+                  text run at (0,0) width 694: "This sentence should be a shade of blue-green which, on a typical RGB computer display, exactly matches the"
+                  text run at (0,20) width 125: "previous paragraph."
+              LayoutNGBlockFlow {P} at (4,404) size 747x40 [color=#800099]
+                LayoutText {#text} at (0,0) size 698x39
+                  text run at (0,0) width 698: "This sentence should be a shade of purple which, on a typical RGB computer display, exactly matches the next"
+                  text run at (0,20) width 67: "paragraph."
+              LayoutNGBlockFlow {P} at (4,460) size 747x40 [color=#800099]
+                LayoutText {#text} at (0,0) size 725x39
+                  text run at (0,0) width 725: "This sentence should be a shade of purple which, on a typical RGB computer display, exactly matches the previous"
+                  text run at (0,20) width 67: "paragraph."
+              LayoutNGBlockFlow {P} at (4,516) size 747x20
+                LayoutText {#text} at (0,0) size 193x19
+                  text run at (0,0) width 193: "This sentence should be black."
+              LayoutNGBlockFlow {P} at (4,552) size 747x20 [color=#008800]
+                LayoutText {#text} at (0,0) size 399x19
+                  text run at (0,0) width 399: "This sentence should be a slightly different green, and used the "
+                LayoutInline {TT} at (0,0) size 41x16
+                  LayoutText {#text} at (398,3) size 41x16
+                    text run at (398,3) width 41: "style"
+                LayoutText {#text} at (438,0) size 60x19
+                  text run at (438,0) width 60: " attribute."
+              LayoutNGBlockFlow {P} at (4,588) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 281x19
+                  text run at (0,0) width 281: "This sentence should be green, and used the "
+                LayoutInline {TT} at (0,0) size 40x16
+                  LayoutText {#text} at (281,3) size 40x16
+                    text run at (281,3) width 40: "style"
+                LayoutText {#text} at (321,0) size 59x19
+                  text run at (321,0) width 59: " attribute."
+              LayoutNGBlockFlow {P} at (4,624) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 281x19
+                  text run at (0,0) width 281: "This sentence should be green, and used the "
+                LayoutInline {TT} at (0,0) size 40x16
+                  LayoutText {#text} at (281,3) size 40x16
+                    text run at (281,3) width 40: "style"
+                LayoutText {#text} at (321,0) size 59x19
+                  text run at (321,0) width 59: " attribute."
+              LayoutNGBlockFlow {P} at (4,660) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 281x19
+                  text run at (0,0) width 281: "This sentence should be green, and used the "
+                LayoutInline {TT} at (0,0) size 40x16
+                  LayoutText {#text} at (281,3) size 40x16
+                    text run at (281,3) width 40: "style"
+                LayoutText {#text} at (321,0) size 59x19
+                  text run at (321,0) width 59: " attribute."
+              LayoutNGBlockFlow {P} at (4,696) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 281x19
+                  text run at (0,0) width 281: "This sentence should be green, and used the "
+                LayoutInline {TT} at (0,0) size 40x16
+                  LayoutText {#text} at (281,3) size 40x16
+                    text run at (281,3) width 40: "style"
+                LayoutText {#text} at (321,0) size 59x19
+                  text run at (321,0) width 59: " attribute."
+              LayoutNGBlockFlow {P} at (4,732) size 747x20 [color=#008000]
+                LayoutText {#text} at (0,0) size 281x19
+                  text run at (0,0) width 281: "This sentence should be green, and used the "
+                LayoutInline {TT} at (0,0) size 40x16
+                  LayoutText {#text} at (281,3) size 40x16
+                    text run at (281,3) width 40: "style"
+                LayoutText {#text} at (321,0) size 59x19
+                  text run at (321,0) width 59: " attribute."
+layer at (8,249) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,241) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/percentage_units-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/percentage_units-expected.txt
new file mode 100644
index 0000000..08050d5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/percentage_units-expected.txt
@@ -0,0 +1,67 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 601
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x601 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x601
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x585 [bgcolor=#CCCCCC]
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 769x80
+        LayoutText {#text} at (0,0) size 504x64
+          text run at (0,0) width 224: ".zero { background: yellow }"
+          text run at (224,0) width 0: " "
+          text run at (0,16) width 504: ".one { margin-left: 25%; margin-right: 25%; background: white }"
+          text run at (504,16) width 0: " "
+          text run at (0,32) width 496: ".two { margin-left: 50%; margin-right: 0%; background: white }"
+          text run at (496,32) width 0: " "
+          text run at (0,48) width 208: ".three {margin-left: 25%;}"
+          text run at (208,48) width 0: " "
+          text run at (0,64) width 0: " "
+      LayoutNGBlockFlow {DIV} at (0,147) size 769x136 [bgcolor=#FFFF00]
+        LayoutNGBlockFlow {DIV} at (192.25,0) size 384.50x60 [bgcolor=#FFFFFF]
+          LayoutNGBlockFlow {P} at (0,0) size 384.50x60
+            LayoutText {#text} at (0,0) size 326x59
+              text run at (0,0) width 326: "This paragraph should be centered within its yellow"
+              text run at (0,20) width 323: "containing block and its width should be half of the"
+              text run at (0,40) width 109: "containing block."
+        LayoutNGBlockFlow {DIV} at (384.50,76) size 384.50x60 [bgcolor=#FFFFFF]
+          LayoutNGBlockFlow {P} at (0,0) size 384.50x60
+            LayoutText {#text} at (0,0) size 353x59
+              text run at (0,0) width 353: "This paragraph should be right-aligned within its yellow"
+              text run at (0,20) width 323: "containing block and its width should be half of the"
+              text run at (0,40) width 109: "containing block."
+      LayoutNGBlockFlow {P} at (192.25,299) size 576.75x40
+        LayoutText {#text} at (0,0) size 549x39
+          text run at (0,0) width 549: "This paragraph should have a left margin of 25% the width of its parent element, which"
+          text run at (0,20) width 356: "should require some extra text in order to test effectively."
+      LayoutTable {TABLE} at (0,355) size 769x230 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 767x228
+          LayoutTableRow {TR} at (0,0) size 767x28
+            LayoutNGTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 767x200
+            LayoutNGTableCell {TD} at (0,114) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,90) size 4x19
+                text run at (4,90) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 755x200 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (4,4) size 747x136 [bgcolor=#FFFF00]
+                LayoutNGBlockFlow {DIV} at (186.75,0) size 373.50x60 [bgcolor=#FFFFFF]
+                  LayoutNGBlockFlow {P} at (0,0) size 373.50x60
+                    LayoutText {#text} at (0,0) size 326x59
+                      text run at (0,0) width 326: "This paragraph should be centered within its yellow"
+                      text run at (0,20) width 323: "containing block and its width should be half of the"
+                      text run at (0,40) width 109: "containing block."
+                LayoutNGBlockFlow {DIV} at (373.50,76) size 373.50x60 [bgcolor=#FFFFFF]
+                  LayoutNGBlockFlow {P} at (0,0) size 373.50x60
+                    LayoutText {#text} at (0,0) size 353x59
+                      text run at (0,0) width 353: "This paragraph should be right-aligned within its yellow"
+                      text run at (0,20) width 323: "containing block and its width should be half of the"
+                      text run at (0,40) width 109: "containing block."
+              LayoutNGBlockFlow {P} at (190.75,156) size 560.25x40
+                LayoutText {#text} at (0,0) size 549x39
+                  text run at (0,0) width 549: "This paragraph should have a left margin of 25% the width of its parent element, which"
+                  text run at (0,20) width 356: "should require some extra text in order to test effectively."
+layer at (8,137) size 769x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,129) size 769x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/urls-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/urls-expected.txt
new file mode 100644
index 0000000..07b15db
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/urls-expected.txt
@@ -0,0 +1,57 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 355x19
+          text run at (0,0) width 355: "The style declarations which apply to the text below are:"
+      LayoutNGBlockFlow {PRE} at (0,36) size 784x64
+        LayoutText {#text} at (0,0) size 648x48
+          text run at (0,0) width 648: "<LINK rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"../resources/bg.gif\">"
+          text run at (648,0) width 0: " "
+          text run at (0,16) width 296: "@import url(../resources/sec642.css);"
+          text run at (296,16) width 0: " "
+          text run at (0,32) width 352: "BODY {background: url(../resources/bg.gif);}"
+          text run at (352,32) width 0: " "
+          text run at (0,48) width 0: " "
+      LayoutNGBlockFlow {P} at (0,131) size 784x20
+        LayoutText {#text} at (0,0) size 386x19
+          text run at (0,0) width 386: "This page should have a green grid pattern as its background."
+      LayoutNGBlockFlow {P} at (0,167) size 784x60 [bgcolor=#FFFFFF]
+        LayoutText {#text} at (0,0) size 779x59
+          text run at (0,0) width 779: "This paragraph should have a white background, but NO image should appear in the background. If an image, in this case a"
+          text run at (0,20) width 755: "red square-- or, indeed, any red at all-- is seen there, then the browser has incorrectly interpreted a URL in relation to the"
+          text run at (0,40) width 274: "document's URL, not the stylesheet's URL."
+      LayoutNGBlockFlow {P} at (0,243) size 784x60 [bgcolor=#FFFFFF]
+        LayoutText {#text} at (0,0) size 779x59
+          text run at (0,0) width 779: "This paragraph should have a white background, but NO image should appear in the background. If an image, in this case a"
+          text run at (0,20) width 755: "red square-- or, indeed, any red at all-- is seen there, then the browser has incorrectly interpreted a URL in relation to the"
+          text run at (0,40) width 274: "document's URL, not the stylesheet's URL."
+      LayoutTable {TABLE} at (0,319) size 784x210 [border: (1px outset #808080)]
+        LayoutTableSection {TBODY} at (1,1) size 782x208
+          LayoutTableRow {TR} at (0,0) size 782x28
+            LayoutNGTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
+              LayoutInline {STRONG} at (0,0) size 161x19
+                LayoutText {#text} at (4,4) size 161x19
+                  text run at (4,4) width 161: "TABLE Testing Section"
+          LayoutTableRow {TR} at (0,28) size 782x180
+            LayoutNGTableCell {TD} at (0,104) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,80) size 4x19
+                text run at (4,80) width 4: " "
+            LayoutNGTableCell {TD} at (12,28) size 770x180 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (4,4) size 762x20
+                LayoutText {#text} at (0,0) size 386x19
+                  text run at (0,0) width 386: "This page should have a green grid pattern as its background."
+              LayoutNGBlockFlow {P} at (4,40) size 762x60 [bgcolor=#FFFFFF]
+                LayoutText {#text} at (0,0) size 758x59
+                  text run at (0,0) width 737: "This paragraph should have a white background, but NO image should appear in the background. If an image, in this"
+                  text run at (0,20) width 758: "case a red square-- or, indeed, any red at all-- is seen there, then the browser has incorrectly interpreted a URL in relation"
+                  text run at (0,40) width 313: "to the document's URL, not the stylesheet's URL."
+              LayoutNGBlockFlow {P} at (4,116) size 762x60 [bgcolor=#FFFFFF]
+                LayoutText {#text} at (0,0) size 758x59
+                  text run at (0,0) width 737: "This paragraph should have a white background, but NO image should appear in the background. If an image, in this"
+                  text run at (0,20) width 758: "case a red square-- or, indeed, any red at all-- is seen there, then the browser has incorrectly interpreted a URL in relation"
+                  text run at (0,40) width 313: "to the document's URL, not the stylesheet's URL."
+layer at (8,121) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,113) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-collapse-offset-002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-collapse-offset-002-expected.txt
new file mode 100644
index 0000000..2c99d48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-collapse-offset-002-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x84
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x84
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x68
+      LayoutTable {TABLE} at (0,0) size 110x68 [border: (2px none #808080)]
+        LayoutBlockFlow {CAPTION} at (0,0) size 110x28 [border: (4px solid #008000)]
+          LayoutText {#text} at (32,4) size 46x19
+            text run at (32,4) width 46: "caption"
+        LayoutTableSection {TBODY} at (2,30) size 106x36
+          LayoutTableRow {TR} at (0,0) size 106x36
+            LayoutNGTableCell {TD} at (0,5) size 106x26 [border: (2px solid #FFA500)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (36,8) size 34x19
+                text run at (36,8) width 34: "cell 1"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-079-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-079-expected.txt
new file mode 100644
index 0000000..668e2ecd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-079-expected.txt
@@ -0,0 +1,44 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x310
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x310
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x286
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 465x19
+          text run at (0,0) width 465: "Test passes if the center box in the table below has a border similar to this:"
+      LayoutTable {TABLE} at (0,36) size 60x60 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 55x55
+          LayoutTableRow {TR} at (0,0) size 55x55
+            LayoutNGTableCell {TD} at (0,24) size 55x7 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+      LayoutTable {TABLE} at (0,116) size 170x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 165x165
+          LayoutTableRow {TR} at (0,0) size 165x55
+            LayoutNGTableCell {TD} at (0,14) size 55x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (55,14) size 55x27 [border: (3px outset #00FF00) (2px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (110,14) size 55x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,55) size 165x55
+            LayoutNGTableCell {TD} at (0,69) size 55x27 [border: (3px outset #00FF00) (2px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (55,69) size 55x27 [border: (3px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (110,69) size 55x27 [border: (3px outset #00FF00) (3px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,110) size 165x55
+            LayoutNGTableCell {TD} at (0,124) size 55x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (55,124) size 55x27 [border: (3px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (110,124) size 55x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-088-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-088-expected.txt
new file mode 100644
index 0000000..b168c23
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/border-conflict-style-088-expected.txt
@@ -0,0 +1,44 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x310
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x310
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x286
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 465x19
+          text run at (0,0) width 465: "Test passes if the center box in the table below has a border similar to this:"
+      LayoutTable {TABLE} at (0,36) size 60x60 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 55x55
+          LayoutTableRow {TR} at (0,0) size 55x55
+            LayoutNGTableCell {TD} at (0,24) size 55x7 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+      LayoutTable {TABLE} at (0,116) size 170x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 165x165
+          LayoutTableRow {TR} at (0,0) size 165x55
+            LayoutNGTableCell {TD} at (0,14) size 55x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (55,14) size 55x27 [border: (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (110,14) size 55x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,55) size 165x55
+            LayoutNGTableCell {TD} at (0,69) size 55x27 [border: (3px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (55,69) size 55x27 [border: (3px outset #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (110,69) size 55x27 [border: (3px ridge #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,110) size 165x55
+            LayoutNGTableCell {TD} at (0,124) size 55x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (55,124) size 55x27 [border: (3px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (110,124) size 55x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/list-style-position-005-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/list-style-position-005-expected.txt
new file mode 100644
index 0000000..b76972f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/list-style-position-005-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x262
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x262
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x238
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 91x19
+          text run at (0,0) width 91: "To pass, there "
+        LayoutInline {STRONG} at (0,0) size 34x19
+          LayoutText {#text} at (90,0) size 34x19
+            text run at (90,0) width 34: "must"
+        LayoutText {#text} at (123,0) size 276x19
+          text run at (123,0) width 276: " be a green bar stacked on top of a blue bar."
+      LayoutNGListItem {DIV} at (0,36) size 784x202 [color=#00FF00] [bgcolor=#00FF00]
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x101
+          LayoutInline (anonymous) at (0,0) size 0x0
+            LayoutText (anonymous) at (0,0) size 0x0
+        LayoutNGBlockFlow {DIV} at (0,101) size 784x101 [bgcolor=#0000FF]
+          LayoutText {#text} at (0,2) size 21x97
+            text run at (0,2) width 21: " "
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0602-inherit-bdr-pad-b-00-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0602-inherit-bdr-pad-b-00-expected.txt
new file mode 100644
index 0000000..a5e7063
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0602-inherit-bdr-pad-b-00-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x88
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x88
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x56
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 238x19
+          text run at (0,0) width 238: "This sentence should have no border. "
+        LayoutInline {SPAN} at (0,0) size 275x29 [border: (5px solid #00FF00)]
+          LayoutText {#text} at (242,0) size 265x19
+            text run at (242,0) width 265: "This sentence should have a green border."
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,36) size 784x20
+        LayoutInline {SPAN} at (0,0) size 374x35 [bgcolor=#FF0000]
+          LayoutInline {SPAN} at (0,0) size 374x35 [bgcolor=#00FF00]
+            LayoutText {#text} at (0,0) size 374x19
+              text run at (0,0) width 374: "This sentence should be in a green bar, with no red present."
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0803-c5505-mrgn-02-c-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0803-c5505-mrgn-02-c-expected.txt
new file mode 100644
index 0000000..c86fc1da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0803-c5505-mrgn-02-c-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600 clip at (0,0) size 800x585 scrollWidth 802
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x46
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x46
+    LayoutNGBlockFlow {BODY} at (8,-2) size 784x40
+      LayoutNGBlockFlow {P} at (-10,0) size 804x40 [color=#000080]
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutText {#text} at (0,20) size 293x19
+          text run at (0,20) width 293: "  This page should have a horizontal scroll bar."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5519-brdr-r-01-e-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5519-brdr-r-01-e-expected.txt
new file mode 100644
index 0000000..7e95d69
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5519-brdr-r-01-e-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x256
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x256
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x224 [color=#0000FF]
+      LayoutNGBlockFlow {P} at (0,0) size 784x39
+        LayoutText {#text} at (0,15) size 489x19
+          text run at (0,15) width 489: "There should be a solid blue line to the right of every occurance of the word \""
+        LayoutInline {SPAN} at (0,0) size 141x36 [border: none (2px solid #0000FF) none]
+          LayoutText {#text} at (489,2) size 139x36
+            text run at (489,2) width 139: "THERE \x{2799}"
+        LayoutText {#text} at (630,15) size 11x19
+          text run at (630,15) width 11: "\"."
+      LayoutTable {TABLE} at (0,55) size 300x133
+        LayoutTableSection {TBODY} at (0,0) size 300x133
+          LayoutTableRow {TR} at (0,2) size 300x41
+            LayoutNGTableCell {TD} at (2,2) size 296x41 [border: none (2px solid #0000FF) none] [r=0 c=0 rs=1 cs=2]
+              LayoutText {#text} at (154,3) size 139x36
+                text run at (154,3) width 139: "THERE \x{2799}"
+          LayoutTableRow {TR} at (0,45) size 300x86
+            LayoutNGTableCell {TD} at (2,67) size 143x41 [border: none (2px solid #0000FF) none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,25) size 139x36
+                text run at (1,25) width 139: "THERE \x{2799}"
+            LayoutNGTableCell {TD} at (147,45) size 151x86 [border: none (2px solid #0000FF) none] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow (anonymous) at (1,1) size 147x39
+                LayoutText {#text} at (8,2) size 139x36
+                  text run at (8,2) width 139: "THERE \x{2798}"
+              LayoutTable {TABLE} at (1,40) size 147x45
+                LayoutTableSection {TBODY} at (0,0) size 147x45
+                  LayoutTableRow {TR} at (0,2) size 147x41
+                    LayoutNGTableCell {TD} at (2,2) size 143x41 [border: none (2px solid #0000FF) none] [r=0 c=0 rs=1 cs=1]
+                      LayoutText {#text} at (1,3) size 139x36
+                        text run at (1,3) width 139: "THERE \x{2799}"
+      LayoutNGBlockFlow {P} at (0,204) size 784x20
+        LayoutText {#text} at (0,0) size 337x19
+          text run at (0,0) width 337: "There should be 3 short lines and 2 long lines in total."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-00-a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-00-a-expected.txt
new file mode 100644
index 0000000..4b13a861
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-00-a-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x248
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x248
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (20,0) size 764x100 [color=#0000FF] [border: none (10px double #0000FF)]
+        LayoutText {#text} at (10,0) size 354x19
+          text run at (10,0) width 354: "\x{21E6} This paragraph should have two blue lines on its left. "
+        LayoutInline {SPAN} at (0,0) size 745x99 [color=#C0C0C0]
+          LayoutText {#text} at (363,0) size 745x99
+            text run at (363,0) width 392: "dummy text dummy text dummy text dummy text dummy text"
+            text run at (10,20) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (10,40) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (10,60) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (10,80) width 154: "dummy text dummy text"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (20,116) size 764x100 [color=#0000FF] [border: none (1px solid #0000FF)]
+        LayoutText {#text} at (1,0) size 359x19
+          text run at (1,0) width 359: "\x{21E6} This paragraph should have a thin blue line on its left. "
+        LayoutInline {SPAN} at (0,0) size 759x99 [color=#C0C0C0]
+          LayoutText {#text} at (359,0) size 759x99
+            text run at (359,0) width 392: "dummy text dummy text dummy text dummy text dummy text"
+            text run at (1,20) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+            text run at (1,40) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (1,60) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+            text run at (1,80) width 23: "text"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-01-e-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-01-e-expected.txt
new file mode 100644
index 0000000..ab76a43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5521-brdr-l-01-e-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x256
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x256
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x224 [color=#0000FF]
+      LayoutNGBlockFlow {P} at (0,0) size 784x39
+        LayoutText {#text} at (0,15) size 480x19
+          text run at (0,15) width 480: "There should be a solid blue line to the left of every occurance of the word \""
+        LayoutInline {SPAN} at (0,0) size 133x36 [border: none (2px solid #0000FF)]
+          LayoutText {#text} at (482,2) size 131x36
+            text run at (482,2) width 131: "\x{21E6}THERE"
+        LayoutText {#text} at (613,15) size 11x19
+          text run at (613,15) width 11: "\"."
+      LayoutTable {TABLE} at (0,55) size 284x133
+        LayoutTableSection {TBODY} at (0,0) size 284x133
+          LayoutTableRow {TR} at (0,2) size 284x41
+            LayoutNGTableCell {TD} at (2,2) size 280x41 [border: none (2px solid #0000FF)] [r=0 c=0 rs=1 cs=2]
+              LayoutText {#text} at (3,3) size 131x36
+                text run at (3,3) width 131: "\x{21E6}THERE"
+          LayoutTableRow {TR} at (0,45) size 284x86
+            LayoutNGTableCell {TD} at (2,67) size 135x41 [border: none (2px solid #0000FF)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (3,25) size 131x36
+                text run at (3,25) width 131: "\x{21E6}THERE"
+            LayoutNGTableCell {TD} at (139,45) size 143x86 [border: none (2px solid #0000FF)] [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow (anonymous) at (3,1) size 139x39
+                LayoutText {#text} at (0,2) size 131x36
+                  text run at (0,2) width 131: "\x{21E6}THERE"
+              LayoutTable {TABLE} at (3,40) size 139x45
+                LayoutTableSection {TBODY} at (0,0) size 139x45
+                  LayoutTableRow {TR} at (0,2) size 139x41
+                    LayoutNGTableCell {TD} at (2,2) size 135x41 [border: none (2px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
+                      LayoutText {#text} at (3,3) size 131x36
+                        text run at (3,3) width 131: "\x{21E6}THERE"
+      LayoutNGBlockFlow {P} at (0,204) size 784x20
+        LayoutText {#text} at (0,0) size 337x19
+          text run at (0,0) width 337: "There should be 3 short lines and 2 long lines in total."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-01-b-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-01-b-g-expected.txt
new file mode 100644
index 0000000..04fbf86
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-01-b-g-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x204
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x204
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x156
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 264x19
+          text run at (0,0) width 264: "There should be no border around the cat:"
+      LayoutNGBlockFlow {DIV} at (32,52) size 720x104 [color=#FF0000]
+        LayoutInline {A} at (0,0) size 98x99 [color=#0000EE]
+          LayoutImage {IMG} at (0,0) size 98x99
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-02-e-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-02-e-expected.txt
new file mode 100644
index 0000000..8c1e551
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0805-c5522-brdr-02-e-expected.txt
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x84
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x84
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x68 [color=#0000FF]
+      LayoutTable {TABLE} at (0,0) size 708x68
+        LayoutTableSection {TBODY} at (0,0) size 708x68
+          LayoutTableRow {TR} at (0,2) size 708x26
+            LayoutNGTableCell {TD} at (2,2) size 704x26 [border: (2px solid #0000FF)] [r=0 c=0 rs=1 cs=2]
+              LayoutText {#text} at (3,3) size 325x19
+                text run at (3,3) width 325: "There should be a blue border around this sentence."
+          LayoutTableRow {TR} at (0,30) size 708x36
+            LayoutNGTableCell {TD} at (2,35) size 331x26 [border: (2px solid #0000FF)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (3,8) size 325x19
+                text run at (3,8) width 325: "There should be a blue border around this sentence."
+            LayoutNGTableCell {TD} at (335,30) size 371x36 [border: (2px solid #0000FF)] [r=1 c=1 rs=1 cs=1]
+              LayoutTable {TABLE} at (3,3) size 365x30
+                LayoutTableSection {TBODY} at (0,0) size 365x30
+                  LayoutTableRow {TR} at (0,2) size 365x26
+                    LayoutNGTableCell {TD} at (2,2) size 361x26 [border: (2px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
+                      LayoutText {#text} at (3,3) size 106x19
+                        text run at (3,3) width 106: "There should be "
+                      LayoutInline {STRONG} at (0,0) size 113x19
+                        LayoutInline {EM} at (0,0) size 23x19
+                          LayoutText {#text} at (109,3) size 23x19
+                            text run at (109,3) width 23: "two"
+                        LayoutText {#text} at (132,3) size 90x19
+                          text run at (132,3) width 90: " blue borders"
+                      LayoutText {#text} at (222,3) size 136x19
+                        text run at (222,3) width 136: " around this sentence."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t09-c5526c-display-00-e-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t09-c5526c-display-00-e-expected.txt
index f84d1e73..b564bad 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t09-c5526c-display-00-e-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t09-c5526c-display-00-e-expected.txt
@@ -23,12 +23,12 @@
                 LayoutNGBlockFlow {P} at (0,0) size 139.97x22
                   LayoutText {#text} at (0,6) size 28x12
                     text run at (0,6) width 28: "bang "
-                  LayoutNGBlockFlow {INPUT} at (33,3) size 13x13 [color=#000000]
+                  LayoutBlockFlow {INPUT} at (33,3) size 13x13 [color=#000000]
                   LayoutText {#text} at (0,0) size 0x0
                 LayoutNGBlockFlow {P} at (0,22) size 139.97x22
                   LayoutText {#text} at (0,6) size 47x12
                     text run at (0,6) width 47: "whimper "
-                  LayoutNGBlockFlow {INPUT} at (52,3) size 13x13 [color=#000000]
+                  LayoutBlockFlow {INPUT} at (52,3) size 13x13 [color=#000000]
                   LayoutText {#text} at (0,0) size 0x0
               LayoutNGBlockFlow (anonymous) at (10,64) size 139.97x0
                 LayoutInline {FORM} at (0,0) size 0x0
@@ -59,7 +59,7 @@
         LayoutText {#text} at (223,26) size 474x25
           text run at (223,26) width 251: " (except font rasterization and form widgets). All"
           text run at (0,39) width 410: "discrepancies should be traceable to CSS1 implementation shortcomings. Please "
-        LayoutInline {A} at (0,0) size 872x25 [color=#CC0000]
+        LayoutInline {A} at (0,0) size 462x25 [color=#CC0000]
           LayoutText {#text} at (409,39) size 462x25
             text run at (409,39) width 53: "report any"
             text run at (0,52) width 29: "errors"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-00-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-00-d-expected.txt
new file mode 100644
index 0000000..9f6a32ae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-00-d-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x140
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x140
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x114
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 681x19
+          text run at (0,0) width 681: "There should be five numbers, in numerical order, below: on the first line 1, 2 and 3, on the second, 4 and 5."
+      LayoutNGBlockFlow {DIV} at (10,36) size 262x78 [color=#000080] [border: (3px solid #0000FF)]
+        LayoutNGBlockFlow (floating) {P} at (19,19) size 80x20
+          LayoutText {#text} at (0,0) size 8x19
+            text run at (0,0) width 8: "1"
+        LayoutNGBlockFlow (floating) {P} at (99,19) size 80x20
+          LayoutText {#text} at (0,0) size 8x19
+            text run at (0,0) width 8: "2"
+        LayoutNGBlockFlow (floating) {P} at (19,39) size 80x20
+          LayoutText {#text} at (0,0) size 8x19
+            text run at (0,0) width 8: "4"
+        LayoutNGBlockFlow (anonymous) at (19,19) size 224x40
+          LayoutText {#text} at (160,0) size 88x39
+            text run at (160,0) width 8: "3"
+            text run at (80,20) width 88: "5                    "
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-01-d-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-01-d-g-expected.txt
new file mode 100644
index 0000000..8969d12
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-fit-01-d-g-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x272
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x272
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x246
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 765x19
+          text run at (0,0) width 765: "There should be a complete unbroken drawing of a yin-yang (\x{262F}) symbol below, slightly on the left (\x{21E6}) inside a blue box."
+      LayoutNGBlockFlow {DIV} at (10,36) size 260x210 [border: (5px solid #0000FF)]
+        LayoutNGBlockFlow (floating) {P} at (5,5) size 100x100 [color=#000080]
+          LayoutImage {IMG} at (0,0) size 100x100
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (floating) {P} at (105,5) size 100x100 [color=#000080]
+          LayoutImage {IMG} at (0,0) size 100x100
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (floating) {P} at (5,105) size 100x100 [color=#000080]
+          LayoutImage {IMG} at (0,0) size 100x100
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (anonymous) at (5,5) size 250x200
+          LayoutImage {IMG} at (100,100) size 100x100
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-wrap-00-e-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-wrap-00-e-expected.txt
new file mode 100644
index 0000000..7de267a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c414-flt-wrap-00-e-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x209
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x208.63
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x176.63
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 262x19
+          text run at (0,0) width 262: "The word \"fail\" should not appear below."
+      LayoutNGBlockFlow {DIV} at (16,36) size 240x140.63 [color=#FFFFFF] [bgcolor=#FFFFFF]
+        LayoutNGBlockFlow (floating) {P} at (0,0) size 42.52x20.31 [color=#000080]
+          LayoutText {#text} at (0,0) size 43x20
+            text run at (0,0) width 43: "TEST:"
+        LayoutNGBlockFlow (floating) {P} at (0.02,20.31) size 239.98x20.31 [color=#00FFFF] [bgcolor=#008080]
+          LayoutText {#text} at (101,0) size 38x20
+            text run at (101,0) width 38: "PASS"
+        LayoutNGBlockFlow (anonymous) at (0,0) size 240x140.63
+          LayoutText {#text} at (42,0) size 236x140
+            text run at (42,0) width 189: "fail fail fail fail fail fail fail fail"
+            text run at (0,40) width 236: "fail fail fail fail fail fail fail fail fail fail"
+            text run at (0,60) width 236: "fail fail fail fail fail fail fail fail fail fail"
+            text run at (0,80) width 236: "fail fail fail fail fail fail fail fail fail fail"
+            text run at (0,100) width 236: "fail fail fail fail fail fail fail fail fail fail"
+            text run at (0,120) width 44: "fail fail"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltinln-00-c-ag-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltinln-00-c-ag-expected.txt
new file mode 100644
index 0000000..f99af182
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltinln-00-c-ag-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x184
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x184
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x153
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 273x19
+          text run at (0,0) width 273: "There should be two boxes of green below."
+      LayoutNGBlockFlow {DIV} at (15,36) size 96x51 [color=#008000] [bgcolor=#FF0000] [border: (3px solid #000000)]
+        LayoutNGBlockFlow (floating) {SPAN} at (3,3) size 45x30
+          LayoutText {#text} at (0,0) size 30x30
+            text run at (0,0) width 30: "X"
+        LayoutNGBlockFlow (anonymous) at (3,3) size 90x45
+          LayoutText {#text} at (45,0) size 90x45
+            text run at (45,0) width 45: "x x"
+            text run at (45,15) width 30: "xx"
+            text run at (0,30) width 45: "x x"
+      LayoutNGBlockFlow {DIV} at (15,102) size 96x51 [color=#008000] [bgcolor=#FF0000] [border: (3px solid #000000)]
+        LayoutNGBlockFlow (floating) {SPAN} at (3,3) size 45x30 [bgcolor=#008000]
+          LayoutText {#text} at (0,0) size 30x30
+            text run at (0,0) width 30: "X"
+        LayoutNGBlockFlow (anonymous) at (3,3) size 90x45
+          LayoutText {#text} at (45,0) size 90x45
+            text run at (45,0) width 45: "x x"
+            text run at (45,15) width 30: "xx"
+            text run at (0,30) width 45: "x x"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-01-c-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-01-c-g-expected.txt
new file mode 100644
index 0000000..5c6ce8b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-01-c-g-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x54
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x54
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x38
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x38
+        LayoutNGBlockFlow (floating) {P} at (0,0) size 784x23
+          LayoutText {#text} at (0,0) size 381x22
+            text run at (0,0) width 381: "There should be a green block on the next line:"
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x38
+          LayoutImage {IMG} at (0,23) size 15x15 [color=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt
new file mode 100644
index 0000000..c0bbd09
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x56
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x56
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x17
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x17
+        LayoutNGBlockFlow (floating) {P} at (0,0) size 392x48
+          LayoutText {#text} at (0,0) size 352x47
+            text run at (0,0) width 352: "There should be a green square to the right,"
+            text run at (0,25) width 311: "roughly in the middle, horizontally. \x{21E8}"
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x17
+          LayoutImage {IMG} at (392,0) size 15x15 [color=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt
new file mode 100644
index 0000000..b0b130f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x48
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x48
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x20
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+        LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+          LayoutNGBlockFlow (floating) {P} at (392,0) size 392x40
+            LayoutImage {IMG} at (0,0) size 15x15 [color=#FF0000]
+            LayoutText {#text} at (15,0) size 359x39
+              text run at (15,0) width 344: " \x{21E6} There should be a green square at the top left of the"
+              text run at (0,20) width 55: "window."
+          LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+            LayoutImage {IMG} at (0,0) size 15x15 [color=#FF0000]
+            LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-02-d-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-02-d-g-expected.txt
new file mode 100644
index 0000000..caf3e52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-02-d-g-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x220
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x220
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x132
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 595x19
+          text run at (0,0) width 595: "In the following test, the teal squares must be just inside the top and sides of the blue rectangle."
+      LayoutNGBlockFlow {DIV} at (0,36) size 784x96
+        LayoutNGBlockFlow {DIV} at (16,0) size 752x96 [color=#0000FF] [bgcolor=#000080] [border: (8px solid #0000FF) none (8px solid #0000FF)]
+          LayoutImage (floating) {IMG} at (8,8) size 160x160 [color=#FFFF00] [bgcolor=#FF0000]
+          LayoutImage (floating) {IMG} at (584,8) size 160x160 [color=#FFFF00] [bgcolor=#FF0000]
+          LayoutNGBlockFlow (anonymous) at (8,8) size 736x80
+            LayoutText {#text} at (160,0) size 392x79
+              text run at (160,0) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
+              text run at (160,20) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
+              text run at (160,40) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
+              text run at (160,60) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-03-b-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-03-b-g-expected.txt
new file mode 100644
index 0000000..0c20a11d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c414-flt-03-b-g-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240.19
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x132.19
+      LayoutNGBlockFlow {P} at (0,0) size 784x40.19 [color=#000080]
+        LayoutText {#text} at (0,0) size 396x20
+          text run at (0,0) width 396: "In the following test, the purple square should be on the left (\x{21E6}"
+        LayoutImage {IMG} at (396,0) size 19.19x19.19
+        LayoutText {#text} at (415,0) size 216x20
+          text run at (415,0) width 216: "), and the teal square on the right ("
+        LayoutImage {IMG} at (630.19,0) size 19.19x19.19
+        LayoutText {#text} at (649,0) size 739x40
+          text run at (649,0) width 90: "\x{21E8}) of the blue"
+          text run at (0,20) width 61: "rectangle."
+      LayoutNGBlockFlow {DIV} at (0,56.19) size 784x76
+        LayoutNGBlockFlow {DIV} at (16,0) size 752x76 [color=#0000FF] [bgcolor=#000080]
+          LayoutImage (floating) {IMG} at (8,8) size 160x160
+          LayoutImage (floating) {IMG} at (584,8) size 160x160
+          LayoutNGBlockFlow (anonymous) at (8,8) size 736x60
+            LayoutText {#text} at (160,0) size 392x59
+              text run at (160,0) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
+              text run at (160,20) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
+              text run at (160,40) width 392: "Blue rectangle. Blue rectangle. Blue rectangle. Blue rectangle."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-l-00-b-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-l-00-b-g-expected.txt
new file mode 100644
index 0000000..7c84f7a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-l-00-b-g-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x312
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x312
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x280
+      LayoutNGBlockFlow {P} at (0,0) size 784x280 [color=#000080]
+        LayoutImage (floating) {IMG} at (0,0) size 50x50
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x280
+          LayoutText {#text} at (50,0) size 325x19
+            text run at (50,0) width 325: "\x{21E6} This text should flow around the box on the left. "
+          LayoutInline {SPAN} at (0,0) size 766x279 [color=#C0C0C0]
+            LayoutText {#text} at (374,0) size 766x279
+              text run at (374,0) width 392: "dummy text dummy text dummy text dummy text dummy text"
+              text run at (50,20) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (50,40) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,60) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,80) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,100) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,120) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,140) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,160) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,180) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,200) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,220) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,240) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,260) width 549: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-r-00-b-g-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-r-00-b-g-expected.txt
new file mode 100644
index 0000000..a479700
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t090501-c5525-flt-r-00-b-g-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x312
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x312
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x280
+      LayoutNGBlockFlow {P} at (0,0) size 784x280 [color=#000080]
+        LayoutImage (floating) {IMG} at (734,0) size 50x50
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x280
+          LayoutText {#text} at (0,0) size 334x19
+            text run at (0,0) width 334: "This text should flow around the box on the right. \x{21E8} "
+          LayoutInline {SPAN} at (0,0) size 759x279 [color=#C0C0C0]
+            LayoutText {#text} at (334,0) size 759x279
+              text run at (334,0) width 391: "dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,20) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,40) width 707: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,60) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,80) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,100) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,120) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,140) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,160) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,180) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,200) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,220) width 759: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy"
+              text run at (0,240) width 734: "text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+              text run at (0,260) width 549: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t100801-c544-valgn-02-d-agi-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t100801-c544-valgn-02-d-agi-expected.txt
new file mode 100644
index 0000000..c14c4e4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t100801-c544-valgn-02-d-agi-expected.txt
@@ -0,0 +1,80 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x359
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x359
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x328
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 727x39
+          text run at (0,0) width 727: "Change your window size. However the lines wrap, the blue rectanglues should always have their tops on the same"
+          text run at (0,20) width 287: "alignment as other blue rectangles on the line."
+      LayoutNGBlockFlow {P} at (15,56) size 754x272 [color=#0000FF] [bgcolor=#FFFFFF] [border: (1px solid #C0C0C0)]
+        LayoutText {#text} at (8,25) size 61x16
+          text run at (8,25) width 61: "xxx "
+        LayoutImage {IMG} at (68.50,25.50) size 30x30
+        LayoutText {#text} at (98,25) size 16x16
+          text run at (98,25) width 16: " "
+        LayoutInline {SPAN} at (0,0) size 115x39 [color=#C0C0C0]
+          LayoutText {#text} at (113,7) size 115x39
+            text run at (113,7) width 115: "xxx"
+        LayoutText {#text} at (227,25) size 16x16
+          text run at (227,25) width 16: " "
+        LayoutImage {IMG} at (242.50,25.50) size 50x50
+        LayoutText {#text} at (292,25) size 16x16
+          text run at (292,25) width 16: " "
+        LayoutInline {BIG} at (0,0) size 61x21 [color=#C0C0C0]
+          LayoutText {#text} at (307,21) size 61x21
+            text run at (307,21) width 61: "xxx"
+        LayoutText {#text} at (367,25) size 16x16
+          text run at (367,25) width 16: " "
+        LayoutImage {IMG} at (382.50,25.50) size 10x10
+        LayoutText {#text} at (392,25) size 16x16
+          text run at (392,25) width 16: " "
+        LayoutInline {SMALL} at (0,0) size 31x11 [color=#C0C0C0]
+          LayoutText {#text} at (407,29) size 31x11
+            text run at (407,29) width 31: "xxx"
+        LayoutText {#text} at (437,25) size 16x16
+          text run at (437,25) width 16: " "
+        LayoutImage {IMG} at (452.50,25.50) size 20x20
+        LayoutText {#text} at (472,25) size 76x16
+          text run at (472,25) width 76: " xxx "
+        LayoutImage {IMG} at (547.50,25.50) size 65x65
+        LayoutText {#text} at (612,25) size 16x16
+          text run at (612,25) width 16: " "
+        LayoutInline {SPAN} at (0,0) size 91x31 [color=#C0C0C0]
+          LayoutText {#text} at (627,13) size 91x31
+            text run at (627,13) width 91: "xxx"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutImage {IMG} at (8.50,123.50) size 35x35
+        LayoutText {#text} at (43,123) size 76x16
+          text run at (43,123) width 76: " xxx "
+        LayoutImage {IMG} at (118.50,123.50) size 30x30
+        LayoutText {#text} at (148,123) size 16x16
+          text run at (148,123) width 16: " "
+        LayoutInline {SPAN} at (0,0) size 353x57 [color=#C0C0C0]
+          LayoutText {#text} at (163,117) size 93x24
+            text run at (163,117) width 93: "xxx "
+          LayoutInline {SPAN} at (0,0) size 169x57
+            LayoutText {#text} at (255,90) size 169x57
+              text run at (255,90) width 169: "xxx"
+          LayoutText {#text} at (423,117) size 93x24
+            text run at (423,117) width 93: " xxx"
+        LayoutText {#text} at (515,123) size 16x16
+          text run at (515,123) width 16: " "
+        LayoutImage {IMG} at (530.50,123.50) size 50x50
+        LayoutText {#text} at (580,123) size 16x16
+          text run at (580,123) width 16: " "
+        LayoutInline {SMALL} at (0,0) size 31x11 [color=#C0C0C0]
+          LayoutText {#text} at (595,127) size 31x11
+            text run at (595,127) width 31: "xxx"
+        LayoutText {#text} at (625,123) size 16x16
+          text run at (625,123) width 16: " "
+        LayoutImage {IMG} at (640.50,123.50) size 15x15
+        LayoutText {#text} at (655,123) size 16x16
+          text run at (655,123) width 16: " "
+        LayoutInline {BIG} at (0,0) size 61x21 [color=#C0C0C0]
+          LayoutText {#text} at (670,119) size 61x21
+            text run at (670,119) width 61: "xxx"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutImage {IMG} at (8.50,173.50) size 90x90
+        LayoutText {#text} at (98,173) size 61x16
+          text run at (98,173) width 61: " xxx"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t120401-scope-04-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t120401-scope-04-d-expected.txt
new file mode 100644
index 0000000..1b05088
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t120401-scope-04-d-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x100
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x100
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x76
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 245x19
+          text run at (0,0) width 245: "The next two lines should be the same:"
+      LayoutNGBlockFlow {DIV} at (0,36) size 784x20
+        LayoutInline {SPAN} at (0,0) size 0x0
+        LayoutInline {SPAN} at (0,0) size 12x19
+          LayoutInline {<pseudo:before>} at (0,0) size 12x19
+            LayoutCounter (anonymous) at (0,0) size 8x19
+              text run at (0,0) width 8: "1"
+            LayoutTextFragment (anonymous) at (8,0) size 4x19
+              text run at (8,0) width 4: " "
+        LayoutInline {SPAN} at (0,0) size 0x0
+        LayoutInline {SPAN} at (0,0) size 12x19
+          LayoutInline {<pseudo:before>} at (0,0) size 12x19
+            LayoutCounter (anonymous) at (12,0) size 8x19
+              text run at (12,0) width 8: "1"
+            LayoutTextFragment (anonymous) at (20,0) size 4x19
+              text run at (20,0) width 4: " "
+        LayoutInline {SPAN} at (0,0) size 55x19
+          LayoutInline {<pseudo:before>} at (0,0) size 11x19
+            LayoutTextFragment (anonymous) at (24,0) size 11x19
+              text run at (24,0) width 11: "R"
+          LayoutInline {SPAN} at (0,0) size 24x19
+            LayoutInline {<pseudo:before>} at (0,0) size 24x19
+              LayoutCounter (anonymous) at (35,0) size 20x19
+                text run at (35,0) width 20: "1.1"
+              LayoutTextFragment (anonymous) at (55,0) size 4x19
+                text run at (55,0) width 4: " "
+          LayoutInline {SPAN} at (0,0) size 0x0
+          LayoutInline {SPAN} at (0,0) size 20x19
+            LayoutInline {<pseudo:before>} at (0,0) size 20x19
+              LayoutCounter (anonymous) at (59,0) size 20x19
+                text run at (59,0) width 20: "1.1"
+              LayoutTextFragment (anonymous) at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,56) size 784x20
+        LayoutText {#text} at (0,0) size 79x19
+          text run at (0,0) width 79: "1 1 R1.1 1.1"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c561-list-displ-00-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c561-list-displ-00-b-expected.txt
new file mode 100644
index 0000000..8d9bb5ad
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c561-list-displ-00-b-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x220
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x220
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x196
+      LayoutNGBlockFlow {P} at (0,0) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 756x19
+          text run at (0,0) width 756: "There should be eight numbered lines below, all identical except for the numbering, which should match the description."
+      LayoutNGListItem {DIV} at (0,36) size 784x20 [color=#000080]
+        LayoutInline (anonymous) at (0,0) size 16x19
+          LayoutText (anonymous) at (0,0) size 16x19
+            text run at (0,0) width 16: "1. "
+        LayoutText {#text} at (15,0) size 152x19
+          text run at (15,0) width 152: "This should be line one."
+      LayoutNGBlockFlow {DIV} at (0,56) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 168x19
+          text run at (0,0) width 168: "2. This should be line two."
+      LayoutNGBlockFlow (anonymous) at (0,76) size 784x20
+        LayoutInline {DIV} at (0,0) size 94x19 [color=#000080]
+          LayoutText {#text} at (0,0) size 94x19
+            text run at (0,0) width 94: "3. This should "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutInline {DIV} at (0,0) size 82x19 [color=#000080]
+          LayoutText {#text} at (93,0) size 82x19
+            text run at (93,0) width 82: "be line three."
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,96) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 169x19
+          text run at (0,0) width 169: "4. This should be line four."
+      LayoutNGBlockFlow {DIV} at (0,116) size 784x20 [color=#000080]
+        LayoutText {#text} at (0,0) size 168x19
+          text run at (0,0) width 168: "5. This should be line five."
+      LayoutNGBlockFlow {DIV} at (0,136) size 784x60 [color=#000080]
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 162x19
+            text run at (0,0) width 162: "6. This should be line six."
+        LayoutNGBlockFlow {A} at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 180x19
+            text run at (0,0) width 180: "7. This should be line seven."
+        LayoutNGBlockFlow (anonymous) at (0,40) size 784x20
+          LayoutText {#text} at (0,0) size 175x19
+            text run at (0,0) width 175: "8. This should be line eight."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c563-list-type-01-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c563-list-type-01-b-expected.txt
new file mode 100644
index 0000000..20001f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c563-list-type-01-b-expected.txt
@@ -0,0 +1,103 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x432
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x432
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x400 [color=#000080]
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 388x19
+          text run at (0,0) width 388: "The two columns should look the same, except for alignment."
+      LayoutNGBlockFlow {OL} at (0,36) size 784x60
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-12,0) size 12x20
+            LayoutText (anonymous) at (0,0) size 12x19
+              text run at (0,0) width 12: "i. "
+          LayoutText {#text} at (0,0) size 8x19
+            text run at (0,0) width 8: "i."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "ii. "
+          LayoutText {#text} at (0,0) size 12x19
+            text run at (0,0) width 12: "ii."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-20,0) size 20x20
+            LayoutText (anonymous) at (0,0) size 20x19
+              text run at (0,0) width 20: "iii. "
+          LayoutText {#text} at (0,0) size 16x19
+            text run at (0,0) width 16: "iii."
+      LayoutNGBlockFlow {OL} at (0,112) size 784x60
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-13,0) size 13x20
+            LayoutText (anonymous) at (0,0) size 13x19
+              text run at (0,0) width 13: "I. "
+          LayoutText {#text} at (0,0) size 9x19
+            text run at (0,0) width 9: "I."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 18x20
+            LayoutText (anonymous) at (0,0) size 18x19
+              text run at (0,0) width 18: "II. "
+          LayoutText {#text} at (0,0) size 14x19
+            text run at (0,0) width 14: "II."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-23,0) size 23x20
+            LayoutText (anonymous) at (0,0) size 23x19
+              text run at (0,0) width 23: "III. "
+          LayoutText {#text} at (0,0) size 19x19
+            text run at (0,0) width 19: "III."
+      LayoutNGBlockFlow {OL} at (0,188) size 784x60
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-15,0) size 15x20
+            LayoutText (anonymous) at (0,0) size 15x19
+              text run at (0,0) width 15: "a. "
+          LayoutText {#text} at (0,0) size 11x19
+            text run at (0,0) width 11: "a."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "b. "
+          LayoutText {#text} at (0,0) size 12x19
+            text run at (0,0) width 12: "b."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-15,0) size 15x20
+            LayoutText (anonymous) at (0,0) size 15x19
+              text run at (0,0) width 15: "c. "
+          LayoutText {#text} at (0,0) size 11x19
+            text run at (0,0) width 11: "c."
+      LayoutNGBlockFlow {OL} at (0,264) size 784x60
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-20,0) size 20x20
+            LayoutText (anonymous) at (0,0) size 20x19
+              text run at (0,0) width 20: "A. "
+          LayoutText {#text} at (0,0) size 16x19
+            text run at (0,0) width 16: "A."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-19,0) size 19x20
+            LayoutText (anonymous) at (0,0) size 19x19
+              text run at (0,0) width 19: "B. "
+          LayoutText {#text} at (0,0) size 15x19
+            text run at (0,0) width 15: "B."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-19,0) size 19x20
+            LayoutText (anonymous) at (0,0) size 19x19
+              text run at (0,0) width 19: "C. "
+          LayoutText {#text} at (0,0) size 15x19
+            text run at (0,0) width 15: "C."
+      LayoutNGBlockFlow {OL} at (0,340) size 784x60
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-20,0) size 20x20
+            LayoutText (anonymous) at (0,0) size 20x19
+              text run at (0,0) width 20: "A. "
+          LayoutText {#text} at (0,0) size 16x19
+            text run at (0,0) width 16: "A."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-19,0) size 19x20
+            LayoutText (anonymous) at (0,0) size 19x19
+              text run at (0,0) width 19: "B. "
+          LayoutText {#text} at (0,0) size 15x19
+            text run at (0,0) width 15: "B."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "3. "
+          LayoutText {#text} at (0,0) size 12x19
+            text run at (0,0) width 12: "3."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c565-list-pos-00-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c565-list-pos-00-b-expected.txt
new file mode 100644
index 0000000..15f05db5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c565-list-pos-00-b-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x102
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x101.59
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x77.59
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 363x19
+          text run at (0,0) width 363: "The following two boxes should be identical, to the pixel."
+      LayoutNGBlockFlow {OL} at (80,36) size 160x20 [color=#FFFFFF] [bgcolor=#000080]
+        LayoutNGListItem {LI} at (0,0) size 160x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "1. "
+          LayoutInline {SPAN} at (0,0) size 12x19 [color=#000080]
+            LayoutText {#text} at (0,0) size 12x19
+              text run at (0,0) width 12: "1."
+          LayoutText {#text} at (12,0) size 30x19
+            text run at (12,0) width 30: " Test"
+      LayoutNGBlockFlow {OL} at (80,57.59) size 160x20 [color=#000080] [bgcolor=#000080]
+        LayoutNGListItem {LI} at (0,0) size 160x20
+          LayoutInline (anonymous) at (0,0) size 16x19
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "1. "
+          LayoutInline {SPAN} at (0,0) size 27x19 [color=#FFFFFF]
+            LayoutText {#text} at (15,0) size 27x19
+              text run at (15,0) width 27: "Test"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c566-list-stl-00-e-ag-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c566-list-stl-00-e-ag-expected.txt
new file mode 100644
index 0000000..ac97836
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1205-c566-list-stl-00-e-ag-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x118
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x118
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x87
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 192x19
+          text run at (0,0) width 192: "There should be no red below."
+      LayoutNGBlockFlow {UL} at (75,36) size 96x51 [color=#00FF00] [bgcolor=#FF0000] [border: (3px solid #000000)]
+        LayoutNGListItem {LI} at (3,3) size 90x45
+          LayoutInline (anonymous) at (0,0) size 45x15
+            LayoutText (anonymous) at (0,0) size 45x15
+              text run at (0,0) width 45: "A. "
+          LayoutText {#text} at (45,0) size 90x45
+            text run at (45,0) width 45: "x x"
+            text run at (0,15) width 75: "xx xx"
+            text run at (0,30) width 45: "x x"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-01-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-01-b-expected.txt
new file mode 100644
index 0000000..3f2281cb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-01-b-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x225
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x225
+    LayoutNGBlockFlow {BODY} at (8,18) size 784x189 [color=#000080]
+      LayoutNGBlockFlow {P} at (0,0) size 784x189
+        LayoutText {#text} at (0,3) size 565x20
+          text run at (0,3) width 565: "This text should be 18px serif. There should be a 9px gap between each line. "
+        LayoutInline {SPAN} at (0,0) size 744x182 [color=#C0C0C0]
+          LayoutText {#text} at (564,3) size 744x182
+            text run at (564,3) width 180: "dummy text dummy text"
+            text run at (0,30) width 731: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,57) width 731: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,84) width 731: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,111) width 731: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,138) width 731: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,165) width 455: "dummy text dummy text dummy text dummy text dummy text"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-02-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-02-b-expected.txt
new file mode 100644
index 0000000..12fe2f1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-02-b-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x225
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x225
+    LayoutNGBlockFlow {BODY} at (8,18) size 784x189 [color=#000080]
+      LayoutNGBlockFlow {P} at (0,0) size 784x189
+        LayoutText {#text} at (0,3) size 662x21
+          text run at (0,3) width 662: "This text should be 18px sans-serif. There should be a 9px gap between each line. "
+        LayoutInline {SPAN} at (0,0) size 779x183 [color=#C0C0C0]
+          LayoutText {#text} at (661,3) size 779x183
+            text run at (661,3) width 94: "dummy text"
+            text run at (0,30) width 779: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,57) width 779: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,84) width 779: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,111) width 779: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,138) width 779: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,165) width 583: "dummy text dummy text dummy text dummy text dummy text dummy text"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-09-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-09-b-expected.txt
new file mode 100644
index 0000000..1baf31d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1508-c527-font-09-b-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x111
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x111.19
+    LayoutNGBlockFlow {BODY} at (8,9.59) size 784x92 [color=#000080]
+      LayoutNGBlockFlow {P} at (0,0) size 784x92
+        LayoutText {#text} at (0,5) size 472x13
+          text run at (0,5) width 472: "This test should be about 10px, sans-serif, and light. There should be about 15px between each line. "
+        LayoutInline {SPAN} at (0,0) size 781x82 [color=#C0C0C0]
+          LayoutText {#text} at (471,5) size 781x82
+            text run at (471,5) width 278: "dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,28) width 781: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,51) width 781: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+            text run at (0,74) width 781: "dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-00-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-00-d-expected.txt
new file mode 100644
index 0000000..f290c7f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-00-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-01-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-01-d-expected.txt
new file mode 100644
index 0000000..afadfac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-01-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 155x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 150x165
+          LayoutTableRow {TR} at (0,0) size 150x55
+            LayoutNGTableCell {TD} at (0,14) size 50x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,15) size 50x25 [border: (3px double #00FF00) none (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (100,14) size 50x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+          LayoutTableRow {TR} at (0,55) size 150x55
+            LayoutNGTableCell {TD} at (0,69) size 50x27 [border: (3px double #00FF00) none (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,71) size 50x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (100,69) size 50x27 [border: (3px double #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 43x19
+                text run at (1,18) width 43: "double"
+          LayoutTableRow {TR} at (0,110) size 150x55
+            LayoutNGTableCell {TD} at (0,124) size 50x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,125) size 50x24 [border: none (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 43x19
+                text run at (4,16) width 43: "double"
+            LayoutNGTableCell {TD} at (100,124) size 50x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-02-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-02-d-expected.txt
new file mode 100644
index 0000000..0e59aea0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-02-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 124x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 119x165
+          LayoutTableRow {TR} at (0,0) size 119x55
+            LayoutNGTableCell {TD} at (0,14) size 37x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,15) size 45x25 [border: (3px solid #00FF00) none (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (82,14) size 37x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+          LayoutTableRow {TR} at (0,55) size 119x55
+            LayoutNGTableCell {TD} at (0,69) size 37x27 [border: (3px solid #00FF00) none (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,71) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (82,69) size 37x27 [border: (3px solid #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 30x19
+                text run at (1,18) width 30: "solid"
+          LayoutTableRow {TR} at (0,110) size 119x55
+            LayoutNGTableCell {TD} at (0,124) size 37x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,125) size 45x24 [border: none (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 30x19
+                text run at (4,16) width 30: "solid"
+            LayoutNGTableCell {TD} at (82,124) size 37x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-03-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-03-d-expected.txt
new file mode 100644
index 0000000..24d6c649
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-03-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x165
+          LayoutTableRow {TR} at (0,0) size 153x55
+            LayoutNGTableCell {TD} at (0,14) size 51x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,15) size 51x25 [border: (3px dashed #00FF00) none (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (102,14) size 51x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+          LayoutTableRow {TR} at (0,55) size 153x55
+            LayoutNGTableCell {TD} at (0,69) size 51x27 [border: (3px dashed #00FF00) none (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,71) size 51x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (102,69) size 51x27 [border: (3px dashed #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 44x19
+                text run at (1,18) width 44: "dashed"
+          LayoutTableRow {TR} at (0,110) size 153x55
+            LayoutNGTableCell {TD} at (0,124) size 51x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,125) size 51x24 [border: none (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 44x19
+                text run at (4,16) width 44: "dashed"
+            LayoutNGTableCell {TD} at (102,124) size 51x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-04-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-04-d-expected.txt
new file mode 100644
index 0000000..14d607d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-04-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 143x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 138x165
+          LayoutTableRow {TR} at (0,0) size 138x55
+            LayoutNGTableCell {TD} at (0,14) size 46x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,15) size 46x25 [border: (3px dotted #00FF00) none (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (92,14) size 46x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+          LayoutTableRow {TR} at (0,55) size 138x55
+            LayoutNGTableCell {TD} at (0,69) size 46x27 [border: (3px dotted #00FF00) none (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,71) size 46x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (92,69) size 46x27 [border: (3px dotted #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 39x19
+                text run at (1,18) width 39: "dotted"
+          LayoutTableRow {TR} at (0,110) size 138x55
+            LayoutNGTableCell {TD} at (0,124) size 46x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,125) size 46x24 [border: none (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 39x19
+                text run at (4,16) width 39: "dotted"
+            LayoutNGTableCell {TD} at (92,124) size 46x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-05-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-05-d-expected.txt
new file mode 100644
index 0000000..86161d5c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-05-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 128x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 123x165
+          LayoutTableRow {TR} at (0,0) size 123x55
+            LayoutNGTableCell {TD} at (0,14) size 39x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,15) size 45x25 [border: (3px ridge #00FF00) none (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (84,14) size 39x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,55) size 123x55
+            LayoutNGTableCell {TD} at (0,69) size 39x27 [border: (3px ridge #00FF00) none (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,71) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (84,69) size 39x27 [border: (3px ridge #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 32x19
+                text run at (1,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,110) size 123x55
+            LayoutNGTableCell {TD} at (0,124) size 39x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,125) size 45x24 [border: none (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 32x19
+                text run at (4,16) width 32: "ridge"
+            LayoutNGTableCell {TD} at (84,124) size 39x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-06-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-06-d-expected.txt
new file mode 100644
index 0000000..48b8da5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-06-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 138x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 133x165
+          LayoutTableRow {TR} at (0,0) size 133x55
+            LayoutNGTableCell {TD} at (0,14) size 44x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,15) size 45x25 [border: (3px outset #00FF00) none (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (89,14) size 44x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,55) size 133x55
+            LayoutNGTableCell {TD} at (0,69) size 44x27 [border: (3px outset #00FF00) none (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,71) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (89,69) size 44x27 [border: (3px outset #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 37x19
+                text run at (1,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,110) size 133x55
+            LayoutNGTableCell {TD} at (0,124) size 44x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,125) size 45x24 [border: none (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 37x19
+                text run at (4,16) width 37: "outset"
+            LayoutNGTableCell {TD} at (89,124) size 44x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-07-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-07-d-expected.txt
new file mode 100644
index 0000000..d198b0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-07-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x165
+          LayoutTableRow {TR} at (0,0) size 153x55
+            LayoutNGTableCell {TD} at (0,14) size 51x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,15) size 51x25 [border: (3px groove #00FF00) none (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (102,14) size 51x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+          LayoutTableRow {TR} at (0,55) size 153x55
+            LayoutNGTableCell {TD} at (0,69) size 51x27 [border: (3px groove #00FF00) none (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,71) size 51x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (102,69) size 51x27 [border: (3px groove #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 44x19
+                text run at (1,18) width 44: "groove"
+          LayoutTableRow {TR} at (0,110) size 153x55
+            LayoutNGTableCell {TD} at (0,124) size 51x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,125) size 51x24 [border: none (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 44x19
+                text run at (4,16) width 44: "groove"
+            LayoutNGTableCell {TD} at (102,124) size 51x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-08-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-08-d-expected.txt
new file mode 100644
index 0000000..62d65234
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-08-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 122x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 117x165
+          LayoutTableRow {TR} at (0,0) size 117x55
+            LayoutNGTableCell {TD} at (0,14) size 36x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,15) size 45x25 [border: (3px inset #00FF00) none (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (81,14) size 36x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+          LayoutTableRow {TR} at (0,55) size 117x55
+            LayoutNGTableCell {TD} at (0,69) size 36x27 [border: (3px inset #00FF00) none (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,71) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 43x19
+                text run at (1,17) width 43: "hidden"
+            LayoutNGTableCell {TD} at (81,69) size 36x27 [border: (3px inset #00FF00) none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,18) size 29x19
+                text run at (1,18) width 29: "inset"
+          LayoutTableRow {TR} at (0,110) size 117x55
+            LayoutNGTableCell {TD} at (0,124) size 36x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,125) size 45x24 [border: none (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,16) size 29x19
+                text run at (4,16) width 29: "inset"
+            LayoutNGTableCell {TD} at (81,124) size 36x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-09-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-09-d-expected.txt
new file mode 100644
index 0000000..2b10bef7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-09-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 111x150
+        LayoutTableSection {TBODY} at (0,0) size 111x150
+          LayoutTableRow {TR} at (0,0) size 111x50
+            LayoutNGTableCell {TD} at (0,14) size 33x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (78,14) size 33x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+          LayoutTableRow {TR} at (0,50) size 111x50
+            LayoutNGTableCell {TD} at (0,64) size 33x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (78,64) size 33x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+          LayoutTableRow {TR} at (0,100) size 111x50
+            LayoutNGTableCell {TD} at (0,114) size 33x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (78,114) size 33x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-10-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-10-d-expected.txt
new file mode 100644
index 0000000..79f3bdd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-10-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "double"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-11-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-11-d-expected.txt
new file mode 100644
index 0000000..12d0f6e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-11-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 165x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 160x175
+          LayoutTableRow {TR} at (0,0) size 160x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 55x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (108,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 160x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (108,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 160x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 55x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (108,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-12-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-12-d-expected.txt
new file mode 100644
index 0000000..ece73e2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-12-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 139x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 134x175
+          LayoutTableRow {TR} at (0,0) size 134x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 55x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (95,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 134x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (95,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 134x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 55x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (95,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-13-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-13-d-expected.txt
new file mode 100644
index 0000000..f35dac1a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-13-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 167x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 162x175
+          LayoutTableRow {TR} at (0,0) size 162x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 55x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (109,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 162x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (109,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 162x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 55x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (109,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-14-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-14-d-expected.txt
new file mode 100644
index 0000000..f29bc9a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-14-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 157x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 152x175
+          LayoutTableRow {TR} at (0,0) size 152x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 55x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (104,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 152x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (104,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 152x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 55x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (104,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-15-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-15-d-expected.txt
new file mode 100644
index 0000000..a35ca3ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-15-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 143x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 138x175
+          LayoutTableRow {TR} at (0,0) size 138x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 55x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (97,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 138x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (97,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 138x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 55x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (97,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-16-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-16-d-expected.txt
new file mode 100644
index 0000000..116dde25
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-16-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 153x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 148x175
+          LayoutTableRow {TR} at (0,0) size 148x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 55x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (102,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 148x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (102,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 148x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 55x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (102,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-17-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-17-d-expected.txt
new file mode 100644
index 0000000..bc90e8d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-17-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 167x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 162x175
+          LayoutTableRow {TR} at (0,0) size 162x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 55x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (109,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 162x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (109,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 162x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 55x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (109,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-18-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-18-d-expected.txt
new file mode 100644
index 0000000..93c38e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-18-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 137x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 132x175
+          LayoutTableRow {TR} at (0,0) size 132x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 55x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (94,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 132x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (94,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 132x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 55x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (94,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-19-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-19-d-expected.txt
new file mode 100644
index 0000000..4c725fa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-19-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 131x170
+        LayoutTableSection {TBODY} at (0,0) size 131x170
+          LayoutTableRow {TR} at (0,0) size 131x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 55x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (93,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 131x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 55x32 [border: (5px double #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+            LayoutNGTableCell {TD} at (93,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 131x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 55x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (93,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-20-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-20-d-expected.txt
new file mode 100644
index 0000000..c0d71d7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-20-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 30x19
+                text run at (1,15) width 30: "solid"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-21-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-21-d-expected.txt
new file mode 100644
index 0000000..f3db833
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-21-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 160x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 155x175
+          LayoutTableRow {TR} at (0,0) size 155x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 50x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (103,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 155x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 50x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (103,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 155x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 50x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (103,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-22-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-22-d-expected.txt
new file mode 100644
index 0000000..129c301
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-22-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 126x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 121x175
+          LayoutTableRow {TR} at (0,0) size 121x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 42x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (82,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 121x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 42x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (82,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 121x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 42x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (82,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-23-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-23-d-expected.txt
new file mode 100644
index 0000000..e8de4f3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-23-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-24-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-24-d-expected.txt
new file mode 100644
index 0000000..5091b82f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-24-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 148x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 143x175
+          LayoutTableRow {TR} at (0,0) size 143x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 46x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 143x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 46x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (95,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 143x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 46x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-25-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-25-d-expected.txt
new file mode 100644
index 0000000..ef9bc93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-25-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 130x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 125x175
+          LayoutTableRow {TR} at (0,0) size 125x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 42x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (84,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 125x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 42x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (84,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 125x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 42x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (84,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-26-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-26-d-expected.txt
new file mode 100644
index 0000000..3498e08
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-26-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 142x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 137x175
+          LayoutTableRow {TR} at (0,0) size 137x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 44x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 137x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 44x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (91,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 137x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 44x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-27-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-27-d-expected.txt
new file mode 100644
index 0000000..b8d42e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-27-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-28-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-28-d-expected.txt
new file mode 100644
index 0000000..469a447
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-28-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 124x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 119x175
+          LayoutTableRow {TR} at (0,0) size 119x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 42x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (81,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 119x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 42x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (81,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 119x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 42x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (81,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-29-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-29-d-expected.txt
new file mode 100644
index 0000000..01c2739
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-29-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 118x170
+        LayoutTableSection {TBODY} at (0,0) size 118x170
+          LayoutTableRow {TR} at (0,0) size 118x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 42x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (80,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 118x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 42x32 [border: (5px solid #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (80,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 118x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 42x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (80,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-30-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-30-d-expected.txt
new file mode 100644
index 0000000..baca3f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-30-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 136x150
+        LayoutTableSection {TBODY} at (0,0) size 136x150
+          LayoutTableRow {TR} at (0,0) size 136x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 46x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (91,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 136x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 46x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 44x19
+                text run at (1,15) width 44: "dashed"
+            LayoutNGTableCell {TD} at (91,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 136x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 46x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (91,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-31-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-31-d-expected.txt
new file mode 100644
index 0000000..7bfc6cff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-31-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 166x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 161x175
+          LayoutTableRow {TR} at (0,0) size 161x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 56x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (109,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 161x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (109,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 161x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 56x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (109,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-32-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-32-d-expected.txt
new file mode 100644
index 0000000..4dc92087
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-32-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 140x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 135x175
+          LayoutTableRow {TR} at (0,0) size 135x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 56x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (96,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 135x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (96,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 135x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 56x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (96,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-33-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-33-d-expected.txt
new file mode 100644
index 0000000..4073d77
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-33-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 168x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 163x175
+          LayoutTableRow {TR} at (0,0) size 163x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 56x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 163x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 163x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 56x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-34-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-34-d-expected.txt
new file mode 100644
index 0000000..45ca9679
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-34-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x175
+          LayoutTableRow {TR} at (0,0) size 153x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 56x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 153x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 153x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 56x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-35-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-35-d-expected.txt
new file mode 100644
index 0000000..e7819cc2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-35-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 144x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 139x175
+          LayoutTableRow {TR} at (0,0) size 139x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 56x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (98,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 139x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (98,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 139x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 56x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (98,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-36-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-36-d-expected.txt
new file mode 100644
index 0000000..0837f726
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-36-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 154x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 149x175
+          LayoutTableRow {TR} at (0,0) size 149x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 56x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (103,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 149x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (103,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 149x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 56x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (103,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-37-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-37-d-expected.txt
new file mode 100644
index 0000000..37123c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-37-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 168x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 163x175
+          LayoutTableRow {TR} at (0,0) size 163x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 56x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 163x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 163x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 56x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-38-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-38-d-expected.txt
new file mode 100644
index 0000000..5e39533
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-38-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 138x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 133x175
+          LayoutTableRow {TR} at (0,0) size 133x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 56x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (95,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 133x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (95,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 133x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 56x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (95,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-39-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-39-d-expected.txt
new file mode 100644
index 0000000..2ed15a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-39-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 132x170
+        LayoutTableSection {TBODY} at (0,0) size 132x170
+          LayoutTableRow {TR} at (0,0) size 132x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 56x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (94,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 132x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 56x32 [border: (5px dashed #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (94,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 132x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 56x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (94,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-40-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-40-d-expected.txt
new file mode 100644
index 0000000..fe67b45
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-40-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 39x19
+                text run at (1,15) width 39: "dotted"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-41-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-41-d-expected.txt
new file mode 100644
index 0000000..4ce3f656
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-41-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 161x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 156x175
+          LayoutTableRow {TR} at (0,0) size 156x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 51x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (104,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 156x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (104,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 156x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 51x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (104,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-42-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-42-d-expected.txt
new file mode 100644
index 0000000..5d7f658
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-42-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 130x175
+          LayoutTableRow {TR} at (0,0) size 130x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 51x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (91,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 130x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (91,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 130x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 51x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (91,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-43-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-43-d-expected.txt
new file mode 100644
index 0000000..3f90265
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-43-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-44-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-44-d-expected.txt
new file mode 100644
index 0000000..d32b29f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-44-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 153x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 148x175
+          LayoutTableRow {TR} at (0,0) size 148x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 51x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (100,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 148x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (100,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 148x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 51x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (100,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-45-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-45-d-expected.txt
new file mode 100644
index 0000000..41ccc11
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-45-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 139x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 134x175
+          LayoutTableRow {TR} at (0,0) size 134x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 51x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (93,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 134x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (93,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 134x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 51x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (93,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-46-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-46-d-expected.txt
new file mode 100644
index 0000000..55b13a3f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-46-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 149x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 144x175
+          LayoutTableRow {TR} at (0,0) size 144x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 51x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (98,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 144x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (98,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 144x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 51x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (98,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-47-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-47-d-expected.txt
new file mode 100644
index 0000000..e1539ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-47-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-48-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-48-d-expected.txt
new file mode 100644
index 0000000..63403eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-48-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 133x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 128x175
+          LayoutTableRow {TR} at (0,0) size 128x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 51x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (90,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 128x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (90,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 128x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 51x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (90,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-49-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-49-d-expected.txt
new file mode 100644
index 0000000..8b7627c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-49-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 127x170
+        LayoutTableSection {TBODY} at (0,0) size 127x170
+          LayoutTableRow {TR} at (0,0) size 127x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 51x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (89,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 127x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 51x32 [border: (5px dotted #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (89,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 127x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 51x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (89,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-50-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-50-d-expected.txt
new file mode 100644
index 0000000..bb392778
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-50-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 32x19
+                text run at (1,15) width 32: "ridge"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-51-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-51-d-expected.txt
new file mode 100644
index 0000000..61a0218
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-51-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 160x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 155x175
+          LayoutTableRow {TR} at (0,0) size 155x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 50x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (103,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 155x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 50x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (103,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 155x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 50x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (103,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-52-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-52-d-expected.txt
new file mode 100644
index 0000000..666e0fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-52-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 128x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 123x175
+          LayoutTableRow {TR} at (0,0) size 123x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 44x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (84,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 123x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 44x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (84,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 123x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 44x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (84,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-53-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-53-d-expected.txt
new file mode 100644
index 0000000..a54050f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-53-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-54-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-54-d-expected.txt
new file mode 100644
index 0000000..b8079d3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-54-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 148x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 143x175
+          LayoutTableRow {TR} at (0,0) size 143x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 46x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 143x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 46x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (95,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 143x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 46x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-55-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-55-d-expected.txt
new file mode 100644
index 0000000..65e1682
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-55-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 132x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 127x175
+          LayoutTableRow {TR} at (0,0) size 127x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 44x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (86,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 127x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 44x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (86,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 127x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 44x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (86,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-56-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-56-d-expected.txt
new file mode 100644
index 0000000..d8aaec9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-56-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 142x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 137x175
+          LayoutTableRow {TR} at (0,0) size 137x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 44x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 137x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 44x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (91,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 137x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 44x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-57-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-57-d-expected.txt
new file mode 100644
index 0000000..608edc4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-57-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-58-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-58-d-expected.txt
new file mode 100644
index 0000000..e06b5377
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-58-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 126x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 121x175
+          LayoutTableRow {TR} at (0,0) size 121x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 44x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (83,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 121x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 44x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (83,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 121x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 44x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (83,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-59-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-59-d-expected.txt
new file mode 100644
index 0000000..764cfdb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-59-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 120x170
+        LayoutTableSection {TBODY} at (0,0) size 120x170
+          LayoutTableRow {TR} at (0,0) size 120x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 44x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (82,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 120x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 44x32 [border: (5px ridge #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (82,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 120x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 44x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (82,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-60-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-60-d-expected.txt
new file mode 100644
index 0000000..8a3b2fe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-60-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 37x19
+                text run at (1,15) width 37: "outset"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-61-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-61-d-expected.txt
new file mode 100644
index 0000000..9f7e4be
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-61-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 160x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 155x175
+          LayoutTableRow {TR} at (0,0) size 155x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 50x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (103,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 155x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 50x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (103,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 155x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 50x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (103,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-62-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-62-d-expected.txt
new file mode 100644
index 0000000..76e71f0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-62-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 133x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 128x175
+          LayoutTableRow {TR} at (0,0) size 128x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 49x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (89,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 128x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (89,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 128x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 49x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (89,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-63-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-63-d-expected.txt
new file mode 100644
index 0000000..4875640
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-63-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-64-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-64-d-expected.txt
new file mode 100644
index 0000000..40cc7b7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-64-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 151x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 146x175
+          LayoutTableRow {TR} at (0,0) size 146x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 49x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (98,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 146x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (98,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 146x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 49x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (98,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-65-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-65-d-expected.txt
new file mode 100644
index 0000000..2cbc23e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-65-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 137x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 132x175
+          LayoutTableRow {TR} at (0,0) size 132x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 49x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (91,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 132x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 132x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 49x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (91,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-66-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-66-d-expected.txt
new file mode 100644
index 0000000..0628ea7d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-66-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 147x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 142x175
+          LayoutTableRow {TR} at (0,0) size 142x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 49x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (96,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 142x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (96,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 142x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 49x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (96,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-67-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-67-d-expected.txt
new file mode 100644
index 0000000..657c178
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-67-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-68-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-68-d-expected.txt
new file mode 100644
index 0000000..9ece2ac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-68-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 131x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 126x175
+          LayoutTableRow {TR} at (0,0) size 126x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 49x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (88,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 126x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (88,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 126x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 49x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (88,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-69-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-69-d-expected.txt
new file mode 100644
index 0000000..6a9cffdd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-69-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 125x170
+        LayoutTableSection {TBODY} at (0,0) size 125x170
+          LayoutTableRow {TR} at (0,0) size 125x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 49x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (87,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 125x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 49x32 [border: (5px outset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (87,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 125x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 49x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (87,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-70-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-70-d-expected.txt
new file mode 100644
index 0000000..91e4604
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-70-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 136x150
+        LayoutTableSection {TBODY} at (0,0) size 136x150
+          LayoutTableRow {TR} at (0,0) size 136x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 46x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (91,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 136x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 46x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 44x19
+                text run at (1,15) width 44: "groove"
+            LayoutNGTableCell {TD} at (91,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 136x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 46x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (91,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-71-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-71-d-expected.txt
new file mode 100644
index 0000000..4ba7f31
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-71-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 166x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 161x175
+          LayoutTableRow {TR} at (0,0) size 161x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 56x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (109,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 161x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (109,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 161x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 56x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (109,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-72-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-72-d-expected.txt
new file mode 100644
index 0000000..69b4aef1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-72-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 140x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 135x175
+          LayoutTableRow {TR} at (0,0) size 135x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 56x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (96,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 135x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (96,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 135x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 56x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (96,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-73-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-73-d-expected.txt
new file mode 100644
index 0000000..1ff19da3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-73-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 168x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 163x175
+          LayoutTableRow {TR} at (0,0) size 163x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 56x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 163x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 163x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 56x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (110,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-74-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-74-d-expected.txt
new file mode 100644
index 0000000..1865fea8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-74-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x175
+          LayoutTableRow {TR} at (0,0) size 153x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 56x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 153x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 153x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 56x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (105,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-75-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-75-d-expected.txt
new file mode 100644
index 0000000..d36c3b63
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-75-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 144x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 139x175
+          LayoutTableRow {TR} at (0,0) size 139x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 56x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (98,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 139x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (98,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 139x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 56x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (98,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-76-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-76-d-expected.txt
new file mode 100644
index 0000000..27ab8c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-76-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 154x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 149x175
+          LayoutTableRow {TR} at (0,0) size 149x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 56x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (103,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 149x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (103,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 149x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 56x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (103,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-77-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-77-d-expected.txt
new file mode 100644
index 0000000..a1fee89
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-77-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 168x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 163x175
+          LayoutTableRow {TR} at (0,0) size 163x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 56x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 163x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 163x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 56x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (110,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-78-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-78-d-expected.txt
new file mode 100644
index 0000000..a230eadf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-78-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 138x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 133x175
+          LayoutTableRow {TR} at (0,0) size 133x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 56x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (95,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 133x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (95,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 133x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 56x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (95,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-79-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-79-d-expected.txt
new file mode 100644
index 0000000..1d9b786
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-79-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 132x170
+        LayoutTableSection {TBODY} at (0,0) size 132x170
+          LayoutTableRow {TR} at (0,0) size 132x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 56x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (94,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 132x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 56x32 [border: (5px groove #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (94,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 132x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 56x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (94,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-80-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-80-d-expected.txt
new file mode 100644
index 0000000..bc9f7b69
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-80-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 29x19
+                text run at (1,15) width 29: "inset"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-81-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-81-d-expected.txt
new file mode 100644
index 0000000..bc8af26b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-81-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 160x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 155x175
+          LayoutTableRow {TR} at (0,0) size 155x58
+            LayoutNGTableCell {TD} at (0,15) size 53x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,14) size 50x30 [border: (3px double #00FF00) (5px double #FF0000) (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (103,15) size 52x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+          LayoutTableRow {TR} at (0,58) size 155x60
+            LayoutNGTableCell {TD} at (0,74) size 53x27 [border: (3px double #00FF00) (5px double #FF0000) (2px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (53,72) size 50x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (103,74) size 52x27 [border: (3px double #00FF00) (5px double #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 43x19
+                text run at (6,20) width 43: "double"
+          LayoutTableRow {TR} at (0,118) size 155x57
+            LayoutNGTableCell {TD} at (0,133) size 53x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
+            LayoutNGTableCell {TD} at (53,132) size 50x29 [border: (5px double #FF0000) (2px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 43x19
+                text run at (4,20) width 43: "double"
+            LayoutNGTableCell {TD} at (103,133) size 52x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 43x19
+                text run at (4,19) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-82-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-82-d-expected.txt
new file mode 100644
index 0000000..e2494ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-82-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 125x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 120x175
+          LayoutTableRow {TR} at (0,0) size 120x58
+            LayoutNGTableCell {TD} at (0,15) size 40x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,14) size 41x30 [border: (3px solid #00FF00) (5px solid #FF0000) (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (81,15) size 39x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+          LayoutTableRow {TR} at (0,58) size 120x60
+            LayoutNGTableCell {TD} at (0,74) size 40x27 [border: (3px solid #00FF00) (5px solid #FF0000) (2px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,72) size 41x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (81,74) size 39x27 [border: (3px solid #00FF00) (5px solid #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 30x19
+                text run at (6,20) width 30: "solid"
+          LayoutTableRow {TR} at (0,118) size 120x57
+            LayoutNGTableCell {TD} at (0,133) size 40x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
+            LayoutNGTableCell {TD} at (40,132) size 41x29 [border: (5px solid #FF0000) (2px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 30x19
+                text run at (4,20) width 30: "solid"
+            LayoutNGTableCell {TD} at (81,133) size 39x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 30x19
+                text run at (4,19) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-83-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-83-d-expected.txt
new file mode 100644
index 0000000..abd53c9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-83-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px dashed #00FF00) (5px dashed #FF0000) (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px dashed #00FF00) (5px dashed #FF0000) (2px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px dashed #00FF00) (5px dashed #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "dashed"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px dashed #FF0000) (2px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "dashed"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-84-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-84-d-expected.txt
new file mode 100644
index 0000000..0c85f294
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-84-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 148x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 143x175
+          LayoutTableRow {TR} at (0,0) size 143x58
+            LayoutNGTableCell {TD} at (0,15) size 49x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,14) size 46x30 [border: (3px dotted #00FF00) (5px dotted #FF0000) (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,15) size 48x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+          LayoutTableRow {TR} at (0,58) size 143x60
+            LayoutNGTableCell {TD} at (0,74) size 49x27 [border: (3px dotted #00FF00) (5px dotted #FF0000) (2px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,72) size 46x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (95,74) size 48x27 [border: (3px dotted #00FF00) (5px dotted #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 39x19
+                text run at (6,20) width 39: "dotted"
+          LayoutTableRow {TR} at (0,118) size 143x57
+            LayoutNGTableCell {TD} at (0,133) size 49x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
+            LayoutNGTableCell {TD} at (49,132) size 46x29 [border: (5px dotted #FF0000) (2px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 39x19
+                text run at (4,20) width 39: "dotted"
+            LayoutNGTableCell {TD} at (95,133) size 48x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 39x19
+                text run at (4,19) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-85-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-85-d-expected.txt
new file mode 100644
index 0000000..98332bf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-85-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 129x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 124x175
+          LayoutTableRow {TR} at (0,0) size 124x58
+            LayoutNGTableCell {TD} at (0,15) size 42x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,14) size 41x30 [border: (3px ridge #00FF00) (5px ridge #FF0000) (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (83,15) size 41x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+          LayoutTableRow {TR} at (0,58) size 124x60
+            LayoutNGTableCell {TD} at (0,74) size 42x27 [border: (3px ridge #00FF00) (5px ridge #FF0000) (2px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,72) size 41x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (83,74) size 41x27 [border: (3px ridge #00FF00) (5px ridge #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 32x19
+                text run at (6,20) width 32: "ridge"
+          LayoutTableRow {TR} at (0,118) size 124x57
+            LayoutNGTableCell {TD} at (0,133) size 42x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
+            LayoutNGTableCell {TD} at (42,132) size 41x29 [border: (5px ridge #FF0000) (2px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 32x19
+                text run at (4,20) width 32: "ridge"
+            LayoutNGTableCell {TD} at (83,133) size 41x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 32x19
+                text run at (4,19) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-86-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-86-d-expected.txt
new file mode 100644
index 0000000..ea3ed88
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-86-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 142x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 137x175
+          LayoutTableRow {TR} at (0,0) size 137x58
+            LayoutNGTableCell {TD} at (0,15) size 47x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,14) size 44x30 [border: (3px outset #00FF00) (5px outset #FF0000) (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,15) size 46x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+          LayoutTableRow {TR} at (0,58) size 137x60
+            LayoutNGTableCell {TD} at (0,74) size 47x27 [border: (3px outset #00FF00) (5px outset #FF0000) (2px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,72) size 44x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (91,74) size 46x27 [border: (3px outset #00FF00) (5px outset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 37x19
+                text run at (6,20) width 37: "outset"
+          LayoutTableRow {TR} at (0,118) size 137x57
+            LayoutNGTableCell {TD} at (0,133) size 47x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
+            LayoutNGTableCell {TD} at (47,132) size 44x29 [border: (5px outset #FF0000) (2px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 37x19
+                text run at (4,20) width 37: "outset"
+            LayoutNGTableCell {TD} at (91,133) size 46x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 37x19
+                text run at (4,19) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-87-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-87-d-expected.txt
new file mode 100644
index 0000000..2f1137f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-87-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 163x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 158x175
+          LayoutTableRow {TR} at (0,0) size 158x58
+            LayoutNGTableCell {TD} at (0,15) size 54x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,14) size 51x30 [border: (3px groove #00FF00) (5px groove #FF0000) (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,15) size 53x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+          LayoutTableRow {TR} at (0,58) size 158x60
+            LayoutNGTableCell {TD} at (0,74) size 54x27 [border: (3px groove #00FF00) (5px groove #FF0000) (2px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,72) size 51x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (105,74) size 53x27 [border: (3px groove #00FF00) (5px groove #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 44x19
+                text run at (6,20) width 44: "groove"
+          LayoutTableRow {TR} at (0,118) size 158x57
+            LayoutNGTableCell {TD} at (0,133) size 54x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
+            LayoutNGTableCell {TD} at (54,132) size 51x29 [border: (5px groove #FF0000) (2px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 44x19
+                text run at (4,20) width 44: "groove"
+            LayoutNGTableCell {TD} at (105,133) size 53x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 44x19
+                text run at (4,19) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-88-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-88-d-expected.txt
new file mode 100644
index 0000000..6bdc1b2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-88-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x240
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x240
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x216
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 123x180 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 118x175
+          LayoutTableRow {TR} at (0,0) size 118x58
+            LayoutNGTableCell {TD} at (0,15) size 39x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,14) size 41x30 [border: (3px inset #00FF00) (5px inset #FF0000) (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (80,15) size 38x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+          LayoutTableRow {TR} at (0,58) size 118x60
+            LayoutNGTableCell {TD} at (0,74) size 39x27 [border: (3px inset #00FF00) (5px inset #FF0000) (2px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,72) size 41x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (80,74) size 38x27 [border: (3px inset #00FF00) (5px inset #FF0000)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+          LayoutTableRow {TR} at (0,118) size 118x57
+            LayoutNGTableCell {TD} at (0,133) size 39x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
+            LayoutNGTableCell {TD} at (39,132) size 41x29 [border: (5px inset #FF0000) (2px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,20) size 29x19
+                text run at (4,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (80,133) size 38x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,19) size 29x19
+                text run at (4,19) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-89-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-89-d-expected.txt
new file mode 100644
index 0000000..69d4c190
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-89-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 117x170
+        LayoutTableSection {TBODY} at (0,0) size 117x170
+          LayoutTableRow {TR} at (0,0) size 117x55
+            LayoutNGTableCell {TD} at (0,16) size 38x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,14) size 41x27 [border: none] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (79,16) size 38x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+          LayoutTableRow {TR} at (0,55) size 117x60
+            LayoutNGTableCell {TD} at (0,74) size 38x22 [border: none] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (38,69) size 41x32 [border: (5px inset #00FF00)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 29x19
+                text run at (6,20) width 29: "inset"
+            LayoutNGTableCell {TD} at (79,74) size 38x22 [border: none] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (6,20) size 31x19
+                text run at (6,20) width 31: "none"
+          LayoutTableRow {TR} at (0,115) size 117x55
+            LayoutNGTableCell {TD} at (0,131) size 38x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
+            LayoutNGTableCell {TD} at (38,129) size 41x27 [border: (5px none #FF0000)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,20) size 31x19
+                text run at (1,20) width 31: "none"
+            LayoutNGTableCell {TD} at (79,131) size 38x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,17) size 31x19
+                text run at (1,17) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-90-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-90-d-expected.txt
new file mode 100644
index 0000000..8132131
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-90-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 135x150
+        LayoutTableSection {TBODY} at (0,0) size 135x150
+          LayoutTableRow {TR} at (0,0) size 135x50
+            LayoutNGTableCell {TD} at (0,14) size 45x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,14) size 45x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,14) size 45x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,50) size 135x50
+            LayoutNGTableCell {TD} at (0,64) size 45x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,64) size 45x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (90,64) size 45x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+          LayoutTableRow {TR} at (0,100) size 135x50
+            LayoutNGTableCell {TD} at (0,114) size 45x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (45,114) size 45x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
+            LayoutNGTableCell {TD} at (90,114) size 45x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 43x19
+                text run at (1,15) width 43: "hidden"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-91-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-91-d-expected.txt
new file mode 100644
index 0000000..25dbb18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-91-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 155x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 150x165
+          LayoutTableRow {TR} at (0,0) size 150x55
+            LayoutNGTableCell {TD} at (0,14) size 50x27 [border: (3px double #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,14) size 50x27 [border: (3px double #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (100,14) size 50x27 [border: (3px double #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+          LayoutTableRow {TR} at (0,55) size 150x55
+            LayoutNGTableCell {TD} at (0,69) size 50x27 [border: (3px double #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,69) size 50x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (100,69) size 50x27 [border: (3px double #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+          LayoutTableRow {TR} at (0,110) size 150x55
+            LayoutNGTableCell {TD} at (0,124) size 50x27 [border: (3px double #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (50,124) size 50x27 [border: (3px double #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
+            LayoutNGTableCell {TD} at (100,124) size 50x27 [border: (3px double #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 43x19
+                text run at (4,18) width 43: "double"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-92-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-92-d-expected.txt
new file mode 100644
index 0000000..3fd441b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-92-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 117x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 112x165
+          LayoutTableRow {TR} at (0,0) size 112x55
+            LayoutNGTableCell {TD} at (0,14) size 37x27 [border: (3px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,14) size 38x27 [border: (3px solid #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (75,14) size 37x27 [border: (3px solid #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+          LayoutTableRow {TR} at (0,55) size 112x55
+            LayoutNGTableCell {TD} at (0,69) size 37x27 [border: (3px solid #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,69) size 38x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (75,69) size 37x27 [border: (3px solid #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+          LayoutTableRow {TR} at (0,110) size 112x55
+            LayoutNGTableCell {TD} at (0,124) size 37x27 [border: (3px solid #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (37,124) size 38x27 [border: (3px solid #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
+            LayoutNGTableCell {TD} at (75,124) size 37x27 [border: (3px solid #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 30x19
+                text run at (4,18) width 30: "solid"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-93-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-93-d-expected.txt
new file mode 100644
index 0000000..f150c0a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-93-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x165
+          LayoutTableRow {TR} at (0,0) size 153x55
+            LayoutNGTableCell {TD} at (0,14) size 51x27 [border: (3px dashed #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,14) size 51x27 [border: (3px dashed #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (102,14) size 51x27 [border: (3px dashed #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+          LayoutTableRow {TR} at (0,55) size 153x55
+            LayoutNGTableCell {TD} at (0,69) size 51x27 [border: (3px dashed #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,69) size 51x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (102,69) size 51x27 [border: (3px dashed #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+          LayoutTableRow {TR} at (0,110) size 153x55
+            LayoutNGTableCell {TD} at (0,124) size 51x27 [border: (3px dashed #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (51,124) size 51x27 [border: (3px dashed #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
+            LayoutNGTableCell {TD} at (102,124) size 51x27 [border: (3px dashed #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "dashed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-94-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-94-d-expected.txt
new file mode 100644
index 0000000..c12be6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-94-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 143x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 138x165
+          LayoutTableRow {TR} at (0,0) size 138x55
+            LayoutNGTableCell {TD} at (0,14) size 46x27 [border: (3px dotted #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,14) size 46x27 [border: (3px dotted #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (92,14) size 46x27 [border: (3px dotted #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+          LayoutTableRow {TR} at (0,55) size 138x55
+            LayoutNGTableCell {TD} at (0,69) size 46x27 [border: (3px dotted #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,69) size 46x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (92,69) size 46x27 [border: (3px dotted #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+          LayoutTableRow {TR} at (0,110) size 138x55
+            LayoutNGTableCell {TD} at (0,124) size 46x27 [border: (3px dotted #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (46,124) size 46x27 [border: (3px dotted #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
+            LayoutNGTableCell {TD} at (92,124) size 46x27 [border: (3px dotted #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 39x19
+                text run at (4,18) width 39: "dotted"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-95-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-95-d-expected.txt
new file mode 100644
index 0000000..9415fa2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-95-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 122x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 117x165
+          LayoutTableRow {TR} at (0,0) size 117x55
+            LayoutNGTableCell {TD} at (0,14) size 39x27 [border: (3px ridge #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,14) size 39x27 [border: (3px ridge #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (78,14) size 39x27 [border: (3px ridge #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,55) size 117x55
+            LayoutNGTableCell {TD} at (0,69) size 39x27 [border: (3px ridge #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,69) size 39x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (78,69) size 39x27 [border: (3px ridge #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+          LayoutTableRow {TR} at (0,110) size 117x55
+            LayoutNGTableCell {TD} at (0,124) size 39x27 [border: (3px ridge #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (39,124) size 39x27 [border: (3px ridge #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
+            LayoutNGTableCell {TD} at (78,124) size 39x27 [border: (3px ridge #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 32x19
+                text run at (4,18) width 32: "ridge"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-96-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-96-d-expected.txt
new file mode 100644
index 0000000..15387567
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-96-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 137x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 132x165
+          LayoutTableRow {TR} at (0,0) size 132x55
+            LayoutNGTableCell {TD} at (0,14) size 44x27 [border: (3px outset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,14) size 44x27 [border: (3px outset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (88,14) size 44x27 [border: (3px outset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,55) size 132x55
+            LayoutNGTableCell {TD} at (0,69) size 44x27 [border: (3px outset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,69) size 44x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (88,69) size 44x27 [border: (3px outset #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+          LayoutTableRow {TR} at (0,110) size 132x55
+            LayoutNGTableCell {TD} at (0,124) size 44x27 [border: (3px outset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (44,124) size 44x27 [border: (3px outset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
+            LayoutNGTableCell {TD} at (88,124) size 44x27 [border: (3px outset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 37x19
+                text run at (4,18) width 37: "outset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-97-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-97-d-expected.txt
new file mode 100644
index 0000000..56f8f18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-97-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 158x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 153x165
+          LayoutTableRow {TR} at (0,0) size 153x55
+            LayoutNGTableCell {TD} at (0,14) size 51x27 [border: (3px groove #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,14) size 51x27 [border: (3px groove #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (102,14) size 51x27 [border: (3px groove #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+          LayoutTableRow {TR} at (0,55) size 153x55
+            LayoutNGTableCell {TD} at (0,69) size 51x27 [border: (3px groove #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,69) size 51x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (102,69) size 51x27 [border: (3px groove #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+          LayoutTableRow {TR} at (0,110) size 153x55
+            LayoutNGTableCell {TD} at (0,124) size 51x27 [border: (3px groove #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (51,124) size 51x27 [border: (3px groove #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
+            LayoutNGTableCell {TD} at (102,124) size 51x27 [border: (3px groove #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 44x19
+                text run at (4,18) width 44: "groove"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-98-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-98-d-expected.txt
new file mode 100644
index 0000000..67f0c6c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-98-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x230
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x230
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x206
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 115x170 [border: (2px none #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 110x165
+          LayoutTableRow {TR} at (0,0) size 110x55
+            LayoutNGTableCell {TD} at (0,14) size 36x27 [border: (3px inset #00FF00)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,14) size 38x27 [border: (3px inset #00FF00)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (74,14) size 36x27 [border: (3px inset #00FF00)] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+          LayoutTableRow {TR} at (0,55) size 110x55
+            LayoutNGTableCell {TD} at (0,69) size 36x27 [border: (3px inset #00FF00)] [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,69) size 38x27 [border: (3px none #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 31x19
+                text run at (4,18) width 31: "none"
+            LayoutNGTableCell {TD} at (74,69) size 36x27 [border: (3px inset #00FF00)] [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+          LayoutTableRow {TR} at (0,110) size 110x55
+            LayoutNGTableCell {TD} at (0,124) size 36x27 [border: (3px inset #00FF00)] [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (36,124) size 38x27 [border: (3px inset #00FF00)] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
+            LayoutNGTableCell {TD} at (74,124) size 36x27 [border: (3px inset #00FF00)] [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (4,18) size 29x19
+                text run at (4,18) width 29: "inset"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-99-d-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-99-d-expected.txt
new file mode 100644
index 0000000..49db54a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t170602-bdr-conflct-w-99-d-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x210
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x210
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x186
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "There should be no red borders on the table below"
+      LayoutTable {TABLE} at (0,36) size 99x150
+        LayoutTableSection {TBODY} at (0,0) size 99x150
+          LayoutTableRow {TR} at (0,0) size 99x50
+            LayoutNGTableCell {TD} at (0,14) size 33x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,14) size 33x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (66,14) size 33x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+          LayoutTableRow {TR} at (0,50) size 99x50
+            LayoutNGTableCell {TD} at (0,64) size 33x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,64) size 33x22 [r=1 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (66,64) size 33x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+          LayoutTableRow {TR} at (0,100) size 99x50
+            LayoutNGTableCell {TD} at (0,114) size 33x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (33,114) size 33x22 [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
+            LayoutNGTableCell {TD} at (66,114) size 33x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,15) size 31x19
+                text run at (1,15) width 31: "none"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-expected.txt
new file mode 100644
index 0000000..1c4fda9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-expected.txt
@@ -0,0 +1,50 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (324,170) size 4x19
+        text run at (324,170) width 4: " "
+      LayoutText {#text} at (488,170) size 4x19
+        text run at (488,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,265) size 4x19
+        text run at (160,265) width 4: " "
+      LayoutText {#text} at (324,265) size 4x19
+        text run at (324,265) width 4: " "
+      LayoutText {#text} at (488,265) size 4x19
+        text run at (488,265) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
+layer at (336,103) size 160x90
+  LayoutImage {IMG} at (328,95) size 160x90
+layer at (500,103) size 160x90
+  LayoutImage {IMG} at (492,95) size 160x90
+layer at (8,198) size 160x90
+  LayoutImage {IMG} at (0,190) size 160x90
+layer at (172,198) size 160x90
+  LayoutImage {IMG} at (164,190) size 160x90
+layer at (336,198) size 160x90
+  LayoutImage {IMG} at (328,190) size 160x90
+layer at (500,198) size 160x90
+  LayoutImage {IMG} at (492,190) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-hw-expected.txt
new file mode 100644
index 0000000..63e873c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-clamping-hw-expected.txt
@@ -0,0 +1,62 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+      LayoutText {#text} at (160,113) size 4x19
+        text run at (160,113) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+      LayoutText {#text} at (324,113) size 4x19
+        text run at (324,113) width 4: " "
+      LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+      LayoutText {#text} at (488,113) size 4x19
+        text run at (488,113) width 4: " "
+      LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,133) size 160x90
+      LayoutText {#text} at (160,246) size 4x19
+        text run at (160,246) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,133) size 160x90
+      LayoutText {#text} at (324,246) size 4x19
+        text run at (324,246) width 4: " "
+      LayoutNGBlockFlow {DIV} at (328,133) size 160x90
+      LayoutText {#text} at (488,246) size 4x19
+        text run at (488,246) width 4: " "
+      LayoutNGBlockFlow {DIV} at (492,133) size 160x90
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,266) size 160x90
+      LayoutText {#text} at (160,379) size 4x19
+        text run at (160,379) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,266) size 160x90
+      LayoutText {#text} at (324,379) size 4x19
+        text run at (324,379) width 4: " "
+      LayoutNGBlockFlow {DIV} at (328,266) size 160x90
+      LayoutText {#text} at (488,379) size 4x19
+        text run at (488,379) width 4: " "
+      LayoutNGBlockFlow {DIV} at (492,266) size 160x90
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,141) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,141) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,141) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,141) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,274) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,274) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,274) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,274) size 256x128
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-expected.txt
new file mode 100644
index 0000000..6de5b4d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-expected.txt
@@ -0,0 +1,31 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (324,170) size 4x19
+        text run at (324,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
+layer at (336,103) size 160x90
+  LayoutImage {IMG} at (328,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-hw-expected.txt
new file mode 100644
index 0000000..7cc2b22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-brightness-hw-expected.txt
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (324,170) size 4x19
+        text run at (324,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+layer at (172,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+layer at (336,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+layer at (500,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+layer at (8,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,95) size 160x90
+layer at (172,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,95) size 160x90
+layer at (336,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,95) size 160x90
+layer at (8,8) size 256x128 backgroundClip at (8,8) size 160x90 clip at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128 backgroundClip at (172,8) size 160x90 clip at (172,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128 backgroundClip at (336,8) size 160x90 clip at (336,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128 backgroundClip at (500,8) size 160x90 clip at (500,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,103) size 256x128 backgroundClip at (8,103) size 160x90 clip at (8,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,103) size 256x128 backgroundClip at (172,103) size 160x90 clip at (172,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,103) size 256x128 backgroundClip at (336,103) size 160x90 clip at (336,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-expected.txt
new file mode 100644
index 0000000..cc19f3b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (180,95) size 4x19
+        text run at (180,95) width 4: " "
+      LayoutText {#text} at (364,95) size 4x19
+        text run at (364,95) width 4: " "
+      LayoutText {#text} at (548,95) size 4x19
+        text run at (548,95) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (180,210) size 4x19
+        text run at (180,210) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (18,18) size 160x90
+  LayoutImage {IMG} at (10,10) size 160x90
+layer at (202,18) size 160x90
+  LayoutImage {IMG} at (194,10) size 160x90
+layer at (386,18) size 160x90
+  LayoutImage {IMG} at (378,10) size 160x90
+layer at (570,18) size 160x90
+  LayoutImage {IMG} at (562,10) size 160x90
+layer at (18,133) size 160x90
+  LayoutImage {IMG} at (10,125) size 160x90
+layer at (202,133) size 160x90
+  LayoutImage {IMG} at (194,125) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-hw-expected.txt
new file mode 100644
index 0000000..cc19f3b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-combined-hw-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (180,95) size 4x19
+        text run at (180,95) width 4: " "
+      LayoutText {#text} at (364,95) size 4x19
+        text run at (364,95) width 4: " "
+      LayoutText {#text} at (548,95) size 4x19
+        text run at (548,95) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (180,210) size 4x19
+        text run at (180,210) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (18,18) size 160x90
+  LayoutImage {IMG} at (10,10) size 160x90
+layer at (202,18) size 160x90
+  LayoutImage {IMG} at (194,10) size 160x90
+layer at (386,18) size 160x90
+  LayoutImage {IMG} at (378,10) size 160x90
+layer at (570,18) size 160x90
+  LayoutImage {IMG} at (562,10) size 160x90
+layer at (18,133) size 160x90
+  LayoutImage {IMG} at (10,125) size 160x90
+layer at (202,133) size 160x90
+  LayoutImage {IMG} at (194,125) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-contrast-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-contrast-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-contrast-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-expected.txt
new file mode 100644
index 0000000..3626133
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (190,105) size 4x19
+        text run at (190,105) width 4: " "
+      LayoutText {#text} at (384,105) size 4x19
+        text run at (384,105) width 4: " "
+      LayoutText {#text} at (578,105) size 4x19
+        text run at (578,105) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (23,23) size 160x90
+  LayoutImage {IMG} at (15,15) size 160x90
+layer at (217,23) size 160x90
+  LayoutImage {IMG} at (209,15) size 160x90
+layer at (411,23) size 160x90
+  LayoutImage {IMG} at (403,15) size 160x90
+layer at (605,23) size 160x90
+  LayoutImage {IMG} at (597,15) size 160x90
+layer at (23,148) size 160x90
+  LayoutImage {IMG} at (15,140) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-hw-expected.txt
new file mode 100644
index 0000000..3626133
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-drop-shadow-hw-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (190,105) size 4x19
+        text run at (190,105) width 4: " "
+      LayoutText {#text} at (384,105) size 4x19
+        text run at (384,105) width 4: " "
+      LayoutText {#text} at (578,105) size 4x19
+        text run at (578,105) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (23,23) size 160x90
+  LayoutImage {IMG} at (15,15) size 160x90
+layer at (217,23) size 160x90
+  LayoutImage {IMG} at (209,15) size 160x90
+layer at (411,23) size 160x90
+  LayoutImage {IMG} at (403,15) size 160x90
+layer at (605,23) size 160x90
+  LayoutImage {IMG} at (597,15) size 160x90
+layer at (23,148) size 160x90
+  LayoutImage {IMG} at (15,140) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-hw-expected.txt
new file mode 100644
index 0000000..1e09ce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-grayscale-hw-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+layer at (172,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+layer at (336,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+layer at (500,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+layer at (8,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,95) size 160x90
+layer at (172,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,95) size 160x90
+layer at (8,8) size 256x128 backgroundClip at (8,8) size 160x90 clip at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128 backgroundClip at (172,8) size 160x90 clip at (172,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128 backgroundClip at (336,8) size 160x90 clip at (336,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128 backgroundClip at (500,8) size 160x90 clip at (500,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,103) size 256x128 backgroundClip at (8,103) size 160x90 clip at (8,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,103) size 256x128 backgroundClip at (172,103) size 160x90 clip at (172,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-hw-expected.txt
new file mode 100644
index 0000000..1e09ce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-hue-rotate-hw-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+layer at (172,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+layer at (336,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+layer at (500,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+layer at (8,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,95) size 160x90
+layer at (172,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,95) size 160x90
+layer at (8,8) size 256x128 backgroundClip at (8,8) size 160x90 clip at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128 backgroundClip at (172,8) size 160x90 clip at (172,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128 backgroundClip at (336,8) size 160x90 clip at (336,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128 backgroundClip at (500,8) size 160x90 clip at (500,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,103) size 256x128 backgroundClip at (8,103) size 160x90 clip at (8,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,103) size 256x128 backgroundClip at (172,103) size 160x90 clip at (172,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-hw-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-invert-hw-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-hw-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-opacity-hw-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-subregion-chained-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-subregion-chained-expected.txt
new file mode 100644
index 0000000..67568212
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-subregion-chained-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutSVGRoot {svg} at (0,110) size 0x0
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+          LayoutSVGResourceFilter {filter} [id="colormatrix"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+            [feColorMatrix type="HUEROTATE" values="10.00"]
+              [feColorMatrix type="HUEROTATE" values="10.00"]
+                [SourceGraphic]
+      LayoutText {#text} at (0,95) size 4x19
+        text run at (0,95) width 4: " "
+      LayoutImage {IMG} at (14,10) size 160x90
+      LayoutText {#text} at (184,95) size 4x19
+        text run at (184,95) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (206,18) size 160x90
+  LayoutImage {IMG} at (198,10) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-tile-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-tile-hw-expected.txt
new file mode 100644
index 0000000..5bd5096
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-reference-tile-hw-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutSVGRoot {svg} at (0,110) size 0x0
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+          LayoutSVGResourceFilter {filter} [id="non-integer-tile"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+            [feTile]
+              [feColorMatrix type="MATRIX"]
+                [SourceGraphic]
+          LayoutSVGResourceFilter {filter} [id="shrink-tile"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+            [feTile]
+              [feColorMatrix type="MATRIX"]
+                [SourceGraphic]
+          LayoutSVGResourceFilter {filter} [id="zero-src-tile"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+            [feTile]
+              [feColorMatrix type="MATRIX"]
+                [SourceGraphic]
+          LayoutSVGResourceFilter {filter} [id="zero-dst-tile"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+            [feTile]
+              [feColorMatrix type="MATRIX"]
+                [SourceGraphic]
+      LayoutText {#text} at (0,95) size 4x19
+        text run at (0,95) width 4: " "
+      LayoutText {#text} at (184,95) size 4x19
+        text run at (184,95) width 4: " "
+      LayoutText {#text} at (368,95) size 4x19
+        text run at (368,95) width 4: " "
+      LayoutText {#text} at (552,95) size 4x19
+        text run at (552,95) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (22,18) size 160x90
+  LayoutImage {IMG} at (14,10) size 160x90
+layer at (206,18) size 160x90
+  LayoutImage {IMG} at (198,10) size 160x90
+layer at (390,18) size 160x90
+  LayoutImage {IMG} at (382,10) size 160x90
+layer at (574,18) size 160x90
+  LayoutImage {IMG} at (566,10) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-hw-expected.txt
new file mode 100644
index 0000000..1e09ce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-saturate-hw-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+layer at (172,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+layer at (336,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+layer at (500,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+layer at (8,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,95) size 160x90
+layer at (172,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,95) size 160x90
+layer at (8,8) size 256x128 backgroundClip at (8,8) size 160x90 clip at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128 backgroundClip at (172,8) size 160x90 clip at (172,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128 backgroundClip at (336,8) size 160x90 clip at (336,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128 backgroundClip at (500,8) size 160x90 clip at (500,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,103) size 256x128 backgroundClip at (8,103) size 160x90 clip at (8,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,103) size 256x128 backgroundClip at (172,103) size 160x90 clip at (172,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-expected.txt
new file mode 100644
index 0000000..c56ec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 160x90
+layer at (172,8) size 160x90
+  LayoutImage {IMG} at (164,0) size 160x90
+layer at (336,8) size 160x90
+  LayoutImage {IMG} at (328,0) size 160x90
+layer at (500,8) size 160x90
+  LayoutImage {IMG} at (492,0) size 160x90
+layer at (8,103) size 160x90
+  LayoutImage {IMG} at (0,95) size 160x90
+layer at (172,103) size 160x90
+  LayoutImage {IMG} at (164,95) size 160x90
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-hw-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-hw-expected.txt
new file mode 100644
index 0000000..1e09ce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/filters/effect-sepia-hw-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (160,75) size 4x19
+        text run at (160,75) width 4: " "
+      LayoutText {#text} at (324,75) size 4x19
+        text run at (324,75) width 4: " "
+      LayoutText {#text} at (488,75) size 4x19
+        text run at (488,75) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (160,170) size 4x19
+        text run at (160,170) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,0) size 160x90
+layer at (172,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,0) size 160x90
+layer at (336,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (328,0) size 160x90
+layer at (500,8) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (492,0) size 160x90
+layer at (8,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (0,95) size 160x90
+layer at (172,103) size 160x90 scrollHeight 128
+  LayoutNGBlockFlow {DIV} at (164,95) size 160x90
+layer at (8,8) size 256x128 backgroundClip at (8,8) size 160x90 clip at (8,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,8) size 256x128 backgroundClip at (172,8) size 160x90 clip at (172,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (336,8) size 256x128 backgroundClip at (336,8) size 160x90 clip at (336,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (500,8) size 256x128 backgroundClip at (500,8) size 160x90 clip at (500,8) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (8,103) size 256x128 backgroundClip at (8,103) size 160x90 clip at (8,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
+layer at (172,103) size 256x128 backgroundClip at (172,103) size 160x90 clip at (172,103) size 160x90
+  LayoutImage {IMG} at (0,0) size 256x128
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-18b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-18b-expected.txt
new file mode 100644
index 0000000..e72282e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-18b-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x307
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x306.66
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x274.66
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x274.66
+        LayoutNGBlockFlow {P} at (0,0) size 784x40
+          LayoutText {#text} at (0,0) size 749x19
+            text run at (0,0) width 749: "The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:"
+          LayoutBR {BR} at (749,0) size 0x0
+          LayoutInline {STRONG} at (0,0) size 63x19
+            LayoutText {#text} at (0,20) size 63x19
+              text run at (0,20) width 63: "This text."
+        LayoutNGBlockFlow {P} at (0,56) size 784x20
+          LayoutText {#text} at (0,0) size 59x19
+            text run at (0,0) width 59: "This text."
+        LayoutTable {TABLE} at (0,92) size 111x108
+          LayoutTableSection {TBODY} at (0,0) size 111x108
+            LayoutTableRow {TR} at (0,2) size 111x80
+              LayoutNGTableCell {TD} at (2,2) size 107x80 [r=0 c=0 rs=1 cs=1]
+                LayoutTable {TABLE} at (1,1) size 105x78
+                  LayoutTableSection {TBODY} at (0,0) size 105x78
+                    LayoutTableRow {TR} at (0,2) size 105x74
+                      LayoutNGTableCell {TD} at (2,2) size 101x74 [r=0 c=0 rs=1 cs=1]
+                        LayoutNGBlockFlow {DL} at (1,17) size 99x40
+                          LayoutNGBlockFlow {DT} at (0,0) size 99x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+                          LayoutNGBlockFlow {DD} at (40,20) size 59x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+            LayoutTableRow {TR} at (0,84) size 111x22
+              LayoutNGTableCell {TD} at (2,84) size 107x22 [r=1 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 59x19
+                  text run at (1,1) width 59: "This text."
+        LayoutNGBlockFlow {P} at (0,216) size 784x22.66
+          LayoutInline {SUB} at (0,0) size 51x16
+            LayoutText {#text} at (0,6) size 51x16
+              text run at (0,6) width 51: "This text."
+        LayoutNGBlockFlow {P} at (0,254.66) size 784x20
+          LayoutText {#text} at (0,0) size 573x19
+            text run at (0,0) width 573: "...and anything else between the top of the first paragraph and the bottom of this paragraph."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-23-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-23-expected.txt
new file mode 100644
index 0000000..470d18f0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-23-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x44
+      LayoutNGBlockFlow {P} at (0,0) size 784x44
+        LayoutButton {BUTTON} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+            LayoutText {#text} at (0,0) size 240x16
+              text run at (0,0) width 240: "A button (enabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (256,1) size 0x0
+        LayoutTextControl {INPUT} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {DIV} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-24-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-24-expected.txt
new file mode 100644
index 0000000..d9b3b34d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-24-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x44
+      LayoutNGBlockFlow {P} at (0,0) size 784x44
+        LayoutButton {BUTTON} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+            LayoutText {#text} at (0,0) size 243x16
+              text run at (0,0) width 243: "A button (disabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (259,1) size 0x0
+        LayoutTextControl {INPUT} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {DIV} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-34-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-34-expected.txt
new file mode 100644
index 0000000..80f42f8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-34-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x136
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x136
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x112
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x112
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 188x19
+            text run at (0,0) width 188: "This div contains 3 addresses:"
+        LayoutNGBlockFlow {ADDRESS} at (16,20) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 329x19
+            text run at (0,0) width 329: "A first address that should have a green background"
+        LayoutNGBlockFlow {ADDRESS} at (16,56) size 768x20
+          LayoutText {#text} at (0,0) size 271x19
+            text run at (0,0) width 271: "A second address with normal background"
+        LayoutNGBlockFlow {ADDRESS} at (16,92) size 768x20
+          LayoutText {#text} at (0,0) size 256x19
+            text run at (0,0) width 256: "A third address with normal background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39a-expected.txt
new file mode 100644
index 0000000..941d453
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39a-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x289
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x257
+      LayoutNGBlockFlow {P} at (0,0) size 784x257
+        LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+          LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+            LayoutTextFragment (anonymous) at (0,0) size 20x36
+              text run at (0,0) width 20: "T"
+          LayoutTextFragment (anonymous) at (0,0) size 0x0
+        LayoutText {#text} at (20,13) size 779x243
+          text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39c-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39c-expected.txt
new file mode 100644
index 0000000..941d453
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-39c-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x289
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x257
+      LayoutNGBlockFlow {P} at (0,0) size 784x257
+        LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+          LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+            LayoutTextFragment (anonymous) at (0,0) size 20x36
+              text run at (0,0) width 20: "T"
+          LayoutTextFragment (anonymous) at (0,0) size 0x0
+        LayoutText {#text} at (20,13) size 779x243
+          text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-68-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-68-expected.txt
new file mode 100644
index 0000000..d9b3b34d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-68-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x44
+      LayoutNGBlockFlow {P} at (0,0) size 784x44
+        LayoutButton {BUTTON} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+            LayoutText {#text} at (0,0) size 243x16
+              text run at (0,0) width 243: "A button (disabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (259,1) size 0x0
+        LayoutTextControl {INPUT} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {DIV} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-69-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-69-expected.txt
new file mode 100644
index 0000000..470d18f0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-69-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x44
+      LayoutNGBlockFlow {P} at (0,0) size 784x44
+        LayoutButton {BUTTON} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+            LayoutText {#text} at (0,0) size 240x16
+              text run at (0,0) width 240: "A button (enabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (256,1) size 0x0
+        LayoutTextControl {INPUT} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {DIV} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-80-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-80-expected.txt
new file mode 100644
index 0000000..81428ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-80-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x144
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x144
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x128
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x128
+        LayoutNGBlockFlow {ADDRESS} at (16,0) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 329x19
+            text run at (0,0) width 329: "A first address that should have a green background"
+        LayoutNGBlockFlow {ADDRESS} at (16,36) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 349x19
+            text run at (0,0) width 349: "A second address that should have a green background"
+        LayoutNGBlockFlow {ADDRESS} at (16,72) size 768x20
+          LayoutText {#text} at (0,0) size 256x19
+            text run at (0,0) width 256: "A third address with normal background"
+        LayoutNGBlockFlow (anonymous) at (0,108) size 784x20
+          LayoutText {#text} at (0,0) size 289x19
+            text run at (0,0) width 289: "This div should have three addresses above it."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-180a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-180a-expected.txt
new file mode 100644
index 0000000..8ba0fe5a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-180a-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x72
+  LayoutNGBlockFlow {html} at (0,0) size 800x72
+    LayoutNGBlockFlow {body} at (8,16) size 784x40
+      LayoutNGBlockFlow {p} at (0,0) size 784x40 [color=#008000]
+        LayoutBR {br} at (0,0) size 0x0
+        LayoutText {#text} at (0,20) size 163x19
+          text run at (0,20) width 163: "This line should be green."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-18b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-18b-expected.txt
new file mode 100644
index 0000000..c0b64d3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-18b-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x307
+  LayoutNGBlockFlow {html} at (0,0) size 800x306.66
+    LayoutNGBlockFlow {body} at (8,16) size 784x274.66
+      LayoutNGBlockFlow {div} at (0,0) size 784x274.66
+        LayoutNGBlockFlow {p} at (0,0) size 784x40
+          LayoutText {#text} at (0,0) size 749x19
+            text run at (0,0) width 749: "The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:"
+          LayoutBR {br} at (749,0) size 0x0
+          LayoutInline {strong} at (0,0) size 63x19
+            LayoutText {#text} at (0,20) size 63x19
+              text run at (0,20) width 63: "This text."
+        LayoutNGBlockFlow {p} at (0,56) size 784x20
+          LayoutText {#text} at (0,0) size 59x19
+            text run at (0,0) width 59: "This text."
+        LayoutTable {table} at (0,92) size 111x108
+          LayoutTableSection (anonymous) at (0,0) size 111x108
+            LayoutTableRow {tr} at (0,2) size 111x80
+              LayoutNGTableCell {td} at (2,2) size 107x80 [r=0 c=0 rs=1 cs=1]
+                LayoutTable {table} at (1,1) size 105x78
+                  LayoutTableSection (anonymous) at (0,0) size 105x78
+                    LayoutTableRow {tr} at (0,2) size 105x74
+                      LayoutNGTableCell {td} at (2,2) size 101x74 [r=0 c=0 rs=1 cs=1]
+                        LayoutNGBlockFlow {dl} at (1,17) size 99x40
+                          LayoutNGBlockFlow {dt} at (0,0) size 99x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+                          LayoutNGBlockFlow {dd} at (40,20) size 59x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+            LayoutTableRow {tr} at (0,84) size 111x22
+              LayoutNGTableCell {td} at (2,84) size 107x22 [r=1 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 59x19
+                  text run at (1,1) width 59: "This text."
+        LayoutNGBlockFlow {p} at (0,216) size 784x22.66
+          LayoutInline {sub} at (0,0) size 51x16
+            LayoutText {#text} at (0,6) size 51x16
+              text run at (0,6) width 51: "This text."
+        LayoutNGBlockFlow {p} at (0,254.66) size 784x20
+          LayoutText {#text} at (0,0) size 573x19
+            text run at (0,0) width 573: "...and anything else between the top of the first paragraph and the bottom of this paragraph."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-23-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-23-expected.txt
new file mode 100644
index 0000000..782dd8b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-23-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {html} at (0,0) size 800x76
+    LayoutNGBlockFlow {body} at (8,16) size 784x44
+      LayoutNGBlockFlow {p} at (0,0) size 784x44
+        LayoutButton {button} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+            LayoutText {#text} at (0,0) size 240x16
+              text run at (0,0) width 240: "A button (enabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {br} at (256,1) size 0x0
+        LayoutTextControl {input} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-24-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-24-expected.txt
new file mode 100644
index 0000000..caa3e43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-24-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {html} at (0,0) size 800x76
+    LayoutNGBlockFlow {body} at (8,16) size 784x44
+      LayoutNGBlockFlow {p} at (0,0) size 784x44
+        LayoutButton {button} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+            LayoutText {#text} at (0,0) size 243x16
+              text run at (0,0) width 243: "A button (disabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {br} at (259,1) size 0x0
+        LayoutTextControl {input} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-34-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-34-expected.txt
new file mode 100644
index 0000000..5040f11
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-34-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x136
+  LayoutNGBlockFlow {html} at (0,0) size 800x136
+    LayoutNGBlockFlow {body} at (8,8) size 784x112
+      LayoutNGBlockFlow {div} at (0,0) size 784x112
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 188x19
+            text run at (0,0) width 188: "This div contains 3 addresses:"
+        LayoutNGBlockFlow {address} at (16,20) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 329x19
+            text run at (0,0) width 329: "A first address that should have a green background"
+        LayoutNGBlockFlow {address} at (16,56) size 768x20
+          LayoutText {#text} at (0,0) size 271x19
+            text run at (0,0) width 271: "A second address with normal background"
+        LayoutNGBlockFlow {address} at (16,92) size 768x20
+          LayoutText {#text} at (0,0) size 256x19
+            text run at (0,0) width 256: "A third address with normal background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39a-expected.txt
new file mode 100644
index 0000000..4635f3d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39a-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {html} at (0,0) size 800x289
+    LayoutNGBlockFlow {body} at (8,16) size 784x257
+      LayoutNGBlockFlow {p} at (0,0) size 784x257
+        LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+          LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+            LayoutTextFragment (anonymous) at (0,0) size 20x36
+              text run at (0,0) width 20: "T"
+          LayoutTextFragment (anonymous) at (0,0) size 0x0
+        LayoutText {#text} at (20,13) size 779x243
+          text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39c-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39c-expected.txt
new file mode 100644
index 0000000..4635f3d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-39c-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {html} at (0,0) size 800x289
+    LayoutNGBlockFlow {body} at (8,16) size 784x257
+      LayoutNGBlockFlow {p} at (0,0) size 784x257
+        LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+          LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+            LayoutTextFragment (anonymous) at (0,0) size 20x36
+              text run at (0,0) width 20: "T"
+          LayoutTextFragment (anonymous) at (0,0) size 0x0
+        LayoutText {#text} at (20,13) size 779x243
+          text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+          text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-68-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-68-expected.txt
new file mode 100644
index 0000000..caa3e43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-68-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {html} at (0,0) size 800x76
+    LayoutNGBlockFlow {body} at (8,16) size 784x44
+      LayoutNGBlockFlow {p} at (0,0) size 784x44
+        LayoutButton {button} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+            LayoutText {#text} at (0,0) size 243x16
+              text run at (0,0) width 243: "A button (disabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {br} at (259,1) size 0x0
+        LayoutTextControl {input} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-69-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-69-expected.txt
new file mode 100644
index 0000000..782dd8b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-69-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {html} at (0,0) size 800x76
+    LayoutNGBlockFlow {body} at (8,16) size 784x44
+      LayoutNGBlockFlow {p} at (0,0) size 784x44
+        LayoutButton {button} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+            LayoutText {#text} at (0,0) size 240x16
+              text run at (0,0) width 240: "A button (enabled) with green background"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {br} at (256,1) size 0x0
+        LayoutTextControl {input} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-80-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-80-expected.txt
new file mode 100644
index 0000000..0518f5c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-80-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x144
+  LayoutNGBlockFlow {html} at (0,0) size 800x144
+    LayoutNGBlockFlow {body} at (8,8) size 784x128
+      LayoutNGBlockFlow {div} at (0,0) size 784x128
+        LayoutNGBlockFlow {address} at (16,0) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 329x19
+            text run at (0,0) width 329: "A first address that should have a green background"
+        LayoutNGBlockFlow {address} at (16,36) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 349x19
+            text run at (0,0) width 349: "A second address that should have a green background"
+        LayoutNGBlockFlow {address} at (16,72) size 768x20
+          LayoutText {#text} at (0,0) size 256x19
+            text run at (0,0) width 256: "A third address with normal background"
+        LayoutNGBlockFlow (anonymous) at (0,108) size 784x20
+          LayoutText {#text} at (0,0) size 289x19
+            text run at (0,0) width 289: "This div should have three addresses above it."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-9-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-9-expected.txt
new file mode 100644
index 0000000..934b722c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-9-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x72
+  LayoutNGBlockFlow {html} at (0,0) size 800x72
+    LayoutNGBlockFlow {body} at (8,16) size 784x40
+      LayoutNGBlockFlow {p} at (0,0) size 784x40 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 304x19
+          text run at (0,0) width 304: "This paragraph should have a green background"
+        LayoutBR {br} at (304,0) size 0x0
+        LayoutText {#text} at (0,20) size 266x19
+          text run at (0,20) width 266: "because its title attribute begins with \"foo\""
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-180a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-180a-expected.txt
new file mode 100644
index 0000000..9e60246
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-180a-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x72
+  LayoutNGBlockFlow {test} at (0,0) size 800x72
+    LayoutNGBlockFlow {p} at (0,16) size 800x40 [color=#008000]
+      LayoutBR {br} at (0,0) size 0x0
+      LayoutText {#text} at (0,20) size 163x19
+        text run at (0,20) width 163: "This line should be green."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-18b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-18b-expected.txt
new file mode 100644
index 0000000..5f37b3e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-18b-expected.txt
@@ -0,0 +1,41 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x307
+  LayoutNGBlockFlow {test} at (0,0) size 800x306.66
+    LayoutNGBlockFlow {div} at (0,16) size 800x274.66
+      LayoutNGBlockFlow {p} at (0,0) size 800x40
+        LayoutText {#text} at (0,0) size 749x19
+          text run at (0,0) width 749: "The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:"
+        LayoutBR {br} at (749,0) size 0x0
+        LayoutInline {strong} at (0,0) size 63x19
+          LayoutText {#text} at (0,20) size 63x19
+            text run at (0,20) width 63: "This text."
+      LayoutNGBlockFlow {p} at (0,56) size 800x20
+        LayoutText {#text} at (0,0) size 59x19
+          text run at (0,0) width 59: "This text."
+      LayoutTable {table} at (0,92) size 111x108
+        LayoutTableSection (anonymous) at (0,0) size 111x108
+          LayoutTableRow {tr} at (0,2) size 111x80
+            LayoutNGTableCell {td} at (2,2) size 107x80 [r=0 c=0 rs=1 cs=1]
+              LayoutTable {table} at (1,1) size 105x78
+                LayoutTableSection (anonymous) at (0,0) size 105x78
+                  LayoutTableRow {tr} at (0,2) size 105x74
+                    LayoutNGTableCell {td} at (2,2) size 101x74 [r=0 c=0 rs=1 cs=1]
+                      LayoutNGBlockFlow {dl} at (1,17) size 99x40
+                        LayoutNGBlockFlow {dt} at (0,0) size 99x20
+                          LayoutText {#text} at (0,0) size 59x19
+                            text run at (0,0) width 59: "This text."
+                        LayoutNGBlockFlow {dd} at (40,20) size 59x20
+                          LayoutText {#text} at (0,0) size 59x19
+                            text run at (0,0) width 59: "This text."
+          LayoutTableRow {tr} at (0,84) size 111x22
+            LayoutNGTableCell {td} at (2,84) size 107x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 59x19
+                text run at (1,1) width 59: "This text."
+      LayoutNGBlockFlow {p} at (0,216) size 800x22.66
+        LayoutInline {sub} at (0,0) size 51x16
+          LayoutText {#text} at (0,6) size 51x16
+            text run at (0,6) width 51: "This text."
+      LayoutNGBlockFlow {p} at (0,254.66) size 800x20
+        LayoutText {#text} at (0,0) size 573x19
+          text run at (0,0) width 573: "...and anything else between the top of the first paragraph and the bottom of this paragraph."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-23-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-23-expected.txt
new file mode 100644
index 0000000..6e1d69b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-23-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {test} at (0,0) size 800x76
+    LayoutNGBlockFlow {p} at (0,16) size 800x44
+      LayoutButton {button} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+          LayoutText {#text} at (0,0) size 240x16
+            text run at (0,0) width 240: "A button (enabled) with green background"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {br} at (256,1) size 0x0
+      LayoutTextControl {input} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (2,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-24-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-24-expected.txt
new file mode 100644
index 0000000..34fe666
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-24-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {test} at (0,0) size 800x76
+    LayoutNGBlockFlow {p} at (0,16) size 800x44
+      LayoutButton {button} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+          LayoutText {#text} at (0,0) size 243x16
+            text run at (0,0) width 243: "A button (disabled) with green background"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {br} at (259,1) size 0x0
+      LayoutTextControl {input} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (2,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-34-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-34-expected.txt
new file mode 100644
index 0000000..f05ea722
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-34-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x128
+  LayoutNGBlockFlow {test} at (0,0) size 800x128
+    LayoutNGBlockFlow {div} at (0,0) size 800x112
+      LayoutNGBlockFlow (anonymous) at (0,0) size 800x20
+        LayoutText {#text} at (0,0) size 188x19
+          text run at (0,0) width 188: "This div contains 3 addresses:"
+      LayoutNGBlockFlow {address} at (16,20) size 784x20 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 329x19
+          text run at (0,0) width 329: "A first address that should have a green background"
+      LayoutNGBlockFlow {address} at (16,56) size 784x20
+        LayoutText {#text} at (0,0) size 271x19
+          text run at (0,0) width 271: "A second address with normal background"
+      LayoutNGBlockFlow {address} at (16,92) size 784x20
+        LayoutText {#text} at (0,0) size 256x19
+          text run at (0,0) width 256: "A third address with normal background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39a-expected.txt
new file mode 100644
index 0000000..b45d453e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39a-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {test} at (0,0) size 800x289
+    LayoutNGBlockFlow {p} at (0,16) size 800x257
+      LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+          LayoutTextFragment (anonymous) at (0,0) size 20x36
+            text run at (0,0) width 20: "T"
+        LayoutTextFragment (anonymous) at (0,0) size 0x0
+      LayoutText {#text} at (20,13) size 779x243
+        text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39c-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39c-expected.txt
new file mode 100644
index 0000000..b45d453e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-39c-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x289
+  LayoutNGBlockFlow {test} at (0,0) size 800x289
+    LayoutNGBlockFlow {p} at (0,16) size 800x257
+      LayoutInline {<pseudo:before>} at (0,0) size 20x36 [color=#FF0000]
+        LayoutInline {<pseudo:first-letter>} at (0,0) size 20x36 [color=#00FF00]
+          LayoutTextFragment (anonymous) at (0,0) size 20x36
+            text run at (0,0) width 20: "T"
+        LayoutTextFragment (anonymous) at (0,0) size 0x0
+      LayoutText {#text} at (20,13) size 779x243
+        text run at (20,13) width 731: "his very long paragraph should have a big green first letter T. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,37) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,57) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,77) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,97) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,117) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,137) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,157) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,177) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,197) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,217) width 779: "Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy text."
+        text run at (0,237) width 83: "Dummy text."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-68-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-68-expected.txt
new file mode 100644
index 0000000..34fe666
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-68-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {test} at (0,0) size 800x76
+    LayoutNGBlockFlow {p} at (0,16) size 800x44
+      LayoutButton {button} at (0,0) size 259x22 [color=#808080] [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 243x16
+          LayoutText {#text} at (0,0) size 243x16
+            text run at (0,0) width 243: "A button (disabled) with green background"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {br} at (259,1) size 0x0
+      LayoutTextControl {input} at (0,22) size 250x22 [color=#545454] [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (2,41) size 246x16 scrollWidth 256
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 256x16
+      text run at (0,0) width 256: "a text area (disabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-69-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-69-expected.txt
new file mode 100644
index 0000000..6e1d69b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-69-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {test} at (0,0) size 800x76
+    LayoutNGBlockFlow {p} at (0,16) size 800x44
+      LayoutButton {button} at (0,0) size 256x22 [bgcolor=#00FF00] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 240x16
+          LayoutText {#text} at (0,0) size 240x16
+            text run at (0,0) width 240: "A button (enabled) with green background"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {br} at (256,1) size 0x0
+      LayoutTextControl {input} at (0,22) size 250x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (2,41) size 246x16 scrollWidth 254
+  LayoutBlockFlow {div} at (2,3) size 246x16
+    LayoutText {#text} at (0,0) size 253x16
+      text run at (0,0) width 253: "a text area (enabled) with green background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-80-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-80-expected.txt
new file mode 100644
index 0000000..526c900
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-80-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x128
+  LayoutNGBlockFlow {test} at (0,0) size 800x128
+    LayoutNGBlockFlow {div} at (0,0) size 800x128
+      LayoutNGBlockFlow {address} at (16,0) size 784x20 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 329x19
+          text run at (0,0) width 329: "A first address that should have a green background"
+      LayoutNGBlockFlow {address} at (16,36) size 784x20 [bgcolor=#00FF00]
+        LayoutText {#text} at (0,0) size 349x19
+          text run at (0,0) width 349: "A second address that should have a green background"
+      LayoutNGBlockFlow {address} at (16,72) size 784x20
+        LayoutText {#text} at (0,0) size 256x19
+          text run at (0,0) width 256: "A third address with normal background"
+      LayoutNGBlockFlow (anonymous) at (0,108) size 800x20
+        LayoutText {#text} at (0,0) size 289x19
+          text run at (0,0) width 289: "This div should have three addresses above it."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-9-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-9-expected.txt
new file mode 100644
index 0000000..ed869ae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-9-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x72
+  LayoutNGBlockFlow {test} at (0,0) size 800x72
+    LayoutNGBlockFlow {p} at (0,16) size 800x40 [bgcolor=#00FF00]
+      LayoutText {#text} at (0,0) size 304x19
+        text run at (0,0) width 304: "This paragraph should have a green background"
+      LayoutBR {br} at (304,0) size 0x0
+      LayoutText {#text} at (0,20) size 266x19
+        text run at (0,20) width 266: "because its title attribute begins with \"foo\""
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/caret/caret-position-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/caret/caret-position-expected.txt
new file mode 100644
index 0000000..bb0d7b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/caret/caret-position-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x38
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x38
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x22
+      LayoutText {#text} at (0,1) size 313x19
+        text run at (0,1) width 313: "This tests if the caret position is aligned correctly. "
+      LayoutTextControl {INPUT} at (312.97,0) size 205x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (324,11) size 200x16
+  LayoutBlockFlow {DIV} at (3,3) size 200x16
+caret: position 0 of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5142012-1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5142012-1-expected.txt
new file mode 100644
index 0000000..d0b27b58
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5142012-1-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 766x39
+          text run at (0,0) width 766: "This tests for a bug when removing links from a selection with Unlink. There shouldn't be any links *inside the selection*"
+          text run at (0,20) width 42: "below."
+      LayoutBlockFlow {DIV} at (0,56) size 784x40
+        LayoutBlockFlow {DIV} at (0,0) size 784x20
+          LayoutInline {A} at (0,0) size 23x19 [color=#0000EE]
+            LayoutText {#text} at (0,0) size 23x19
+              text run at (0,0) width 23: "Hel"
+          LayoutInline {SPAN} at (0,0) size 12x19
+            LayoutText {#text} at (23,0) size 12x19
+              text run at (23,0) width 12: "lo"
+        LayoutNGBlockFlow (anonymous) at (0,20) size 769x0
+        LayoutBlockFlow {DIV} at (0,20) size 784x20
+          LayoutInline {SPAN} at (0,0) size 15x19
+            LayoutText {#text} at (0,0) size 15x19
+              text run at (0,0) width 15: "W"
+          LayoutText {#text} at (15,0) size 30x19
+            text run at (15,0) width 30: "orld!"
+selection start: position 0 of child 0 {#text} of child 1 {SPAN} of child 0 {DIV} of child 2 {DIV} of body
+selection end:   position 1 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5190926-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5190926-expected.txt
new file mode 100644
index 0000000..0613afc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/execCommand/5190926-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {OL} at (0,0) size 784x60
+        LayoutListItem {LI} at (40,0) size 744x20
+          LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
+          LayoutInline {U} at (0,0) size 497x19
+            LayoutText {#text} at (0,0) size 497x19
+              text run at (0,0) width 497: "This tests for a crash when making and removing lists from underlined content."
+        LayoutListItem {LI} at (40,20) size 744x20
+          LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
+          LayoutInline {U} at (0,0) size 272x19
+            LayoutText {#text} at (0,0) size 272x19
+              text run at (0,0) width 272: "All three paragraphs should be in list items."
+        LayoutListItem {LI} at (40,40) size 744x20
+          LayoutListMarker (anonymous) at (-16,0) size 16x19: "3"
+          LayoutInline {U} at (0,0) size 222x19
+            LayoutText {#text} at (0,0) size 222x19
+              text run at (0,0) width 222: "And all three should be underlined."
+selection start: position 0 of child 0 {#text} of child 0 {U} of child 0 {LI} of child 0 {OL} of body
+selection end:   position 35 of child 0 {#text} of child 0 {U} of child 2 {LI} of child 0 {OL} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5002441-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5002441-expected.txt
new file mode 100644
index 0000000..561065f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5002441-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 521x19
+          text run at (0,0) width 521: "This tests for a bug where spaces couldn't be inserted before signatures and replies."
+      LayoutBlockFlow {DIV} at (0,36) size 784x40
+        LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+          LayoutText {#text} at (0,0) size 4x19
+            text run at (0,0) width 4: " "
+          LayoutBR {BR} at (4,15) size 0x0
+        LayoutBlockFlow {DIV} at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 345x19
+            text run at (0,0) width 345: "There should be a single space in the paragraph above."
+caret: position 1 of child 0 {#text} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5058163-1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5058163-1-expected.txt
new file mode 100644
index 0000000..00e4bce
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5058163-1-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 759x19
+          text run at (0,0) width 759: "This tests for a bug where hitting return between two tables would add a new paragraph at the end of the editable region."
+      LayoutBlockFlow {DIV} at (0,36) size 784x96
+        LayoutTable {TABLE} at (0,0) size 475x28 [border: (1px solid #AAAAAA)]
+          LayoutTableSection {TBODY} at (1,1) size 473x26
+            LayoutTableRow {TR} at (0,2) size 473x22
+              LayoutTableCell {TD} at (2,2) size 469x22 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 467x19
+                  text run at (1,1) width 467: "There should be two empty paragraphs after this table and before the next."
+        LayoutNGBlockFlow (anonymous) at (0,28) size 769x40
+          LayoutBR {BR} at (0,0) size 0x19
+          LayoutBR {BR} at (0,20) size 0x19
+        LayoutTable {TABLE} at (0,68) size 276x28 [border: (1px solid #AAAAAA)]
+          LayoutTableSection {TBODY} at (1,1) size 274x26
+            LayoutTableRow {TR} at (0,2) size 274x22
+              LayoutTableCell {TD} at (2,2) size 270x22 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 268x19
+                  text run at (1,1) width 268: "And the caret should be in the second one."
+caret: position 0 of child 2 {BR} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5418891-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5418891-expected.txt
new file mode 100644
index 0000000..7aec1989
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/5418891-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 772x39
+          text run at (0,0) width 772: "This tests for a crash when attempting to break a blockquote at the end of its content. The caret should be in the first of two"
+          text run at (0,20) width 358: "empty paragraphs between two pieces of quoted content."
+      LayoutBlockFlow {DIV} at (0,56) size 784x80
+        LayoutBlockFlow {BLOCKQUOTE} at (0,0) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutBlockFlow {DIV} at (7,0) size 777x20
+            LayoutText {#text} at (0,0) size 21x19
+              text run at (0,0) width 21: "foo"
+        LayoutNGBlockFlow (anonymous) at (0,20) size 769x40
+          LayoutBR {BR} at (0,0) size 0x19
+          LayoutBR {BR} at (0,20) size 0x19
+        LayoutBlockFlow {BLOCKQUOTE} at (0,60) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutBlockFlow {DIV} at (7,0) size 777x20
+            LayoutText {#text} at (0,0) size 20x19
+              text run at (0,0) width 20: "bar"
+caret: position 0 of child 2 {BR} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/break-blockquote-after-delete-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/break-blockquote-after-delete-expected.txt
new file mode 100644
index 0000000..860ef57
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/inserting/break-blockquote-after-delete-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 759x19
+          text run at (0,0) width 759: "This tests that the blockquote's typing style doesn't remain after breaking the blockquote and typing in the unquoted area."
+        LayoutBR {BR} at (759,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+      LayoutBlockFlow {DIV} at (0,40) size 784x60
+        LayoutBlockFlow {BLOCKQUOTE} at (0,0) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutText {#text} at (12,0) size 27x19
+            text run at (12,0) width 27: "blue"
+        LayoutNGBlockFlow (anonymous) at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 34x19
+            text run at (0,0) width 34: "black"
+          LayoutBR {BR} at (34,15) size 0x0
+        LayoutBlockFlow {BLOCKQUOTE} at (0,40) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutBlockFlow {DIV} at (12,0) size 772x20
+            LayoutBlockFlow {BLOCKQUOTE} at (0,0) size 772x20 [color=#008000] [border: none (2px solid #008000)]
+              LayoutText {#text} at (12,0) size 35x19
+                text run at (12,0) width 35: "green"
+caret: position 5 of child 2 {#text} of child 4 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5006779-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5006779-expected.txt
new file mode 100644
index 0000000..776cd04
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5006779-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 597x19
+          text run at (0,0) width 597: "This tests copying/pasting less than a paragraph of quoted content. It should not appear quoted."
+      LayoutBlockFlow {DIV} at (0,36) size 784x100
+        LayoutNGBlockFlow (anonymous) at (0,0) size 769x40
+          LayoutText {#text} at (0,0) size 20x19
+            text run at (0,0) width 20: "On"
+          LayoutBR {BR} at (20,15) size 0x0
+          LayoutBR {BR} at (0,20) size 0x19
+        LayoutBlockFlow {BLOCKQUOTE} at (0,40) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutText {#text} at (12,0) size 163x19
+            text run at (12,0) width 163: "On Tuesday, Dave wrote:"
+        LayoutBlockFlow {BLOCKQUOTE} at (0,60) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutBR {BR} at (12,0) size 0x19
+        LayoutBlockFlow {BLOCKQUOTE} at (0,80) size 784x20 [color=#0000FF] [border: none (2px solid #0000FF)]
+          LayoutText {#text} at (12,0) size 82x19
+            text run at (12,0) width 82: "Hello World."
+caret: position 3 of child 0 {#text} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5071074-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5071074-2-expected.txt
new file mode 100644
index 0000000..e8f45b4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/5071074-2-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 541x19
+          text run at (0,0) width 541: "This tests for a bug where copied links wouldn't be pasted as links at certain positions."
+      LayoutBlockFlow {DIV} at (0,36) size 784x40
+        LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+          LayoutText {#text} at (0,0) size 159x19
+            text run at (0,0) width 159: "This should be plain text."
+        LayoutBlockFlow {DIV} at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 159x19
+            text run at (0,0) width 159: "This should be plain text."
+          LayoutInline {A} at (0,0) size 136x19 [color=#0000EE]
+            LayoutText {#text} at (159,0) size 136x19
+              text run at (159,0) width 136: "This should be a link."
+caret: position 22 of child 0 {#text} of child 1 {A} of child 1 {DIV} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/7955-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/7955-expected.txt
new file mode 100644
index 0000000..87a4c6e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/pasteboard/7955-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {DIV} at (0,0) size 784x40
+        LayoutBlockFlow {DIV} at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 21x19
+            text run at (0,0) width 21: "foo"
+        LayoutNGBlockFlow (anonymous) at (0,20) size 769x20
+          LayoutText {#text} at (0,0) size 20x19
+            text run at (0,0) width 20: "bar"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/5131716-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/5131716-2-expected.txt
index ea73131b2..9ff0f4f 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/5131716-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/5131716-2-expected.txt
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   LayoutView at (0,0) size 800x600
-layer at (0,0) size 800x194
-  LayoutNGBlockFlow {HTML} at (0,0) size 800x194
-    LayoutNGBlockFlow {BODY} at (8,8) size 784x178
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
       LayoutNGBlockFlow {P} at (0,0) size 784x40
         LayoutText {#text} at (0,0) size 776x39
           text run at (0,0) width 776: "This tests clicking to place a caret in the padding of an editable region. The eventSender clicks to the left of the ToDo in the"
@@ -14,7 +14,7 @@
         LayoutTable {TABLE} at (26,46) size 92x30 [border: (1px solid #BBBBBB)]
           LayoutTableSection {TBODY} at (1,1) size 90x28
             LayoutTableRow {TR} at (0,2) size 90x24 [border: (1px solid #BBBBBB)]
-              LayoutNGTableCell {TD} at (2,2) size 8x24 [border: (1px solid #BBBBBB)] [r=0 c=0 rs=1 cs=1]
+              LayoutTableCell {TD} at (2,2) size 8x24 [border: (1px solid #BBBBBB)] [r=0 c=0 rs=1 cs=1]
                 LayoutText {#text} at (2,2) size 4x19
                   text run at (2,2) width 4: " "
               LayoutTableCell {TD} at (12,2) size 76x24 [border: (1px solid #BBBBBB)] [r=0 c=1 rs=1 cs=1]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/style/5228141-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/style/5228141-expected.txt
new file mode 100644
index 0000000..a8c0873
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/style/5228141-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 611x19
+          text run at (0,0) width 611: "This tests for a bug where style would not be applied to a selection that ended just after an image."
+      LayoutBlockFlow {DIV} at (0,36) size 784x128
+        LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+          LayoutInline {B} at (0,0) size 0x19
+            LayoutBR {BR} at (0,0) size 0x19
+        LayoutBlockFlow {DIV} at (0,20) size 784x108
+          LayoutInline {B} at (0,0) size 242x19
+            LayoutText {#text} at (0,88) size 166x19
+              text run at (0,88) width 166: "This text should be bold."
+            LayoutImage {IMG} at (166,0) size 76x103
+selection start: position 0 of child 0 {BR} of child 0 {B} of child 2 {DIV} of body
+selection end:   position 1 of child 1 {IMG} of child 0 {B} of child 1 {DIV} of child 2 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-expected.txt
new file mode 100644
index 0000000..21a9706
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 602x19
+          text run at (0,0) width 602: "Div background should animate between red and green. DRT should snapshot when it is green."
+      LayoutNGBlockFlow {DIV} at (0,36) size 200x200 [bgcolor=#0000FF]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-rounded-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-rounded-expected.txt
new file mode 100644
index 0000000..849632e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/animated-gif-as-background-rounded-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 602x19
+          text run at (0,0) width 602: "Div background should animate between red and green. DRT should snapshot when it is green."
+      LayoutNGBlockFlow {DIV} at (0,36) size 200x200
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-repeat-with-background-color-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-repeat-with-background-color-expected.txt
new file mode 100644
index 0000000..c32deb1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-repeat-with-background-color-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x421
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x421
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x405
+      LayoutNGBlockFlow {DIV} at (10,10) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (150,115) size 4x19
+        text run at (150,115) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,10) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (304,115) size 4x19
+        text run at (304,115) width 4: " "
+      LayoutNGBlockFlow {DIV} at (318,10) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (458,115) size 0x0
+      LayoutNGBlockFlow {DIV} at (10,145) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (150,250) size 4x19
+        text run at (150,250) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,145) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (304,250) size 4x19
+        text run at (304,250) width 4: " "
+      LayoutNGBlockFlow {DIV} at (318,145) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (458,250) size 0x0
+      LayoutNGBlockFlow {DIV} at (10,280) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (150,385) size 4x19
+        text run at (150,385) width 4: " "
+      LayoutNGBlockFlow {DIV} at (164,280) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (304,385) size 4x19
+        text run at (304,385) width 4: " "
+      LayoutNGBlockFlow {DIV} at (318,280) size 130x110 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (458,385) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-expected.txt
new file mode 100644
index 0000000..798679e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x381
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x381
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x365
+      LayoutNGBlockFlow {DIV} at (0,0) size 50x50
+      LayoutText {#text} at (50,35) size 4x19
+        text run at (50,35) width 4: " "
+      LayoutNGBlockFlow {DIV} at (54,0) size 50x50
+      LayoutText {#text} at (104,35) size 4x19
+        text run at (104,35) width 4: " "
+      LayoutNGBlockFlow {DIV} at (108,0) size 50x50
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (158,35) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,55) size 100x100
+      LayoutText {#text} at (100,140) size 4x19
+        text run at (100,140) width 4: " "
+      LayoutNGBlockFlow {DIV} at (104,55) size 100x100
+      LayoutText {#text} at (204,140) size 4x19
+        text run at (204,140) width 4: " "
+      LayoutNGBlockFlow {DIV} at (208,55) size 100x100
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (308,140) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,160) size 200x200
+      LayoutText {#text} at (200,345) size 4x19
+        text run at (200,345) width 4: " "
+      LayoutNGBlockFlow {DIV} at (204,160) size 200x200
+      LayoutText {#text} at (404,345) size 4x19
+        text run at (404,345) width 4: " "
+      LayoutNGBlockFlow {DIV} at (408,160) size 200x200
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (608,345) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-zoom-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-zoom-expected.txt
new file mode 100644
index 0000000..286b932
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-zoom-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x189
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x189
+    LayoutNGBlockFlow {BODY} at (4,4) size 792x181
+      LayoutNGBlockFlow {DIV} at (0,0) size 25x25
+      LayoutText {#text} at (25,15) size 2x12
+        text run at (25,15) width 2: " "
+      LayoutNGBlockFlow {DIV} at (27,0) size 25x25
+      LayoutText {#text} at (52,15) size 2x12
+        text run at (52,15) width 2: " "
+      LayoutNGBlockFlow {DIV} at (54,0) size 25x25
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (79,15) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,27) size 50x50
+      LayoutText {#text} at (50,67) size 2x12
+        text run at (50,67) width 2: " "
+      LayoutNGBlockFlow {DIV} at (52,27) size 50x50
+      LayoutText {#text} at (102,67) size 2x12
+        text run at (102,67) width 2: " "
+      LayoutNGBlockFlow {DIV} at (104,27) size 50x50
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (154,67) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,79) size 100x100
+      LayoutText {#text} at (100,169) size 2x12
+        text run at (100,169) width 2: " "
+      LayoutNGBlockFlow {DIV} at (102,79) size 100x100
+      LayoutText {#text} at (202,169) size 2x12
+        text run at (202,169) width 2: " "
+      LayoutNGBlockFlow {DIV} at (204,79) size 100x100
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (304,169) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/box-shadow-radius-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/box-shadow-radius-expected.txt
new file mode 100644
index 0000000..607703eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/box-shadow-radius-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x592
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x592
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {DIV} at (4,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,179) size 4x19
+        text run at (288,179) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (580,179) size 0x0
+      LayoutNGBlockFlow {DIV} at (4,292) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,467) size 4x19
+        text run at (288,467) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,292) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (102,102) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (102,102) size 100x100
+layer at (102,102) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (90,90) size 100x100
+layer at (394,102) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (394,102) size 100x100
+layer at (394,102) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (90,90) size 100x100
+layer at (102,390) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (102,390) size 100x100
+layer at (102,390) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (90,90) size 100x100
+layer at (394,390) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (394,390) size 100x100
+layer at (394,390) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (90,90) size 100x100
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadow-radius-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadow-radius-expected.txt
new file mode 100644
index 0000000..12fc6c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadow-radius-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x594
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x594
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x578
+      LayoutNGBlockFlow {DIV} at (4,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,269) size 4x19
+        text run at (288,269) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (580,269) size 0x0
+      LayoutNGBlockFlow {DIV} at (4,293) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,558) size 4x19
+        text run at (288,558) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,293) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (12,12) size 280x280
+  LayoutNGBlockFlow (positioned) {DIV} at (12,12) size 280x280 [border: (10px solid #00FF000D)]
+layer at (12,12) size 280x280
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 280x280
+layer at (304,12) size 280x280
+  LayoutNGBlockFlow (positioned) {DIV} at (304,12) size 280x280 [border: (20px solid #00FF000D)]
+layer at (304,12) size 280x280
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 280x280
+layer at (12,301) size 280x280
+  LayoutNGBlockFlow (positioned) {DIV} at (12,301) size 280x280 [border: (50px solid #00FF000D)]
+layer at (12,301) size 280x280
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 280x280
+layer at (304,301) size 280x280
+  LayoutNGBlockFlow (positioned) {DIV} at (304,301) size 280x280 [border: (90px solid #00FF000D)]
+layer at (304,301) size 280x280
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 280x280
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadows-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadows-expected.txt
new file mode 100644
index 0000000..78b7d2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadows-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x577
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x577
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x561
+      LayoutText {#text} at (222,167) size 4x19
+        text run at (222,167) width 4: " "
+      LayoutText {#text} at (448,167) size 4x19
+        text run at (448,167) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (674,167) size 0x0
+      LayoutText {#text} at (222,354) size 4x19
+        text run at (222,354) width 4: " "
+      LayoutText {#text} at (448,354) size 4x19
+        text run at (448,354) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (674,354) size 0x0
+      LayoutText {#text} at (222,541) size 4x19
+        text run at (222,541) width 4: " "
+      LayoutText {#text} at (448,541) size 4x19
+        text run at (448,541) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (18,18) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (10,10) size 202x162 [border: (1px solid #000000)]
+layer at (244,18) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (236,10) size 202x162 [border: (1px solid #000000)]
+layer at (470,18) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (462,10) size 202x162 [border: (1px solid #000000)]
+layer at (18,205) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (10,197) size 202x162 [border: (1px solid #000000)]
+layer at (244,205) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (236,197) size 202x162 [border: (1px solid #000000)]
+layer at (470,205) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (462,197) size 202x162 [border: (1px solid #000000)]
+layer at (18,392) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (10,384) size 202x162 [border: (1px solid #000000)]
+layer at (244,392) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (236,384) size 202x162 [border: (1px solid #000000)]
+layer at (470,392) size 202x162
+  LayoutNGBlockFlow (relative positioned) {DIV} at (462,384) size 202x162 [border: (1px solid #000000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/scaled-box-shadow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/scaled-box-shadow-expected.txt
new file mode 100644
index 0000000..325759c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/scaled-box-shadow-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x592
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x592
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {DIV} at (4,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,129) size 4x19
+        text run at (288,129) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,4) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (580,129) size 0x0
+      LayoutNGBlockFlow {DIV} at (4,292) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (288,417) size 4x19
+        text run at (288,417) width 4: " "
+      LayoutNGBlockFlow {DIV} at (296,292) size 280x280
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (52,52) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (40,40) size 100x100
+layer at (344,52) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (40,40) size 100x100
+layer at (52,340) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (40,40) size 100x100
+layer at (344,340) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (40,40) size 100x100
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/compact/003-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/compact/003-expected.txt
new file mode 100644
index 0000000..6958bfeb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/compact/003-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {DL} at (0,0) size 784x40
+        LayoutNGBlockFlow {DT} at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 60x19
+            text run at (0,0) width 60: "Line One"
+        LayoutNGBlockFlow {DT} at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 33x19
+            text run at (0,0) width 33: "Line "
+          LayoutInline {SPAN} at (0,0) size 30x19
+            LayoutText {#text} at (32,0) size 30x19
+              text run at (32,0) width 30: "Two"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/010-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/010-expected.txt
new file mode 100644
index 0000000..913cfcb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/010-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x36
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x36
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x20
+      LayoutInline {A} at (0,0) size 117x19 [color=#0000EE]
+        LayoutInline {<pseudo:before>} at (0,0) size 10x10
+          LayoutImage (anonymous) at (0,5) size 10x10
+        LayoutText {#text} at (10,0) size 107x19
+          text run at (10,0) width 107: "What's going on."
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/inline-display-types-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/inline-display-types-expected.txt
new file mode 100644
index 0000000..6af114b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/inline-display-types-expected.txt
@@ -0,0 +1,57 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {H1} at (0,0) size 784x37
+        LayoutText {#text} at (0,0) size 90x36
+          text run at (0,0) width 90: "Blocks"
+      LayoutNGBlockFlow {DIV} at (0,58.44) size 784x20
+        LayoutInline {<pseudo:before>} at (0,0) size 34x19
+          LayoutTextFragment (anonymous) at (0,0) size 34x19
+            text run at (0,0) width 34: "Test: "
+        LayoutText {#text} at (33,0) size 47x19
+          text run at (33,0) width 47: "content"
+      LayoutNGBlockFlow {DIV} at (0,78.44) size 784x20
+        LayoutNGBlockFlow {<pseudo:before>} at (0,0) size 29.89x20
+          LayoutTextFragment (anonymous) at (0,0) size 30x19
+            text run at (0,0) width 30: "Test:"
+        LayoutText {#text} at (29,0) size 47x19
+          text run at (29,0) width 47: "content"
+      LayoutNGBlockFlow {DIV} at (0,98.44) size 784x20
+        LayoutTable {<pseudo:before>} at (0,0) size 30x20
+          LayoutTableSection (anonymous) at (0,0) size 30x20
+            LayoutTableRow (anonymous) at (0,0) size 30x20
+              LayoutTableCell (anonymous) at (0,0) size 30x20 [r=0 c=0 rs=1 cs=1]
+                LayoutTextFragment (anonymous) at (0,0) size 30x19
+                  text run at (0,0) width 30: "Test:"
+        LayoutText {#text} at (30,0) size 46x19
+          text run at (30,0) width 46: "content"
+      LayoutNGBlockFlow {H1} at (0,139.88) size 784x37
+        LayoutText {#text} at (0,0) size 92x36
+          text run at (0,0) width 92: "Inlines"
+      LayoutNGBlockFlow (anonymous) at (0,198.31) size 784x60
+        LayoutInline {SPAN} at (0,0) size 80x19
+          LayoutInline {<pseudo:before>} at (0,0) size 34x19
+            LayoutTextFragment (anonymous) at (0,0) size 34x19
+              text run at (0,0) width 34: "Test: "
+          LayoutText {#text} at (33,0) size 47x19
+            text run at (33,0) width 47: "content"
+        LayoutBR {BR} at (79,15) size 0x0
+        LayoutInline {SPAN} at (0,0) size 76x20
+          LayoutNGBlockFlow {<pseudo:before>} at (0,20) size 29.89x20
+            LayoutTextFragment (anonymous) at (0,0) size 30x19
+              text run at (0,0) width 30: "Test:"
+          LayoutText {#text} at (29,20) size 47x19
+            text run at (29,20) width 47: "content"
+        LayoutBR {BR} at (75,35) size 0x0
+        LayoutInline {SPAN} at (0,0) size 76x20
+          LayoutTable {<pseudo:before>} at (0,40) size 30x20
+            LayoutTableSection (anonymous) at (0,0) size 30x20
+              LayoutTableRow (anonymous) at (0,0) size 30x20
+                LayoutTableCell (anonymous) at (0,0) size 30x20 [r=0 c=0 rs=1 cs=1]
+                  LayoutTextFragment (anonymous) at (0,0) size 30x19
+                    text run at (0,0) width 30: "Test:"
+          LayoutText {#text} at (30,40) size 46x19
+            text run at (30,40) width 46: "content"
+        LayoutBR {BR} at (76,55) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/no-openclose-quote-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/no-openclose-quote-expected.txt
new file mode 100644
index 0000000..480720b4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/no-openclose-quote-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutInline {<pseudo:before>} at (0,0) size 8x19
+          LayoutTextFragment (anonymous) at (0,0) size 8x19
+            text run at (0,0) width 8: "*"
+          LayoutQuote (anonymous) at (0,0) size 0x0
+            LayoutTextFragment (anonymous) at (0,0) size 0x0
+        LayoutText {#text} at (8,0) size 425x19
+          text run at (8,0) width 425: "This is some text. It should have a single asterisk before and after it."
+        LayoutInline {<pseudo:after>} at (0,0) size 8x19
+          LayoutTextFragment (anonymous) at (433,0) size 8x19
+            text run at (433,0) width 8: "*"
+          LayoutQuote (anonymous) at (0,0) size 0x0
+            LayoutTextFragment (anonymous) at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/wbr-with-before-content-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/wbr-with-before-content-expected.txt
new file mode 100644
index 0000000..f4c0f97a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/wbr-with-before-content-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 186x19
+          text run at (0,0) width 186: "You should not see any cyan."
+      LayoutNGBlockFlow {DIV} at (0,20) size 202x27 [bgcolor=#00FFFF] [border: (1px solid #777777)]
+        LayoutNGBlockFlow {A} at (1,1) size 200x25 [color=#0000EE] [bgcolor=#FFFFFF]
+          LayoutText {#text} at (0,3) size 21x19
+            text run at (0,3) width 21: "foo"
+          LayoutWordBreak {WBR} at (21,3) size 0x0
+            text run at (21,3) width 0: "\x{200B}"
+          LayoutText {#text} at (21,3) size 20x19
+            text run at (21,3) width 20: "bar"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/color-correction-on-text-shadow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/color-correction-on-text-shadow-expected.txt
new file mode 100644
index 0000000..a0657fd4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/color-correction-on-text-shadow-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 746x39
+          text run at (0,0) width 746: "This is subtle, but the shadow should match the color of the top H and not the color of the bottom H. The top H and its"
+          text run at (0,20) width 285: "shadow are both color-corrected from sRGB."
+      LayoutNGBlockFlow (anonymous) at (0,56) size 784x236
+        LayoutInline {SPAN} at (0,0) size 78x114 [color=#560063]
+          LayoutText {#text} at (0,2) size 78x114
+            text run at (0,2) width 78: "H"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (78,94) size 0x0
+        LayoutInline {SPAN} at (0,0) size 78x114 [color=#560063]
+          LayoutText {#text} at (0,120) size 78x114
+            text run at (0,120) width 78: "H"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/compare-content-style-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/compare-content-style-expected.txt
new file mode 100644
index 0000000..0cf0469
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/compare-content-style-expected.txt
@@ -0,0 +1,54 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x256
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x256
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x232
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x120
+        LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+        LayoutNGBlockFlow {DIV} at (0,20) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+        LayoutNGBlockFlow {DIV} at (0,40) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+        LayoutNGBlockFlow {DIV} at (0,60) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+        LayoutNGBlockFlow {DIV} at (0,80) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+        LayoutNGBlockFlow {DIV} at (0,100) size 784x20
+          LayoutInline {<pseudo:before>} at (0,0) size 38x19
+            LayoutTextFragment (anonymous) at (0,0) size 38x19
+              text run at (0,0) width 38: "PASS"
+      LayoutNGBlockFlow {DIV} at (0,136) size 784x96
+        LayoutNGBlockFlow {P} at (0,0) size 784x20
+          LayoutInline {A} at (0,0) size 671x19 [color=#0000EE]
+            LayoutText {#text} at (0,0) size 671x19
+              text run at (0,0) width 671: "Bug 23741: StyleRareNonInheritedData::operator==() should not compare ContentData objects by pointer"
+        LayoutNGBlockFlow {OL} at (0,36) size 784x60
+          LayoutNGListItem {LI} at (40,0) size 744x20
+            LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+              LayoutText (anonymous) at (0,0) size 16x19
+                text run at (0,0) width 16: "1. "
+            LayoutText {#text} at (0,0) size 344x19
+              text run at (0,0) width 344: "All lines above should be \"PASS\" on initial page load."
+          LayoutNGListItem {LI} at (40,20) size 744x20
+            LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+              LayoutText (anonymous) at (0,0) size 16x19
+                text run at (0,0) width 16: "2. "
+            LayoutText {#text} at (0,0) size 140x19
+              text run at (0,0) width 140: "Reload the page once."
+          LayoutNGListItem {LI} at (40,40) size 744x20
+            LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+              LayoutText (anonymous) at (0,0) size 16x19
+                text run at (0,0) width 16: "3. "
+            LayoutText {#text} at (0,0) size 246x19
+              text run at (0,0) width 246: "All lines above should still be \"PASS\"."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/continuationCrash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/continuationCrash-expected.txt
new file mode 100644
index 0000000..718a670
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/continuationCrash-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutInline {SPAN} at (0,0) size 0x0
+          LayoutInline {SPAN} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {H4} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 81x19
+          text run at (0,0) width 81: "Instructions"
+      LayoutNGBlockFlow {P} at (0,41.27) size 784x20
+        LayoutText {#text} at (0,0) size 176x19
+          text run at (0,0) width 176: "Click the following buttons."
+      LayoutNGBlockFlow {OL} at (0,77.27) size 784x182
+        LayoutNGListItem {LI} at (40,0) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "1. "
+          LayoutText {#text} at (0,0) size 193x19
+            text run at (0,0) width 193: "Start with the outmost left one."
+        LayoutNGListItem {LI} at (40,20) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "2. "
+          LayoutText {#text} at (0,0) size 135x19
+            text run at (0,0) width 135: "Click the middle one."
+        LayoutNGListItem {LI} at (40,40) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "3. "
+          LayoutText {#text} at (0,0) size 265x19
+            text run at (0,0) width 265: "(The ouline will not be updated correctly.)"
+        LayoutNGListItem {LI} at (40,60) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "4. "
+          LayoutText {#text} at (0,0) size 138x19
+            text run at (0,0) width 138: "Click the right button."
+        LayoutNGListItem {LI} at (40,80) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "5. "
+          LayoutText {#text} at (0,0) size 465x19
+            text run at (0,0) width 465: "This will crash Safari 1.3 (v176 and v170, no other configurations tested)."
+        LayoutNGListItem {LI} at (40,100) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "6. "
+          LayoutText {#text} at (0,0) size 294x19
+            text run at (0,0) width 294: "The combination 2. 1. 3. will also crash Safari."
+        LayoutNGListItem {LI} at (40,120) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "7. "
+          LayoutText {#text} at (0,0) size 447x19
+            text run at (0,0) width 447: "1. 3. will not crash Safari. (But the outline should vanish. Shouldn't it?)"
+        LayoutNGListItem {LI} at (40,140) size 744x20
+          LayoutNGListMarker (anonymous) at (-16,0) size 16x20
+            LayoutText (anonymous) at (0,0) size 16x19
+              text run at (0,0) width 16: "8. "
+          LayoutText {#text} at (0,0) size 201x19
+            text run at (0,0) width 201: "2. 3. will not crash Safari either."
+        LayoutNGBlockFlow (anonymous) at (40,160) size 744x22
+          LayoutButton {INPUT} at (0,0) size 144x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+            LayoutNGBlockFlow (anonymous) at (8,3) size 128x16
+              LayoutText {#text} at (0,0) size 128x16
+                text run at (0,0) width 128: "1. Set outline property"
+          LayoutText {#text} at (144,1) size 4x19
+            text run at (144,1) width 4: " "
+          LayoutButton {INPUT} at (148,0) size 147x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+            LayoutNGBlockFlow (anonymous) at (8,3) size 131x16
+              LayoutText {#text} at (0,0) size 131x16
+                text run at (0,0) width 131: "2. Set display property"
+          LayoutText {#text} at (295,1) size 4x19
+            text run at (295,1) width 4: " "
+          LayoutButton {INPUT} at (299,0) size 160x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+            LayoutNGBlockFlow (anonymous) at (8,3) size 144x16
+              LayoutText {#text} at (0,0) size 144x16
+                text run at (0,0) width 144: "3. Replace span-element"
+          LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-inline-line-height-first-line-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-inline-line-height-first-line-expected.txt
new file mode 100644
index 0000000..6c1b60f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-inline-line-height-first-line-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x256 layerType: background only
+layer at (8,8) size 784x240
+  LayoutNGBlockFlow (positioned) zI: -1 {DIV} at (0,0) size 784x240 [bgcolor=#FF0000]
+    LayoutText zI: -1 {#text} at (0,112) size 16x16
+      text run at (0,112) width 16: "X"
+layer at (0,0) size 800x256 layerType: foreground only
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x256
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x240
+layer at (8,8) size 784x240
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 784x240
+    LayoutNGBlockFlow {DIV} at (0,0) size 784x240 [bgcolor=#00FF00]
+      LayoutInline {SPAN} at (0,0) size 0x0
+      LayoutBR {BR} at (0,32) size 0x0
+      LayoutInline {SPAN} at (0,0) size 0x0
+      LayoutText {#text} at (0,152) size 16x16
+        text run at (0,152) width 16: "X"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/font-smoothing-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/font-smoothing-expected.txt
new file mode 100644
index 0000000..f9666a67
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/font-smoothing-expected.txt
@@ -0,0 +1,31 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutInline {SPAN} at (0,0) size 303x22
+        LayoutText {#text} at (0,0) size 303x22
+          text run at (0,0) width 303: "Hello. This is absolutely regular text."
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (302,17) size 0x0
+      LayoutInline {SPAN} at (0,0) size 780x22
+        LayoutText {#text} at (0,23) size 780x22
+          text run at (0,23) width 780: "Hello. This is text with -webkit-font-smoothing:auto. It should look like absolutely regular text."
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (779,40) size 0x0
+      LayoutInline {SPAN} at (0,0) size 437x22
+        LayoutText {#text} at (0,46) size 437x22
+          text run at (0,46) width 437: "Hello. This is text with -webkit-font-smoothing:none."
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (436,63) size 0x0
+      LayoutInline {SPAN} at (0,0) size 486x22
+        LayoutText {#text} at (0,69) size 486x22
+          text run at (0,69) width 486: "Hello. This is text with -webkit-font-smoothing:antialiased."
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (485,86) size 0x0
+      LayoutInline {SPAN} at (0,0) size 716x45
+        LayoutText {#text} at (0,92) size 716x45
+          text run at (0,92) width 716: "Hello. This is text with -webkit-font-smoothing:subpixel-antialiased. It should look like"
+          text run at (0,115) width 188: "absolutely regular text."
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (188,132) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/h1-in-section-elements-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/h1-in-section-elements-expected.txt
new file mode 100644
index 0000000..baf32fc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/h1-in-section-elements-expected.txt
@@ -0,0 +1,216 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x417
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x417
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x188
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 439x19
+          text run at (0,0) width 439: "For each of pairs, the first one and the second one should be identical."
+      LayoutTable (floating) {TABLE} at (0,36) size 152x365
+        LayoutTableSection {TBODY} at (0,0) size 152x365
+          LayoutTableRow {TR} at (0,2) size 152x75
+            LayoutNGTableCell {TD} at (2,2) size 73x74.81 [r=0 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {SECTION} at (1,1) size 71x72.81
+                LayoutNGBlockFlow {H1} at (0,21.91) size 71x29 [border: (1px solid #00FF00)]
+                  LayoutText {#text} at (1,1) size 69x26
+                    text run at (1,1) width 69: "MMM"
+            LayoutNGTableCell {TD} at (77,2) size 73x74.81 [r=0 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H2} at (1,22.91) size 71x29 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 69x26
+                  text run at (1,1) width 69: "MMM"
+          LayoutTableRow {TR} at (0,79) size 152x68
+            LayoutNGTableCell {TD} at (2,79) size 73x68.44 [r=1 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {ARTICLE} at (1,1) size 71x66.44
+                LayoutNGBlockFlow {SECTION} at (0,0) size 71x66.44
+                  LayoutNGBlockFlow {H1} at (0,20.72) size 71x25 [border: (1px solid #00FF00)]
+                    LayoutText {#text} at (1,1) size 54x22
+                      text run at (1,1) width 54: "MMM"
+            LayoutNGTableCell {TD} at (77,79) size 73x68.44 [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H3} at (1,21.72) size 71x25 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 54x22
+                  text run at (1,1) width 54: "MMM"
+          LayoutTableRow {TR} at (0,149) size 152x71
+            LayoutNGTableCell {TD} at (2,149) size 73x70.53 [r=2 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {NAV} at (1,1) size 71x68.53
+                LayoutNGBlockFlow {ARTICLE} at (0,0) size 71x68.53
+                  LayoutNGBlockFlow {SECTION} at (0,0) size 71x68.53
+                    LayoutNGBlockFlow {H1} at (0,23.27) size 71x22 [border: (1px solid #00FF00)]
+                      LayoutText {#text} at (1,1) size 45x19
+                        text run at (1,1) width 45: "MMM"
+            LayoutNGTableCell {TD} at (77,149) size 73x70.53 [r=2 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H4} at (1,24.27) size 71x22 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 45x19
+                  text run at (1,1) width 45: "MMM"
+          LayoutTableRow {TR} at (0,222) size 152x68
+            LayoutNGTableCell {TD} at (2,222) size 73x68.34 [r=3 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {NAV} at (1,1) size 71x66.34
+                LayoutNGBlockFlow {ASIDE} at (0,0) size 71x66.34
+                  LayoutNGBlockFlow {ARTICLE} at (0,0) size 71x66.34
+                    LayoutNGBlockFlow {SECTION} at (0,0) size 71x66.34
+                      LayoutNGBlockFlow {H1} at (0,24.17) size 71x18 [border: (1px solid #00FF00)]
+                        LayoutText {#text} at (1,1) size 36x15
+                          text run at (1,1) width 36: "MMM"
+            LayoutNGTableCell {TD} at (77,222) size 73x68.34 [r=3 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H5} at (1,25.17) size 71x18 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 36x15
+                  text run at (1,1) width 36: "MMM"
+          LayoutTableRow {TR} at (0,292) size 152x71
+            LayoutNGTableCell {TD} at (2,292) size 73x70.94 [r=4 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {SECTION} at (1,1) size 71x68.94
+                LayoutNGBlockFlow {DIV} at (0,0) size 71x68.94
+                  LayoutNGBlockFlow {NAV} at (0,0) size 71x68.94
+                    LayoutNGBlockFlow {ASIDE} at (0,0) size 71x68.94
+                      LayoutNGBlockFlow {ARTICLE} at (0,0) size 71x68.94
+                        LayoutNGBlockFlow {SECTION} at (0,0) size 71x68.94
+                          LayoutNGBlockFlow {H1} at (0,26.97) size 71x15 [border: (1px solid #00FF00)]
+                            LayoutText {#text} at (1,1) size 30x13
+                              text run at (1,1) width 30: "MMM"
+                  LayoutNGBlockFlow {DIV} at (0,68.94) size 71x0
+            LayoutNGTableCell {TD} at (77,292) size 73x70.94 [r=4 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H6} at (1,27.97) size 71x15 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 30x13
+                  text run at (1,1) width 30: "MMM"
+      LayoutTable {TABLE} at (152,36) size 365x152
+        LayoutTableSection {TBODY} at (0,0) size 365x152
+          LayoutTableRow {TR} at (2,0) size 75x152
+            LayoutNGTableCell {TD} at (2,2) size 74.81x73 [r=0 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {SECTION} at (1,1) size 72.81x71
+                LayoutNGBlockFlow {H1} at (21.91,0) size 29x71 [border: (1px solid #00FF00)]
+                  LayoutText {#text} at (2,1) size 26x69
+                    text run at (2,1) width 69: "MMM"
+            LayoutNGTableCell {TD} at (2,77) size 74.81x73 [r=0 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H2} at (22.91,1) size 29x71 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (2,1) size 26x69
+                  text run at (2,1) width 69: "MMM"
+          LayoutTableRow {TR} at (79,0) size 68x152
+            LayoutNGTableCell {TD} at (79,2) size 68.44x73 [r=1 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {ARTICLE} at (1,1) size 66.44x71
+                LayoutNGBlockFlow {SECTION} at (0,0) size 66.44x71
+                  LayoutNGBlockFlow {H1} at (20.72,0) size 25x71 [border: (1px solid #00FF00)]
+                    LayoutText {#text} at (2,1) size 22x54
+                      text run at (2,1) width 54: "MMM"
+            LayoutNGTableCell {TD} at (79,77) size 68.44x73 [r=1 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H3} at (21.72,1) size 25x71 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (2,1) size 22x54
+                  text run at (2,1) width 54: "MMM"
+          LayoutTableRow {TR} at (149,0) size 71x152
+            LayoutNGTableCell {TD} at (149,2) size 70.53x73 [r=2 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {NAV} at (1,1) size 68.53x71
+                LayoutNGBlockFlow {ARTICLE} at (0,0) size 68.53x71
+                  LayoutNGBlockFlow {SECTION} at (0,0) size 68.53x71
+                    LayoutNGBlockFlow {H1} at (23.27,0) size 22x71 [border: (1px solid #00FF00)]
+                      LayoutText {#text} at (2,1) size 19x45
+                        text run at (2,1) width 45: "MMM"
+            LayoutNGTableCell {TD} at (149,77) size 70.53x73 [r=2 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H4} at (24.27,1) size 22x71 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (2,1) size 19x45
+                  text run at (2,1) width 45: "MMM"
+          LayoutTableRow {TR} at (222,0) size 68x152
+            LayoutNGTableCell {TD} at (222,2) size 68.34x73 [r=3 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {NAV} at (1,1) size 66.34x71
+                LayoutNGBlockFlow {ASIDE} at (0,0) size 66.34x71
+                  LayoutNGBlockFlow {ARTICLE} at (0,0) size 66.34x71
+                    LayoutNGBlockFlow {SECTION} at (0,0) size 66.34x71
+                      LayoutNGBlockFlow {H1} at (24.17,0) size 18x71 [border: (1px solid #00FF00)]
+                        LayoutText {#text} at (2,1) size 15x36
+                          text run at (2,1) width 36: "MMM"
+            LayoutNGTableCell {TD} at (222,77) size 68.34x73 [r=3 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H5} at (25.17,1) size 18x71 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (2,1) size 15x36
+                  text run at (2,1) width 36: "MMM"
+          LayoutTableRow {TR} at (292,0) size 71x152
+            LayoutNGTableCell {TD} at (292,2) size 70.94x73 [r=4 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {SECTION} at (1,1) size 68.94x71
+                LayoutNGBlockFlow {DIV} at (0,0) size 68.94x71
+                  LayoutNGBlockFlow {NAV} at (0,0) size 68.94x71
+                    LayoutNGBlockFlow {ASIDE} at (0,0) size 68.94x71
+                      LayoutNGBlockFlow {ARTICLE} at (0,0) size 68.94x71
+                        LayoutNGBlockFlow {SECTION} at (0,0) size 68.94x71
+                          LayoutNGBlockFlow {H1} at (26.97,0) size 15x71 [border: (1px solid #00FF00)]
+                            LayoutText {#text} at (1,1) size 13x30
+                              text run at (1,1) width 30: "MMM"
+                  LayoutNGBlockFlow {DIV} at (68.94,0) size 0x71
+            LayoutNGTableCell {TD} at (292,77) size 70.94x73 [r=4 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {H6} at (27.97,1) size 15x71 [border: (1px solid #00FF00)]
+                LayoutText {#text} at (1,1) size 13x30
+                  text run at (1,1) width 30: "MMM"
+layer at (11,55) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,126) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,70.81) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,55) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,126) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,71.81) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,132) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,196) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,64.44) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,132) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,196) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,65.44) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,202) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,269) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,66.53) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,202) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,269) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,67.53) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,275) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,339) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,64.34) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,275) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,339) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,65.34) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,345) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (11,412) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,66.94) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,345) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (86,412) size 71x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,67.94) size 71x2 [border: (1px inset #EEEEEE)]
+layer at (520,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (449,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (70.81,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (520,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (449,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (71.81,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (443,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (379,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (64.44,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (443,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (379,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (65.44,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (373,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (306,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (66.53,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (373,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (306,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (67.53,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (300,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (236,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (64.34,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (300,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (236,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (65.34,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (230,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (163,55) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (66.94,0) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (230,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (1,1) size 2x71 [border: (1px inset #EEEEEE)]
+layer at (163,130) size 2x71 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (67.94,1) size 2x71 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/hsl-color-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/hsl-color-expected.txt
new file mode 100644
index 0000000..f61eccb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/hsl-color-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1366
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1366 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1365.50
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1336.06
+      LayoutNGBlockFlow {H1} at (0,0) size 769x37 [color=#FF0000]
+        LayoutText {#text} at (0,0) size 525x36
+          text run at (0,0) width 525: "This should be red: hsl(0, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,58.44) size 769x37 [color=#00FF00]
+        LayoutText {#text} at (0,0) size 587x36
+          text run at (0,0) width 587: "This should be green: hsl(120, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,116.88) size 769x37 [color=#00FFFF]
+        LayoutText {#text} at (0,0) size 579x36
+          text run at (0,0) width 579: "This should be aqua: hsl(180, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,175.31) size 769x37 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 570x36
+          text run at (0,0) width 570: "This should be blue: hsl(240, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,233.75) size 769x37 [color=#80FF80]
+        LayoutText {#text} at (0,0) size 658x36
+          text run at (0,0) width 658: "This should be light green: hsl(120, 100%, 75%)"
+      LayoutNGBlockFlow {H1} at (0,292.19) size 769x37 [color=#008000]
+        LayoutText {#text} at (0,0) size 661x36
+          text run at (0,0) width 661: "This should be dark green: hsl(120, 100%, 25%)"
+      LayoutNGBlockFlow {H1} at (0,350.63) size 769x37 [color=#40BF40]
+        LayoutText {#text} at (0,0) size 659x36
+          text run at (0,0) width 659: "This should be pastel green: hsl(120, 50%, 50%)"
+      LayoutNGBlockFlow (anonymous) at (0,409.06) size 769x40
+        LayoutInline {B} at (0,0) size 140x19
+          LayoutText {#text} at (0,0) size 140x19
+            text run at (0,0) width 140: "Out of bounds cases:"
+        LayoutBR {BR} at (140,15) size 0x0
+        LayoutText {#text} at (0,20) size 404x19
+          text run at (0,20) width 404: "Check percentages larger than 100%, should be limited to 100%"
+      LayoutNGBlockFlow {H1} at (0,470.50) size 769x37 [color=#00FF00]
+        LayoutText {#text} at (0,0) size 587x36
+          text run at (0,0) width 587: "This should be green: hsl(120, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,528.94) size 769x37 [color=#00FF00]
+        LayoutText {#text} at (0,0) size 638x36
+          text run at (0,0) width 638: "This should be green too: hsl(120, 200%, 50%)"
+      LayoutNGBlockFlow (anonymous) at (0,587.38) size 769x20
+        LayoutText {#text} at (0,0) size 470x19
+          text run at (0,0) width 470: "Check percentages less than 0% (negative values), should be limited to 0%"
+      LayoutNGBlockFlow {H1} at (0,628.81) size 769x37 [color=#808080]
+        LayoutText {#text} at (0,0) size 539x36
+          text run at (0,0) width 539: "This should be grey: hsl(120, 0%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,687.25) size 769x37 [color=#808080]
+        LayoutText {#text} at (0,0) size 639x36
+          text run at (0,0) width 639: "This should be grey, too: hsl(120, -100%, 50%)"
+      LayoutNGBlockFlow (anonymous) at (0,745.69) size 769x40
+        LayoutText {#text} at (0,0) size 754x39
+          text run at (0,0) width 754: "Check Hue values that are larger than 360, should be normalized back to a value between 0 and 360. As Hue values are"
+          text run at (0,20) width 451: "in degrees, there is no maximum like percentages, they are loop around."
+      LayoutNGBlockFlow {H1} at (0,807.13) size 769x37 [color=#008000]
+        LayoutText {#text} at (0,0) size 661x36
+          text run at (0,0) width 661: "This should be dark green: hsl(120, 100%, 25%)"
+      LayoutNGBlockFlow {H1} at (0,865.56) size 769x37 [color=#008000]
+        LayoutText {#text} at (0,0) size 720x36
+          text run at (0,0) width 720: "This should be dark green, too: hsl(480, 100%, 25%)"
+      LayoutNGBlockFlow (anonymous) at (0,924) size 769x20
+        LayoutText {#text} at (0,0) size 258x19
+          text run at (0,0) width 258: "Check Hue values with a negative angle."
+      LayoutNGBlockFlow {H1} at (0,965.44) size 769x37 [color=#80FF80]
+        LayoutText {#text} at (0,0) size 658x36
+          text run at (0,0) width 658: "This should be light green: hsl(120, 100%, 75%)"
+      LayoutNGBlockFlow {H1} at (0,1023.88) size 769x37 [color=#80FF80]
+        LayoutText {#text} at (0,0) size 728x36
+          text run at (0,0) width 728: "This should be light green, too: hsl(-240, 100%, 75%)"
+      LayoutNGBlockFlow {H1} at (0,1082.31) size 769x37 [color=#80FF80]
+        LayoutText {#text} at (0,0) size 728x36
+          text run at (0,0) width 728: "This should be light green, too: hsl(-600, 100%, 75%)"
+      LayoutNGBlockFlow (anonymous) at (0,1140.75) size 769x20
+        LayoutText {#text} at (0,0) size 295x19
+          text run at (0,0) width 295: "Check Hues values with a floating point angle."
+      LayoutNGBlockFlow {H1} at (0,1182.19) size 769x37 [color=#FF0000]
+        LayoutText {#text} at (0,0) size 549x36
+          text run at (0,0) width 549: "This should be red: hsl(0.0, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,1240.63) size 769x37 [color=#00FF00]
+        LayoutText {#text} at (0,0) size 627x36
+          text run at (0,0) width 627: "This should be green: hsl(120.00, 100%, 50%)"
+      LayoutNGBlockFlow {H1} at (0,1299.06) size 769x37 [color=#0000FF]
+        LayoutText {#text} at (0,0) size 626x36
+          text run at (0,0) width 626: "This should be blue: hsl(240.000, 100%, 50%)"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/layerZOrderCrash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/layerZOrderCrash-expected.txt
new file mode 100644
index 0000000..9c9bb3d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/layerZOrderCrash-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow (relative positioned) {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 616x19
+          text run at (0,0) width 616: "To reproduce this bug outside of DumpRenderTree, click the link below. If broken, we will crash."
+        LayoutBR {BR} at (615,0) size 0x0
+layer at (8,28) size 58x96
+  LayoutTable (relative positioned) {TABLE} at (0,20) size 58x96
+    LayoutTableSection {TBODY} at (0,0) size 58x96
+      LayoutTableRow {TR} at (0,2) size 58x22
+        LayoutNGTableCell {TD} at (2,2) size 54x22 [r=0 c=0 rs=1 cs=1]
+          LayoutInline {A} at (0,0) size 24x19 [color=#0000EE]
+            LayoutText {#text} at (1,1) size 24x19
+              text run at (1,1) width 24: "link"
+      LayoutTableRow {TR} at (0,26) size 58x68
+        LayoutNGTableCell {TD} at (2,26) size 54x68 [r=1 c=0 rs=1 cs=1]
+layer at (11,55) size 52x66
+  LayoutTable (relative positioned) {TABLE} at (1,1) size 52x66
+    LayoutTableSection {TBODY} at (0,0) size 52x66
+      LayoutTableRow {TR} at (0,2) size 52x62
+        LayoutNGTableCell {TD} at (2,2) size 48x62 [r=0 c=0 rs=1 cs=1]
+          LayoutText {#text} at (1,1) size 46x19
+            text run at (1,1) width 46: "content"
+          LayoutBR {BR} at (47,1) size 0x0
+          LayoutText {#text} at (1,21) size 46x19
+            text run at (1,21) width 46: "content"
+          LayoutBR {BR} at (47,21) size 0x0
+          LayoutText {#text} at (1,41) size 46x19
+            text run at (1,41) width 46: "content"
+          LayoutBR {BR} at (47,41) size 0x0
+caret: position 5 of child 0 {#text} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-overflow-expected.txt
new file mode 100644
index 0000000..bb9db317
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-overflow-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 32804
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x32804 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x32804
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x32788
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 558x19
+          text run at (0,0) width 558: "You should see a large green block below that is 32,768px tall. No red should be visible."
+        LayoutBR {BR} at (557,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,20) size 769x32768 [bgcolor=#FF0000]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 769x32768 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutIFrame {IFRAME} at (0,0) size 769x32768 [bgcolor=#008000]
+    layer at (0,0) size 769x32768
+      LayoutView at (0,0) size 769x32768
+    layer at (0,0) size 769x32768
+      LayoutNGBlockFlow {HTML} at (0,0) size 769x32768
+        LayoutNGBlockFlow {BODY} at (8,8) size 753x32752
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-thickness-underline-strikethrough-overline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-thickness-underline-strikethrough-overline-expected.txt
new file mode 100644
index 0000000..0a9d8c5c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-thickness-underline-strikethrough-overline-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x251
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x251
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x235
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x24
+        LayoutNGBlockFlow {P} at (5,0) size 774x24 [color=#FF000066]
+          LayoutText {#text} at (0,0) size 483x24
+            text run at (0,0) width 483: "Check if the underline is thick enough for 20px"
+      LayoutNGBlockFlow {DIV} at (0,29) size 784x46
+        LayoutNGBlockFlow {P} at (5,0) size 774x46 [color=#FF000066]
+          LayoutText {#text} at (0,0) size 963x46
+            text run at (0,0) width 963: "Check if the underline is thick enough for 40px"
+      LayoutNGBlockFlow {P} at (5,80) size 774x24 [color=#FF000066]
+        LayoutText {#text} at (0,0) size 514x24
+          text run at (0,0) width 514: "Check if the line-through is thick enough for 20px"
+      LayoutNGBlockFlow {P} at (5,109) size 774x46 [color=#FF000066]
+        LayoutText {#text} at (0,0) size 1018x46
+          text run at (0,0) width 1018: "Check if the line-through is thick enough for 40px"
+      LayoutNGBlockFlow {P} at (5,160) size 774x24 [color=#FF000066]
+        LayoutText {#text} at (0,0) size 466x24
+          text run at (0,0) width 466: "Check if the overline is thick enough for 20px"
+      LayoutNGBlockFlow {P} at (5,189) size 774x46 [color=#FF000066]
+        LayoutText {#text} at (0,0) size 929x46
+          text run at (0,0) width 929: "Check if the overline is thick enough for 40px"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/nested-floating-relative-position-percentages-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/nested-floating-relative-position-percentages-expected.txt
new file mode 100644
index 0000000..c8808e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/nested-floating-relative-position-percentages-expected.txt
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600 scrollWidth 1030
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 388x19
+          text run at (0,0) width 388: "The six boxes below should be centered in two rows of three."
+layer at (400,28) size 630x420 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (0,20) size 630x420
+    LayoutNGBlockFlow (anonymous) at (0,0) size 630x20
+      LayoutBR {BR} at (630,0) size 0x0
+layer at (90,33) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (5,5) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
+layer at (300,33) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (215,5) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
+layer at (510,33) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (425,5) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
+layer at (90,243) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (5,215) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
+layer at (300,243) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (215,215) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
+layer at (510,243) size 200x200
+  LayoutNGBlockFlow (relative positioned) (floating) {DIV} at (425,215) size 200x200 [bgcolor=#000000]
+    LayoutImage {IMG} at (0,0) size 200x200
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/non-standard-checkbox-size-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/non-standard-checkbox-size-expected.txt
index 9a814084..dc0a290 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/non-standard-checkbox-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/non-standard-checkbox-size-expected.txt
@@ -1,12 +1,12 @@
 layer at (0,0) size 800x600
   LayoutView at (0,0) size 800x600
-layer at (0,0) size 800x74
-  LayoutNGBlockFlow {HTML} at (0,0) size 800x74
-    LayoutNGBlockFlow {BODY} at (8,8) size 784x58
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
       LayoutText {#text} at (0,38) size 289x19
         text run at (0,38) width 289: "The following inputs should not be stretched. "
-      LayoutNGBlockFlow {INPUT} at (293,3) size 13x50
+      LayoutBlockFlow {INPUT} at (293,3) size 13x50
       LayoutText {#text} at (309,38) size 4x19
         text run at (309,38) width 4: " "
-      LayoutNGBlockFlow {INPUT} at (318,3) size 13x50
+      LayoutBlockFlow {INPUT} at (318,3) size 13x50
       LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-ordering-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-ordering-expected.txt
new file mode 100644
index 0000000..ce506ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-ordering-expected.txt
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 212x19
+          text run at (0,0) width 212: "This tests for a regression against "
+        LayoutInline {I} at (0,0) size 712x39
+          LayoutInline {A} at (0,0) size 348x19 [color=#0000EE]
+            LayoutText {#text} at (212,0) size 348x19
+              text run at (212,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=6334"
+          LayoutText {#text} at (559,0) size 712x39
+            text run at (559,0) width 153: " REGRESSION: <input"
+            text run at (0,20) width 370: "type=\"button\"> text is reversed on \"visual Hebrew\" pages"
+        LayoutText {#text} at (369,20) size 5x19
+          text run at (369,20) width 5: "."
+      LayoutNGBlockFlow {P} at (0,74) size 784x20
+        LayoutText {#text} at (0,0) size 295x19
+          text run at (0,0) width 295: "The text on both buttons should like this: \x{5E8}\x{5D5}\x{5EA}\x{5E4}\x{5DB}"
+      LayoutNGBlockFlow (anonymous) at (0,110) size 784x44
+        LayoutButton {BUTTON} at (0,0) size 47x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 31x16
+            LayoutText {#text} at (0,0) size 31x16
+              text run at (0,0) width 31 LTR override: "\x{5E8}\x{5D5}\x{5EA}\x{5E4}\x{5DB}"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (47,16) size 0x0
+        LayoutButton {INPUT} at (0,22) size 47x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 31x16
+            LayoutText {#text} at (0,0) size 31x16
+              text run at (0,0) width 31 RTL: "\x{5DB}\x{5E4}\x{5EA}\x{5D5}\x{5E8}"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,180) size 784x20
+        LayoutText {#text} at (0,0) size 249x19
+          text run at (0,0) width 249: "The following lines should be identical:"
+      LayoutNGBlockFlow {P} at (0,216) size 784x20
+        LayoutText {#text} at (0,0) size 65x19
+          text run at (0,0) width 16: "21"
+          text run at (16,0) width 49: "\x{5D4}\x{5DE}\x{5D0}\x{5D4} \x{5D4}-"
+      LayoutNGBlockFlow {P} at (0,252) size 784x20
+        LayoutText {#text} at (0,0) size 65x19
+          text run at (0,0) width 65: "21-\x{5D4} \x{5D4}\x{5D0}\x{5DE}\x{5D4}"
+layer at (8,64) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,56) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (8,170) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,162) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-to-viewport-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-to-viewport-expected.txt
new file mode 100644
index 0000000..d7899e44
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/rtl-to-viewport-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (696,0) size 104x104
+  LayoutNGBlockFlow {HTML} at (696,0) size 104x104 [border: (2px solid #000000)]
+    LayoutNGBlockFlow {BODY} at (10,10) size 84x20
+      LayoutText {#text} at (21,0) size 63x19
+        text run at (21,0) width 4: "."
+        text run at (25,0) width 59: "This is rtl"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-multiple-shadows-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-multiple-shadows-expected.txt
new file mode 100644
index 0000000..c1fc6f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-multiple-shadows-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x8
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x8
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x0
+layer at (0,0) size 144x84
+  LayoutNGBlockFlow (positioned) {DIV} at (0,0) size 144x84
+    LayoutText {#text} at (0,1) size 140x81
+      text run at (0,1) width 68: "Bl"
+      text run at (68,1) width 72: "\x{2026}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-shadow-alpha-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-shadow-alpha-expected.txt
new file mode 100644
index 0000000..787163a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-shadow-alpha-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x100
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x100
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x84
+layer at (8,8) size 144x84
+  LayoutNGBlockFlow {DIV} at (0,0) size 144x84 [color=#00000000]
+    LayoutText {#text} at (0,1) size 140x81
+      text run at (0,1) width 68: "Bl"
+      text run at (68,1) width 72: "\x{2026}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-input-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-input-expected.txt
new file mode 100644
index 0000000..0fdbc548
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-input-expected.txt
@@ -0,0 +1,236 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x380
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x380
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x348
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 307x19
+          text run at (0,0) width 307: "This test is a basic check for using text-overflow."
+      LayoutNGBlockFlow {P} at (0,36) size 784x108
+        LayoutText {#text} at (0,0) size 481x19
+          text run at (0,0) width 481: "Apply \"text-overflow:clip\" to inputs. The following input should be clipped:"
+        LayoutBR {BR} at (480,0) size 0x0
+        LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (154,21) size 4x19
+          text run at (154,21) width 4: " "
+        LayoutTextControl {INPUT} at (158,20) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (314,21) size 4x19
+          text run at (314,21) width 4: " "
+        LayoutTextControl {INPUT} at (318,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (472,21) size 4x19
+          text run at (472,21) width 4: " "
+        LayoutTextControl {INPUT} at (476,20) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutTextControl {INPUT} at (0,42) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutBR {BR} at (154,43) size 0x0
+        LayoutTextControl {INPUT} at (0,64) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (154,65) size 4x19
+          text run at (154,65) width 4: " "
+        LayoutTextControl {INPUT} at (158,64) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (12,0) size 138x16
+        LayoutText {#text} at (314,65) size 4x19
+          text run at (314,65) width 4: " "
+        LayoutTextControl {INPUT} at (318,64) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (472,65) size 4x19
+          text run at (472,65) width 4: " "
+        LayoutTextControl {INPUT} at (476,64) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (12,0) size 138x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutTextControl {INPUT} at (0,86) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,160) size 784x108
+        LayoutText {#text} at (0,0) size 536x19
+          text run at (0,0) width 536: "Apply \"text-overflow:ellipsis\" to inputs. The following input should show an ellipsis:"
+        LayoutBR {BR} at (535,0) size 0x0
+        LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (154,21) size 4x19
+          text run at (154,21) width 4: " "
+        LayoutTextControl {INPUT} at (158,20) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (314,21) size 4x19
+          text run at (314,21) width 4: " "
+        LayoutTextControl {INPUT} at (318,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (472,21) size 4x19
+          text run at (472,21) width 4: " "
+        LayoutTextControl {INPUT} at (476,20) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutTextControl {INPUT} at (0,42) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutBR {BR} at (154,43) size 0x0
+        LayoutTextControl {INPUT} at (0,64) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (154,65) size 4x19
+          text run at (154,65) width 4: " "
+        LayoutTextControl {INPUT} at (158,64) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (12,0) size 138x16
+        LayoutText {#text} at (314,65) size 4x19
+          text run at (314,65) width 4: " "
+        LayoutTextControl {INPUT} at (318,64) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (472,65) size 4x19
+          text run at (472,65) width 4: " "
+        LayoutTextControl {INPUT} at (476,64) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (12,0) size 138x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutTextControl {INPUT} at (0,86) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,284) size 784x64
+        LayoutText {#text} at (0,0) size 233x19
+          text run at (0,0) width 233: "Dynamic style change text-overflow:"
+        LayoutBR {BR} at (233,0) size 0x0
+        LayoutText {#text} at (0,21) size 239x19
+          text run at (0,21) width 239: "Clip to ellipsis (should show ellipsis): "
+        LayoutTextControl {INPUT} at (239,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (393,21) size 4x19
+          text run at (393,21) width 4: " "
+        LayoutTextControl {INPUT} at (397,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (551,21) size 0x0
+        LayoutText {#text} at (0,43) size 262x19
+          text run at (0,43) width 262: "Ellipsis to clip (should not show ellipsis): "
+        LayoutTextControl {INPUT} at (262,42) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (416,43) size 4x19
+          text run at (416,43) width 4: " "
+        LayoutTextControl {INPUT} at (420,42) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (574,43) size 0x0
+layer at (10,75) size 150x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,75) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (169,75) size 137x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (3,3) size 137x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (169,75) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+layer at (328,75) size 150x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (487,75) size 137x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,97) size 150x16 scrollWidth 276
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 275x16
+      text run at (0,0) width 275: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
+layer at (10,119) size 150x16 scrollX 167.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (-167,0) size 317x16
+      text run at (-167,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,119) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (181,119) size 138x16 scrollX 179.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (15,3) size 138x16 [color=#757575]
+    LayoutText {#text} at (-179,0) size 317x16
+      text run at (-179,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (181,119) size 138x16
+  LayoutBlockFlow {DIV} at (0,0) size 138x16
+layer at (328,119) size 150x16 scrollX 167.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (-167,0) size 317x16
+      text run at (-167,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (499,119) size 138x16 scrollX 179.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (0,0) size 138x16
+    LayoutText {#text} at (-179,0) size 317x16
+      text run at (-179,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,141) size 150x16 scrollX 125.00 scrollWidth 275
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (-125,0) size 275x16
+      text run at (-125,0) width 275 RTL: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
+layer at (10,199) size 150x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,199) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (169,199) size 137x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (3,3) size 137x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (169,199) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+layer at (328,199) size 150x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (487,199) size 137x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,221) size 150x16 scrollWidth 276
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 275x16
+      text run at (0,0) width 275: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
+layer at (10,243) size 150x16 scrollX 167.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (-167,0) size 317x16
+      text run at (-167,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,243) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (181,243) size 138x16 scrollX 179.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (15,3) size 138x16 [color=#757575]
+    LayoutText {#text} at (-179,0) size 317x16
+      text run at (-179,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (181,243) size 138x16
+  LayoutBlockFlow {DIV} at (0,0) size 138x16
+layer at (328,243) size 150x16 scrollX 167.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (-167,0) size 317x16
+      text run at (-167,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (499,243) size 138x16 scrollX 179.00 scrollWidth 317
+  LayoutBlockFlow {DIV} at (0,0) size 138x16
+    LayoutText {#text} at (-179,0) size 317x16
+      text run at (-179,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (10,265) size 150x16 scrollX 125.00 scrollWidth 275
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (-125,0) size 275x16
+      text run at (-125,0) width 275 RTL: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
+layer at (249,323) size 150x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (249,323) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (407,323) size 150x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (272,345) size 150x16 scrollWidth 317
+  LayoutBlockFlow {DIV} at (2,3) size 150x16 [color=#757575]
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (272,345) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (430,345) size 150x16 scrollWidth 318
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 317x16
+      text run at (0,0) width 317: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
+layer at (307,79) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (625,79) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (169,123) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (0,3.50) size 9x9
+layer at (487,123) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (0,3.50) size 9x9
+layer at (307,203) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (625,203) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (169,247) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (0,3.50) size 9x9
+layer at (487,247) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (0,3.50) size 9x9
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt
new file mode 100644
index 0000000..4f97ee765
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2982
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2982 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2981.75
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2953.75
+      LayoutNGBlockFlow {H3} at (0,0) size 769x23
+        LayoutText {#text} at (0,0) size 84x22
+          text run at (0,0) width 84: "Single line"
+      LayoutNGBlockFlow {H3} at (0,371.72) size 769x23
+        LayoutText {#text} at (0,0) size 79x22
+          text run at (0,0) width 79: "Multi line"
+      LayoutNGBlockFlow {H3} at (0,743.44) size 769x23
+        LayoutText {#text} at (0,0) size 232x22
+          text run at (0,0) width 232: "Containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,1115.16) size 769x23
+        LayoutText {#text} at (0,0) size 396x22
+          text run at (0,0) width 396: "Containing replaced content blocking the ellipsis"
+      LayoutNGBlockFlow {H3} at (0,1486.88) size 769x23
+        LayoutText {#text} at (0,0) size 198x22
+          text run at (0,0) width 198: "Right-To-Left single line"
+      LayoutNGBlockFlow {H3} at (0,1858.59) size 769x23
+        LayoutText {#text} at (0,0) size 197x22
+          text run at (0,0) width 197: "Right-To-Left Multi line"
+      LayoutNGBlockFlow {H3} at (0,2230.31) size 769x23
+        LayoutText {#text} at (0,0) size 343x22
+          text run at (0,0) width 343: "Right-To-Left containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,2602.03) size 769x23
+        LayoutText {#text} at (0,0) size 507x22
+          text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
+layer at (8,50) size 22x310 clip at (9,51) size 20x308
+  LayoutNGBlockFlow {DIV} at (0,41.72) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,3) size 19x304
+      text run at (2,3) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (2,290) width 16: "\x{2026}"
+layer at (8,421) size 82x310 backgroundClip at (8,421) size 82x179 clip at (9,422) size 80x178
+  LayoutNGBlockFlow {DIV} at (0,413.44) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,3) size 19x304
+      text run at (62,3) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (62,290) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,2) size 19x306
+      text run at (42,2) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+      text run at (42,292) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,4) size 19x302
+      text run at (22,4) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+      text run at (22,290) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,2) size 19x306
+      text run at (2,2) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+      text run at (2,291) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,793) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,785.16) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,1) size 19x181
+      text run at (4,1) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,182) size 25x25
+    LayoutText {#text} at (4,207) size 19x102
+      text run at (4,207) width 86: " consectetur a"
+      text run at (4,293) width 16: "\x{2026}"
+layer at (8,1165) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1156.88) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,15) size 19x280
+      text run at (2,15) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+      text run at (2,278) width 16: "\x{2026}"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
+layer at (8,1537) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1528.59) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,3) size 19x304
+      text run at (2,3) width 16: "\x{2026}"
+      text run at (2,19) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+layer at (8,1908) size 82x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1900.31) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,3) size 19x304
+      text run at (62,3) width 16: "\x{2026}"
+      text run at (62,19) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,2) size 19x306
+      text run at (42,2) width 16: "\x{2026}"
+      text run at (42,18) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,4) size 19x302
+      text run at (22,4) width 16: "\x{2026}"
+      text run at (22,20) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,2) size 19x306
+      text run at (2,2) width 16: "\x{2026}"
+      text run at (2,18) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,2280) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2272.03) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,128) size 19x181
+      text run at (4,128) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,103) size 25x25
+    LayoutText {#text} at (4,1) size 19x102
+      text run at (4,1) width 16: "\x{2026}"
+      text run at (4,17) width 86: " consectetur a"
+layer at (8,2652) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2643.75) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,15) size 19x280
+      text run at (2,15) width 16: "\x{2026}"
+      text run at (2,31) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.txt
new file mode 100644
index 0000000..cadd1cb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2982
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2982 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2981.75
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2953.75
+      LayoutNGBlockFlow {H3} at (0,0) size 769x23
+        LayoutText {#text} at (0,0) size 84x22
+          text run at (0,0) width 84: "Single line"
+      LayoutNGBlockFlow {H3} at (0,371.72) size 769x23
+        LayoutText {#text} at (0,0) size 79x22
+          text run at (0,0) width 79: "Multi line"
+      LayoutNGBlockFlow {H3} at (0,743.44) size 769x23
+        LayoutText {#text} at (0,0) size 232x22
+          text run at (0,0) width 232: "Containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,1115.16) size 769x23
+        LayoutText {#text} at (0,0) size 396x22
+          text run at (0,0) width 396: "Containing replaced content blocking the ellipsis"
+      LayoutNGBlockFlow {H3} at (0,1486.88) size 769x23
+        LayoutText {#text} at (0,0) size 198x22
+          text run at (0,0) width 198: "Right-To-Left single line"
+      LayoutNGBlockFlow {H3} at (0,1858.59) size 769x23
+        LayoutText {#text} at (0,0) size 197x22
+          text run at (0,0) width 197: "Right-To-Left Multi line"
+      LayoutNGBlockFlow {H3} at (0,2230.31) size 769x23
+        LayoutText {#text} at (0,0) size 343x22
+          text run at (0,0) width 343: "Right-To-Left containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,2602.03) size 769x23
+        LayoutText {#text} at (0,0) size 507x22
+          text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
+layer at (8,50) size 22x310 clip at (9,51) size 20x308
+  LayoutNGBlockFlow {DIV} at (0,41.72) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x303
+      text run at (2,1) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (2,288) width 16: "\x{2026}"
+layer at (8,421) size 82x310 backgroundClip at (8,421) size 82x179 clip at (9,422) size 80x178
+  LayoutNGBlockFlow {DIV} at (0,413.44) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,1) size 19x303
+      text run at (62,1) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (62,288) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,1) size 19x306
+      text run at (42,1) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+      text run at (42,291) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,1) size 19x302
+      text run at (22,1) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+      text run at (22,287) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,1) size 19x305
+      text run at (2,1) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+      text run at (2,290) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,793) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,785.16) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,1) size 19x181
+      text run at (4,1) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,182) size 25x25
+    LayoutText {#text} at (4,207) size 19x102
+      text run at (4,207) width 86: " consectetur a"
+      text run at (4,293) width 16: "\x{2026}"
+layer at (8,1165) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1156.88) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x279
+      text run at (2,1) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+      text run at (2,264) width 16: "\x{2026}"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
+layer at (8,1537) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1528.59) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,6) size 19x303
+      text run at (2,6) width 16: "\x{2026}"
+      text run at (2,22) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+layer at (8,1908) size 82x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1900.31) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,6) size 19x303
+      text run at (62,6) width 16: "\x{2026}"
+      text run at (62,22) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,3) size 19x306
+      text run at (42,3) width 16: "\x{2026}"
+      text run at (42,19) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,7) size 19x302
+      text run at (22,7) width 16: "\x{2026}"
+      text run at (22,23) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,4) size 19x305
+      text run at (2,4) width 16: "\x{2026}"
+      text run at (2,20) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,2280) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2272.03) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,128) size 19x181
+      text run at (4,128) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,103) size 25x25
+    LayoutText {#text} at (4,1) size 19x102
+      text run at (4,1) width 16: "\x{2026}"
+      text run at (4,17) width 86: " consectetur a"
+layer at (8,2652) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2643.75) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,30) size 19x279
+      text run at (2,30) width 16: "\x{2026}"
+      text run at (2,46) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.txt
new file mode 100644
index 0000000..67663dc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2982
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2982 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2981.75
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2953.75
+      LayoutNGBlockFlow {H3} at (0,0) size 769x23
+        LayoutText {#text} at (0,0) size 84x22
+          text run at (0,0) width 84: "Single line"
+      LayoutNGBlockFlow {H3} at (0,371.72) size 769x23
+        LayoutText {#text} at (0,0) size 79x22
+          text run at (0,0) width 79: "Multi line"
+      LayoutNGBlockFlow {H3} at (0,743.44) size 769x23
+        LayoutText {#text} at (0,0) size 232x22
+          text run at (0,0) width 232: "Containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,1115.16) size 769x23
+        LayoutText {#text} at (0,0) size 396x22
+          text run at (0,0) width 396: "Containing replaced content blocking the ellipsis"
+      LayoutNGBlockFlow {H3} at (0,1486.88) size 769x23
+        LayoutText {#text} at (0,0) size 198x22
+          text run at (0,0) width 198: "Right-To-Left single line"
+      LayoutNGBlockFlow {H3} at (0,1858.59) size 769x23
+        LayoutText {#text} at (0,0) size 197x22
+          text run at (0,0) width 197: "Right-To-Left Multi line"
+      LayoutNGBlockFlow {H3} at (0,2230.31) size 769x23
+        LayoutText {#text} at (0,0) size 343x22
+          text run at (0,0) width 343: "Right-To-Left containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,2602.03) size 769x23
+        LayoutText {#text} at (0,0) size 507x22
+          text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
+layer at (8,50) size 22x310 clip at (9,51) size 20x308
+  LayoutNGBlockFlow {DIV} at (0,41.72) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x303
+      text run at (2,1) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (2,288) width 16: "\x{2026}"
+layer at (8,421) size 82x310 backgroundClip at (8,421) size 82x179 clip at (9,422) size 80x178
+  LayoutNGBlockFlow {DIV} at (0,413.44) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,1) size 19x303
+      text run at (62,1) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (62,288) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,1) size 19x306
+      text run at (42,1) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+      text run at (42,291) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,1) size 19x302
+      text run at (22,1) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+      text run at (22,287) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,1) size 19x305
+      text run at (2,1) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+      text run at (2,290) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,793) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,785.16) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,1) size 19x181
+      text run at (4,1) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,182) size 25x25
+    LayoutText {#text} at (4,207) size 19x102
+      text run at (4,207) width 86: " consectetur a"
+      text run at (4,293) width 16: "\x{2026}"
+layer at (8,1165) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1156.88) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x279
+      text run at (2,1) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+      text run at (2,264) width 16: "\x{2026}"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
+layer at (8,1537) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1528.59) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x303
+      text run at (2,1) width 16: "\x{2026}"
+      text run at (2,17) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+layer at (8,1908) size 82x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1900.31) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,1) size 19x303
+      text run at (62,1) width 16: "\x{2026}"
+      text run at (62,17) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,1) size 19x306
+      text run at (42,1) width 16: "\x{2026}"
+      text run at (42,17) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,1) size 19x302
+      text run at (22,1) width 16: "\x{2026}"
+      text run at (22,17) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,1) size 19x305
+      text run at (2,1) width 16: "\x{2026}"
+      text run at (2,17) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,2280) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2272.03) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,128) size 19x181
+      text run at (4,128) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,103) size 25x25
+    LayoutText {#text} at (4,1) size 19x102
+      text run at (4,1) width 16: "\x{2026}"
+      text run at (4,17) width 86: " consectetur a"
+layer at (8,2652) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2643.75) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,1) size 19x279
+      text run at (2,1) width 16: "\x{2026}"
+      text run at (2,17) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt
new file mode 100644
index 0000000..7e2cd5bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 2982
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x2982 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x2981.75
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x2953.75
+      LayoutNGBlockFlow {H3} at (0,0) size 769x23
+        LayoutText {#text} at (0,0) size 84x22
+          text run at (0,0) width 84: "Single line"
+      LayoutNGBlockFlow {H3} at (0,371.72) size 769x23
+        LayoutText {#text} at (0,0) size 79x22
+          text run at (0,0) width 79: "Multi line"
+      LayoutNGBlockFlow {H3} at (0,743.44) size 769x23
+        LayoutText {#text} at (0,0) size 232x22
+          text run at (0,0) width 232: "Containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,1115.16) size 769x23
+        LayoutText {#text} at (0,0) size 396x22
+          text run at (0,0) width 396: "Containing replaced content blocking the ellipsis"
+      LayoutNGBlockFlow {H3} at (0,1486.88) size 769x23
+        LayoutText {#text} at (0,0) size 198x22
+          text run at (0,0) width 198: "Right-To-Left single line"
+      LayoutNGBlockFlow {H3} at (0,1858.59) size 769x23
+        LayoutText {#text} at (0,0) size 197x22
+          text run at (0,0) width 197: "Right-To-Left Multi line"
+      LayoutNGBlockFlow {H3} at (0,2230.31) size 769x23
+        LayoutText {#text} at (0,0) size 343x22
+          text run at (0,0) width 343: "Right-To-Left containing replaced content"
+      LayoutNGBlockFlow {H3} at (0,2602.03) size 769x23
+        LayoutText {#text} at (0,0) size 507x22
+          text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
+layer at (8,50) size 22x310 clip at (9,51) size 20x308
+  LayoutNGBlockFlow {DIV} at (0,41.72) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,6) size 19x303
+      text run at (2,6) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (2,293) width 16: "\x{2026}"
+layer at (8,421) size 82x310 backgroundClip at (8,421) size 82x179 clip at (9,422) size 80x178
+  LayoutNGBlockFlow {DIV} at (0,413.44) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,6) size 19x303
+      text run at (62,6) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+      text run at (62,293) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,3) size 19x306
+      text run at (42,3) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+      text run at (42,293) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,7) size 19x302
+      text run at (22,7) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+      text run at (22,293) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,4) size 19x305
+      text run at (2,4) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+      text run at (2,293) width 16: "\x{2026}"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,793) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,785.16) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,1) size 19x181
+      text run at (4,1) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,182) size 25x25
+    LayoutText {#text} at (4,207) size 19x102
+      text run at (4,207) width 86: " consectetur a"
+      text run at (4,293) width 16: "\x{2026}"
+layer at (8,1165) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1156.88) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,30) size 19x279
+      text run at (2,30) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+      text run at (2,293) width 16: "\x{2026}"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
+layer at (8,1537) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1528.59) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,6) size 19x303
+      text run at (2,6) width 16: "\x{2026}"
+      text run at (2,22) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+layer at (8,1908) size 82x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,1900.31) size 82x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (62,6) size 19x303
+      text run at (62,6) width 16: "\x{2026}"
+      text run at (62,22) width 287: "Lorem ipsum dolor sit amet, consectetur adipi"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (42,3) size 19x306
+      text run at (42,3) width 16: "\x{2026}"
+      text run at (42,19) width 290: "orem ipsum dolor sit amet, consectetur adipisc"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (22,7) size 19x302
+      text run at (22,7) width 16: "\x{2026}"
+      text run at (22,23) width 286: "rem ipsum dolor sit amet, consectetur adipisci"
+    LayoutBR {BR} at (0,0) size 0x0
+    LayoutText {#text} at (2,4) size 19x305
+      text run at (2,4) width 16: "\x{2026}"
+      text run at (2,20) width 289: "em ipsum dolor sit amet, consectetur adipiscin"
+    LayoutBR {BR} at (0,0) size 0x0
+layer at (8,2280) size 27x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2272.03) size 27x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (4,128) size 19x181
+      text run at (4,128) width 181: "Lorem ipsum dolor sit amet, "
+    LayoutImage {IMG} at (1,103) size 25x25
+    LayoutText {#text} at (4,1) size 19x102
+      text run at (4,1) width 16: "\x{2026}"
+      text run at (4,17) width 86: " consectetur a"
+layer at (8,2652) size 22x310 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {DIV} at (0,2643.75) size 22x310 [border: (1px solid #000000)]
+    LayoutText {#text} at (2,30) size 19x279
+      text run at (2,30) width 16: "\x{2026}"
+      text run at (2,46) width 263: "Lorem ipsum dolor sit amet, consectetur a"
+    LayoutImage {IMG} at (0,0) size 25x25
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/visibility-hit-test-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/visibility-hit-test-expected.txt
new file mode 100644
index 0000000..622a47b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/visibility-hit-test-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (0,0) size 800x600
+      LayoutInline {A} at (0,0) size 300x300
+        LayoutImage {IMG} at (0,0) size 300x300
+      LayoutText {#text} at (300,285) size 4x19
+        text run at (300,285) width 4: " "
+      LayoutText {#text} at (303,285) size 444x19
+        text run at (303,285) width 444: "The element at position (100, 100) should be the body. Result: BODY"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/52776-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/52776-expected.txt
new file mode 100644
index 0000000..d7460486
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/52776-expected.txt
@@ -0,0 +1,246 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1812
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1812 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1812
+    LayoutNGBlockFlow {BODY} at (8,16) size 769x1780
+      LayoutNGBlockFlow {DIV} at (0,0) size 769x864
+        LayoutNGBlockFlow {P} at (0,0) size 769x20
+          LayoutText {#text} at (683,0) size 86x19
+            text run at (683,0) width 86: "Right To Left"
+        LayoutNGBlockFlow {P} at (0,36) size 769x20
+          LayoutText {#text} at (444,0) size 325x19
+            text run at (444,0) width 5: "."
+            text run at (448,0) width 321: "Well-formed pair of unicode bidi control characters"
+        LayoutNGBlockFlow {DIV} at (0,72) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 0: "\x{202C}"
+            text run at (756,0) width 5: "!"
+            text run at (761,0) width 8: "\x{202B}b"
+        LayoutNGBlockFlow {DIV} at (0,92) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 0: "\x{202C}"
+            text run at (756,0) width 13: "\x{202A}b!"
+        LayoutNGBlockFlow {P} at (0,128) size 769x20
+          LayoutText {#text} at (509,0) size 260x19
+            text run at (509,0) width 4: "."
+            text run at (513,0) width 256: "Unpaired unicode bidi control characters"
+        LayoutNGBlockFlow {DIV} at (0,164) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 5: "!"
+            text run at (761,0) width 8: "\x{202B}b"
+        LayoutNGBlockFlow {DIV} at (0,184) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 13: "\x{202A}b!"
+        LayoutNGBlockFlow {P} at (0,220) size 769x20
+          LayoutText {#text} at (435,0) size 334x19
+            text run at (435,0) width 4: "."
+            text run at (439,0) width 330: "Empty content inside unicode bidi control characters"
+        LayoutNGBlockFlow {DIV} at (0,256) size 769x20
+          LayoutText {#text} at (769,0) size 0x0
+            text run at (769,0) width 0: "\x{202C}\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,276) size 769x20
+          LayoutText {#text} at (769,0) size 0x0
+            text run at (769,0) width 0: "\x{202A}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,296) size 769x20
+          LayoutText {#text} at (769,0) size 0x0
+            text run at (769,0) width 0: "\x{202B}\x{202B}"
+        LayoutNGBlockFlow {P} at (0,332) size 769x20
+          LayoutText {#text} at (489,0) size 280x19
+            text run at (489,0) width 4: "."
+            text run at (493,0) width 276: "String inside unicode bidi control characters"
+        LayoutBlockFlow {DIV} at (0,368) size 769x20
+          LayoutText {#text} at (747,0) size 22x19
+            text run at (747,0) width 0 RTL: "\x{202C}"
+            text run at (747,0) width 22: "\x{202C}abc"
+        LayoutNGBlockFlow {DIV} at (0,388) size 769x20
+          LayoutText {#text} at (747,0) size 22x19
+            text run at (747,0) width 0: "\x{202A}"
+            text run at (747,0) width 22: "\x{202A}abc"
+        LayoutNGBlockFlow {DIV} at (0,408) size 769x20
+          LayoutText {#text} at (747,0) size 22x19
+            text run at (747,0) width 0: "\x{202B}"
+            text run at (747,0) width 22: "\x{202B}abc"
+        LayoutNGBlockFlow {P} at (0,444) size 769x20
+          LayoutText {#text} at (482,0) size 287x19
+            text run at (482,0) width 4: "."
+            text run at (486,0) width 283: "String around unicode bidi control characters"
+        LayoutNGBlockFlow {DIV} at (0,480) size 769x20
+          LayoutText {#text} at (727,0) size 42x19
+            text run at (727,0) width 0: "\x{202C}"
+            text run at (727,0) width 42: "def\x{202C}abc"
+        LayoutNGBlockFlow {DIV} at (0,500) size 769x20
+          LayoutText {#text} at (727,0) size 42x19
+            text run at (727,0) width 42: "\x{202C}abc\x{202C}def"
+        LayoutNGBlockFlow {DIV} at (0,520) size 769x20
+          LayoutText {#text} at (704,0) size 65x19
+            text run at (704,0) width 65: "xyz\x{202C}abc\x{202C}def"
+        LayoutNGBlockFlow {P} at (0,556) size 769x20
+          LayoutText {#text} at (524,0) size 245x19
+            text run at (524,0) width 4: "."
+            text run at (528,0) width 241: "Nested unicode bidi control characters"
+        LayoutNGBlockFlow {DIV} at (0,592) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 0: "\x{202C}"
+            text run at (756,0) width 13: "\x{202A}\x{202A}b!"
+        LayoutNGBlockFlow {DIV} at (0,612) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 0: "\x{202C}"
+            text run at (756,0) width 5: "!"
+            text run at (761,0) width 8: "\x{202B}\x{202B}b"
+        LayoutNGBlockFlow {DIV} at (0,632) size 769x20
+          LayoutText {#text} at (756,0) size 13x19
+            text run at (756,0) width 5: "!\x{202C}"
+            text run at (761,0) width 8: "\x{202C}\x{202C}b"
+        LayoutNGBlockFlow {DIV} at (0,652) size 769x20
+          LayoutText {#text} at (749,0) size 20x19
+            text run at (749,0) width 0: "\x{202C}"
+            text run at (749,0) width 8: "\x{202C}1"
+            text run at (757,0) width 5: "!"
+            text run at (762,0) width 7: "\x{202B}c"
+        LayoutNGBlockFlow {P} at (0,688) size 769x20
+          LayoutText {#text} at (494,0) size 275x19
+            text run at (494,0) width 5: "."
+            text run at (498,0) width 271: "Start with different directionality characters"
+        LayoutNGBlockFlow {DIV} at (0,724) size 769x20
+          LayoutText {#text} at (745,0) size 24x19
+            text run at (745,0) width 0: "\x{202C}\x{202B}"
+            text run at (745,0) width 24: "12\x{202C}\x{202A}1"
+        LayoutNGBlockFlow {DIV} at (0,744) size 769x20
+          LayoutText {#text} at (753,0) size 16x19
+            text run at (753,0) width 0: "\x{202C}\x{202A}"
+            text run at (753,0) width 16: "12"
+        LayoutNGBlockFlow {DIV} at (0,764) size 769x20
+          LayoutText {#text} at (753,0) size 16x19
+            text run at (753,0) width 0: "\x{202C}\x{202A}"
+            text run at (753,0) width 16: "\x{660}\x{661}"
+        LayoutNGBlockFlow {DIV} at (0,784) size 769x20
+          LayoutText {#text} at (749,0) size 20x19
+            text run at (749,0) width 20: "\x{683}\x{684}\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,804) size 769x20
+          LayoutText {#text} at (759,0) size 10x19
+            text run at (759,0) width 10: "\x{1}\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,824) size 769x20
+          LayoutText {#text} at (747,0) size 22x19
+            text run at (747,0) width 0: "\x{202C}\x{202A}"
+            text run at (747,0) width 22: "abc"
+        LayoutNGBlockFlow {DIV} at (0,844) size 769x20
+          LayoutText {#text} at (754,0) size 15x19
+            text run at (754,0) width 15: "\x{5D0}\x{5D1}\x{202C}\x{202A}"
+      LayoutNGBlockFlow {DIV} at (0,880) size 769x864
+        LayoutNGBlockFlow {P} at (0,0) size 769x20
+          LayoutText {#text} at (0,0) size 86x19
+            text run at (0,0) width 86: "Left To Right"
+        LayoutNGBlockFlow {P} at (0,36) size 769x20
+          LayoutText {#text} at (0,0) size 325x19
+            text run at (0,0) width 325: "Well-formed pair of unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,72) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 5: "!"
+            text run at (5,0) width 8: "\x{202B}b"
+            text run at (13,0) width 0: "\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,92) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 13: "\x{202A}b!\x{202C}"
+        LayoutNGBlockFlow {P} at (0,128) size 769x20
+          LayoutText {#text} at (0,0) size 260x19
+            text run at (0,0) width 260: "Unpaired unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,164) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 5: "!"
+            text run at (5,0) width 8: "\x{202B}b"
+        LayoutNGBlockFlow {DIV} at (0,184) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 13: "\x{202A}b!"
+        LayoutNGBlockFlow {P} at (0,220) size 769x20
+          LayoutText {#text} at (0,0) size 334x19
+            text run at (0,0) width 334: "Empty content inside unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,256) size 769x20
+          LayoutText {#text} at (0,0) size 0x0
+            text run at (0,0) width 0: "\x{202C}\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,276) size 769x20
+          LayoutText {#text} at (0,0) size 0x0
+            text run at (0,0) width 0: "\x{202A}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,296) size 769x20
+          LayoutText {#text} at (0,0) size 0x0
+            text run at (0,0) width 0: "\x{202B}\x{202B}"
+        LayoutNGBlockFlow {P} at (0,332) size 769x20
+          LayoutText {#text} at (0,0) size 280x19
+            text run at (0,0) width 280: "String inside unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,368) size 769x20
+          LayoutText {#text} at (0,0) size 22x19
+            text run at (0,0) width 22: "\x{202C}abc\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,388) size 769x20
+          LayoutText {#text} at (0,0) size 22x19
+            text run at (0,0) width 22: "\x{202A}abc\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,408) size 769x20
+          LayoutText {#text} at (0,0) size 22x19
+            text run at (0,0) width 22: "\x{202B}abc"
+            text run at (22,0) width 0: "\x{202B}"
+        LayoutNGBlockFlow {P} at (0,444) size 769x20
+          LayoutText {#text} at (0,0) size 287x19
+            text run at (0,0) width 287: "String around unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,480) size 769x20
+          LayoutText {#text} at (0,0) size 42x19
+            text run at (0,0) width 42: "def\x{202C}abc\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,500) size 769x20
+          LayoutText {#text} at (0,0) size 42x19
+            text run at (0,0) width 42: "\x{202C}abc\x{202C}def"
+        LayoutNGBlockFlow {DIV} at (0,520) size 769x20
+          LayoutText {#text} at (0,0) size 65x19
+            text run at (0,0) width 65: "xyz\x{202C}abc\x{202C}def"
+        LayoutNGBlockFlow {P} at (0,556) size 769x20
+          LayoutText {#text} at (0,0) size 245x19
+            text run at (0,0) width 245: "Nested unicode bidi control characters."
+        LayoutNGBlockFlow {DIV} at (0,592) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 13: "\x{202A}\x{202A}b!\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,612) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 5: "!"
+            text run at (5,0) width 8: "\x{202B}\x{202B}b"
+            text run at (13,0) width 0: "\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,632) size 769x20
+          LayoutText {#text} at (0,0) size 13x19
+            text run at (0,0) width 13: "\x{202C}\x{202C}b!\x{202C}"
+        LayoutNGBlockFlow {DIV} at (0,652) size 769x20
+          LayoutText {#text} at (0,0) size 20x19
+            text run at (0,0) width 8: "\x{202C}1"
+            text run at (8,0) width 5: "!"
+            text run at (13,0) width 7: "\x{202B}c"
+            text run at (20,0) width 0: "\x{202C}"
+        LayoutNGBlockFlow {P} at (0,688) size 769x20
+          LayoutText {#text} at (0,0) size 275x19
+            text run at (0,0) width 275: "Start with different directionality characters."
+        LayoutNGBlockFlow {DIV} at (0,724) size 769x20
+          LayoutText {#text} at (0,0) size 24x19
+            text run at (0,0) width 24: "12\x{202C}\x{202A}1\x{202C}\x{202B}"
+        LayoutNGBlockFlow {DIV} at (0,744) size 769x20
+          LayoutText {#text} at (0,0) size 16x19
+            text run at (0,0) width 16: "12\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,764) size 769x20
+          LayoutText {#text} at (0,0) size 16x19
+            text run at (0,0) width 16: "\x{660}\x{661}"
+            text run at (16,0) width 0: "\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,784) size 769x20
+          LayoutText {#text} at (0,0) size 20x19
+            text run at (0,0) width 20: "\x{683}\x{684}"
+            text run at (20,0) width 0: "\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,804) size 769x20
+          LayoutText {#text} at (0,0) size 10x19
+            text run at (0,0) width 10: "\x{1}\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,824) size 769x20
+          LayoutText {#text} at (0,0) size 22x19
+            text run at (0,0) width 22: "abc\x{202C}\x{202A}"
+        LayoutNGBlockFlow {DIV} at (0,844) size 769x20
+          LayoutText {#text} at (0,0) size 15x19
+            text run at (0,0) width 15: "\x{5D0}\x{5D1}"
+            text run at (15,0) width 0: "\x{202C}\x{202A}"
+      LayoutNGBlockFlow {UL} at (0,1760) size 769x20
+        LayoutNGListItem {LI} at (40,0) size 729x20
+          LayoutNGListMarker (anonymous) at (-18,0) size 10x20
+            LayoutText (anonymous) at (0,0) size 10x19
+              text run at (0,0) width 10: "\x{2022} "
+          LayoutText {#text} at (0,0) size 704x19
+            text run at (0,0) width 704: "test id=test: the right-most character of rendering result of <PDF>abc<PDF> in RTL block should be c: Success"
+selection start: position 3 of child 0 {#text} of child 20 {DIV} of child 1 {DIV} of body
+selection end:   position 4 of child 0 {#text} of child 20 {DIV} of child 1 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLElement/bdo-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLElement/bdo-expected.txt
new file mode 100644
index 0000000..4f9cfed4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLElement/bdo-expected.txt
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 110x19
+          text run at (0,0) width 110: "Tests: the bdo tag"
+      LayoutNGBlockFlow {P} at (0,36) size 784x20
+        LayoutText {#text} at (0,0) size 328x19
+          text run at (0,0) width 328: "The bdo element overrides the default text direction."
+      LayoutNGBlockFlow {P} at (0,72) size 784x40
+        LayoutText {#text} at (0,0) size 761x39
+          text run at (0,0) width 761: "If successful, the first sentence would be backward, and the second sentence regular. There should then be an extra blank"
+          text run at (0,20) width 697: "line, followed by a line reading only \"A,\" and finally, a sentence where only the word \"umbrella\" is backward."
+      LayoutNGBlockFlow (anonymous) at (0,138) size 784x120
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutInline {BDO} at (0,0) size 221x19
+          LayoutText {#text} at (0,20) size 221x19
+            text run at (0,20) width 221: "This sentence should be backward."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (221,20) size 0x0
+        LayoutInline {BDO} at (0,0) size 209x19
+          LayoutText {#text} at (0,40) size 209x19
+            text run at (0,40) width 209: "This sentence should be forward."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (209,40) size 0x0
+        LayoutInline {BDO} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (0,60) size 0x0
+        LayoutInline {BDO} at (0,0) size 12x19
+          LayoutText {#text} at (0,80) size 12x19
+            text run at (0,80) width 12: "A"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (12,80) size 0x0
+        LayoutInline {BDO} at (0,0) size 290x19
+          LayoutText {#text} at (0,100) size 26x19
+            text run at (0,100) width 26: "My "
+          LayoutInline {BDO} at (0,0) size 55x19
+            LayoutText {#text} at (26,100) size 55x19
+              text run at (26,100) width 55: "umbrella"
+          LayoutText {#text} at (81,100) size 209x19
+            text run at (81,100) width 209: " sure would be useful in this rain."
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,136) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,128) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLImageElement/image-alt-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLImageElement/image-alt-text-expected.txt
new file mode 100644
index 0000000..4eca907
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLImageElement/image-alt-text-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 777x39
+          text run at (0,0) width 777: "This tests whether alt text is shown for image elements with no src attribute. You should see \"Success\" twice, followed by a"
+          text run at (0,20) width 92: "blue rectangle."
+      LayoutNGBlockFlow {P} at (0,56) size 784x97
+        LayoutNGBlockFlow {IMG} at (0,0) size 66x20
+          LayoutInline {SPAN} at (0,0) size 50x19
+            LayoutImage (floating) {IMG} at (0,0) size 16x16
+            LayoutInline {SPAN} at (0,0) size 50x19
+              LayoutText {#text} at (16,0) size 50x19
+                text run at (16,0) width 50: "Success"
+        LayoutBR {BR} at (66,15) size 0x0
+        LayoutNGBlockFlow {IMG} at (0,20) size 102x52 [border: (1px solid #000000)]
+        LayoutBR {BR} at (102,71) size 0x0
+        LayoutImage {IMG} at (0,72) size 75x25
+        LayoutBR {BR} at (75,97) size 0x0
+layer at (9,85) size 100x50 clip at (10,86) size 98x48
+  LayoutNGBlockFlow {SPAN} at (1,1) size 100x50 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 96x20
+      LayoutInline {SPAN} at (0,0) size 50x19
+        LayoutText {#text} at (16,0) size 50x19
+          text run at (16,0) width 50: "Success"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt
new file mode 100644
index 0000000..4840a7d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x76
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x76
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x60
+      LayoutBlockFlow {PROGRESS} at (0,2.19) size 160x16 [border: (2px solid #0000FF)]
+        LayoutBlockFlow {DIV} at (2,2) size 156x12
+          LayoutBlockFlow {DIV} at (0,0) size 156x12 [bgcolor=#808080]
+            LayoutBlockFlow {DIV} at (0,0) size 0x12 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (160,0) size 0x0
+      LayoutBlockFlow {PROGRESS} at (0,22.19) size 160x16 [border: (2px solid #0000FF)]
+        LayoutBlockFlow {DIV} at (2,2) size 156x12
+          LayoutBlockFlow {DIV} at (0,0) size 156x12 [bgcolor=#808080]
+            LayoutBlockFlow {DIV} at (0,0) size 0x12 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (160,20) size 0x0
+      LayoutBlockFlow {PROGRESS} at (0,42.19) size 160x16 [border: (2px solid #FF0000)]
+        LayoutBlockFlow {DIV} at (2,2) size 156x12
+          LayoutBlockFlow {DIV} at (0,0) size 156x12 [bgcolor=#808080]
+            LayoutBlockFlow {DIV} at (0,0) size 78x12 [bgcolor=#008000]
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/progress-element-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/progress-element-expected.txt
new file mode 100644
index 0000000..5952bb8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLProgressElement/progress-element-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutProgress {PROGRESS} at (0,0) size 160x16
+      LayoutInline {SMALL} at (0,0) size 134x14
+        LayoutProgress {PROGRESS} at (160,2.14) size 133.33x13.33
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/children-nodes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/children-nodes-expected.txt
new file mode 100644
index 0000000..934b7e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/children-nodes-expected.txt
@@ -0,0 +1,100 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x74 [border: (1px solid #FF0000)]
+        LayoutNGBlockFlow {P} at (1,17) size 782x40
+          LayoutText {#text} at (0,0) size 766x39
+            text run at (0,0) width 766: "This test verifies that JavaScript returns only direct descendent element nodes in the 'children' collection (an IE extension)."
+            text run at (0,20) width 697: "We also verify that the 'childNodes' collection contains direct descendent nodes of any type (text, element, etc.)"
+      LayoutNGBlockFlow {DIV} at (0,74) size 784x100
+        LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+          LayoutInline {B} at (0,0) size 23x19
+            LayoutText {#text} at (0,0) size 23x19
+              text run at (0,0) width 23: "test"
+          LayoutText {#text} at (23,0) size 4x19
+            text run at (23,0) width 4: " "
+          LayoutInline {U} at (0,0) size 56x19
+            LayoutText {#text} at (27,0) size 56x19
+              text run at (27,0) width 56: "non bold"
+          LayoutText {#text} at (83,0) size 4x19
+            text run at (83,0) width 4: " "
+          LayoutInline {I} at (0,0) size 31x19
+            LayoutText {#text} at (87,0) size 31x19
+              text run at (87,0) width 31: "italic"
+          LayoutText {#text} at (118,0) size 25x19
+            text run at (118,0) width 25: " test"
+        LayoutNGBlockFlow {DIV} at (0,20) size 784x20
+          LayoutText {#text} at (0,0) size 58x19
+            text run at (0,0) width 58: "plain text"
+        LayoutNGBlockFlow {DIV} at (0,40) size 784x20
+          LayoutText {#text} at (0,0) size 74x19
+            text run at (0,0) width 74: "another line"
+        LayoutNGBlockFlow {DIV} at (0,60) size 784x20
+          LayoutText {#text} at (0,0) size 97x19
+            text run at (0,0) width 97: "yet another line"
+        LayoutNGBlockFlow {DIV} at (0,80) size 784x20
+          LayoutInline {SPAN} at (0,0) size 54x19
+            LayoutText {#text} at (0,0) size 30x19
+              text run at (0,0) width 30: "fifth "
+            LayoutInline {B} at (0,0) size 24x19
+              LayoutText {#text} at (30,0) size 24x19
+                text run at (30,0) width 24: "line"
+      LayoutNGBlockFlow {DIV} at (0,174) size 784x400
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutText {#text} at (0,20) size 377x19
+          text run at (0,20) width 377: "Results: children.length = 5 (should be 5 DIV nodes below)"
+        LayoutBR {BR} at (376,20) size 0x0
+        LayoutText {#text} at (0,40) size 113x19
+          text run at (0,40) width 113: "  node: DIV (one)"
+        LayoutBR {BR} at (112,40) size 0x0
+        LayoutText {#text} at (0,60) size 114x19
+          text run at (0,60) width 114: "  node: DIV (two)"
+        LayoutBR {BR} at (113,60) size 0x0
+        LayoutText {#text} at (0,80) size 121x19
+          text run at (0,80) width 121: "  node: DIV (three)"
+        LayoutBR {BR} at (120,80) size 0x0
+        LayoutText {#text} at (0,100) size 116x19
+          text run at (0,100) width 116: "  node: DIV (four)"
+        LayoutBR {BR} at (115,100) size 0x0
+        LayoutText {#text} at (0,120) size 114x19
+          text run at (0,120) width 114: "  node: DIV (five)"
+        LayoutBR {BR} at (113,120) size 0x0
+        LayoutBR {BR} at (0,140) size 0x0
+        LayoutText {#text} at (0,160) size 326x19
+          text run at (0,160) width 326: "childNodes.length = 11 (should be 11 nodes below)"
+        LayoutBR {BR} at (325,160) size 0x0
+        LayoutText {#text} at (0,180) size 155x19
+          text run at (0,180) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,180) size 0x0
+        LayoutText {#text} at (0,200) size 113x19
+          text run at (0,200) width 113: "  node: DIV (one)"
+        LayoutBR {BR} at (112,200) size 0x0
+        LayoutText {#text} at (0,220) size 155x19
+          text run at (0,220) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,220) size 0x0
+        LayoutText {#text} at (0,240) size 114x19
+          text run at (0,240) width 114: "  node: DIV (two)"
+        LayoutBR {BR} at (113,240) size 0x0
+        LayoutText {#text} at (0,260) size 155x19
+          text run at (0,260) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,260) size 0x0
+        LayoutText {#text} at (0,280) size 121x19
+          text run at (0,280) width 121: "  node: DIV (three)"
+        LayoutBR {BR} at (120,280) size 0x0
+        LayoutText {#text} at (0,300) size 155x19
+          text run at (0,300) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,300) size 0x0
+        LayoutText {#text} at (0,320) size 116x19
+          text run at (0,320) width 116: "  node: DIV (four)"
+        LayoutBR {BR} at (115,320) size 0x0
+        LayoutText {#text} at (0,340) size 155x19
+          text run at (0,340) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,340) size 0x0
+        LayoutText {#text} at (0,360) size 114x19
+          text run at (0,360) width 114: "  node: DIV (five)"
+        LayoutBR {BR} at (113,360) size 0x0
+        LayoutText {#text} at (0,380) size 155x19
+          text run at (0,380) width 155: "  node: #text (undefined)"
+        LayoutBR {BR} at (155,380) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/focus-contenteditable-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/focus-contenteditable-expected.txt
new file mode 100644
index 0000000..acd13aa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/focus-contenteditable-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollY 282.00 scrollHeight 902
+  LayoutView at (0,0) size 800x600
+layer at (0,-282) size 785x902 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x902
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x886
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x40
+        LayoutText {#text} at (0,0) size 493x19
+          text run at (0,0) width 493: "This test will try to call focus() on a contenteditable div, and then a normal div."
+        LayoutBR {BR} at (492,0) size 0x0
+        LayoutText {#text} at (0,20) size 372x19
+          text run at (0,20) width 372: "The window should scroll to reveal the contenteditable div."
+      LayoutNGBlockFlow {DIV} at (0,40) size 500x800
+      LayoutBlockFlow {DIV} at (0,840) size 769x26 [border: (3px solid #000000)]
+        LayoutText {#text} at (3,3) size 122x19
+          text run at (3,3) width 122: "contentEditable div"
+      LayoutNGBlockFlow {DIV} at (0,866) size 769x20
+        LayoutText {#text} at (0,0) size 77x19
+          text run at (0,0) width 77: "Test Passed."
+      LayoutNGBlockFlow {DIV} at (0,886) size 769x0
+caret: position 0 of child 0 {#text} of child 5 {DIV} of body
+scrolled to 0,282
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/002-expected.txt
new file mode 100644
index 0000000..4eccda9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/002-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x20
+        LayoutNGBlockFlow (floating) {DIV} at (522,0) size 262x104 [border: (2px solid #FF0000)]
+          LayoutText {#text} at (2,2) size 258x19
+            text run at (2,2) width 258: "I should become a right-floating element."
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 393x19
+            text run at (0,0) width 393: "This text should be on the left. The float should be to the right."
+      LayoutNGBlockFlow {DIV} at (0,20) size 784x30
+      LayoutNGBlockFlow {DIV} at (0,50) size 784x40
+        LayoutNGBlockFlow (floating) {SPAN} at (0,0) size 253x104 [border: (2px solid #FF0000)]
+          LayoutText {#text} at (2,2) size 249x19
+            text run at (2,2) width 249: "I should become a left-floating element."
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+          LayoutText {#text} at (253,0) size 261x39
+            text run at (253,0) width 261: "This text should be on the right. The float"
+            text run at (253,20) width 128: "should be to the left."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/013-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/013-expected.txt
new file mode 100644
index 0000000..9e7ff96e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/013-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutTable {TABLE} at (0,0) size 200x200 [border: (1px outset #808080)]
+        LayoutTableSection {TFOOT} at (1,199) size 198x0
+        LayoutTableSection {TBODY} at (1,1) size 198x198
+          LayoutTableRow {TR} at (0,0) size 198x99
+            LayoutNGTableCell {TD} at (0,38) size 97x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,39) size 41x19
+                text run at (1,39) width 41: "span 1"
+            LayoutNGTableCell {TD} at (97,38) size 101x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,39) size 41x19
+                text run at (1,39) width 41: "span 1"
+          LayoutTableRow {TR} at (0,99) size 198x99
+            LayoutNGTableCell {TD} at (0,137) size 198x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=2]
+              LayoutText {#text} at (1,39) size 87x19
+                text run at (1,39) width 87: "should span 2"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/float-from-empty-line-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/float-from-empty-line-expected.txt
new file mode 100644
index 0000000..24fef87
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/float-from-empty-line-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 100x50
+        LayoutNGBlockFlow {DIV} at (0,0) size 100x50 [bgcolor=#0000FF]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (floating) {DIV} at (0,50) size 50x50 [bgcolor=#FF0000]
+          LayoutNGBlockFlow {DIV} at (0,0) size 50x50 [bgcolor=#008000]
+        LayoutBR {BR} at (100,50) size 0x0
+        LayoutImage {IMG} at (50,50) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-2-expected.txt
new file mode 100644
index 0000000..841d6cd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-2-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x50 [color=#FF0000]
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x50
+          LayoutText {#text} at (0,0) size 50x50
+            text run at (0,0) width 50: "Z"
+layer at (8,8) size 50x50
+  LayoutNGBlockFlow (positioned) {SPAN} at (8,8) size 50x50 [color=#008000]
+    LayoutText {#text} at (0,0) size 50x50
+      text run at (0,0) width 50: "Y"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-expected.txt
new file mode 100644
index 0000000..841d6cd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/floating-to-positioned-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x50 [color=#FF0000]
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x50
+          LayoutText {#text} at (0,0) size 50x50
+            text run at (0,0) width 50: "Z"
+layer at (8,8) size 50x50
+  LayoutNGBlockFlow (positioned) {SPAN} at (8,8) size 50x50 [color=#008000]
+    LayoutText {#text} at (0,0) size 50x50
+      text run at (0,0) width 50: "Y"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/genContentDestroyChildren-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/genContentDestroyChildren-expected.txt
new file mode 100644
index 0000000..1649bb92
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/genContentDestroyChildren-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x64
+        LayoutInline {A} at (0,0) size 52x64
+          LayoutImage {IMG} at (0,0) size 52x64
+          LayoutBR {BR} at (52,64) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/unicode-bidi-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/unicode-bidi-expected.txt
new file mode 100644
index 0000000..3bc43a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/unicode-bidi-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600 layerType: background only
+layer at (8,8) size 100x50
+  LayoutNGBlockFlow (positioned) zI: -1 {DIV} at (8,8) size 100x50 [color=#FF0000]
+    LayoutInline {SPAN} at (0,0) size 50x50 [color=#008000]
+      LayoutText {#text} at (0,0) size 50x50
+        text run at (0,0) width 50: "x"
+    LayoutText zI: -1 {#text} at (50,0) size 50x50
+      text run at (50,0) width 50: "x"
+layer at (0,0) size 800x600 layerType: foreground only
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x50 [color=#008000]
+        LayoutText {#text} at (0,0) size 100x50
+          text run at (0,0) width 100: "xp"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/window-resize-scrollbars-test-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/window-resize-scrollbars-test-expected.txt
new file mode 100644
index 0000000..70d8e3d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dynamic/window-resize-scrollbars-test-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 776x576
+  LayoutView at (0,0) size 776x576
+layer at (0,0) size 768x568
+  LayoutNGBlockFlow {HTML} at (0,0) size 768x568
+    LayoutNGBlockFlow {BODY} at (8,8) size 752x552
+      LayoutText {#text} at (0,0) size 484x19
+        text run at (0,0) width 484: "This window should not have scroll bars. If it has scroll bars, try to use them."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/001-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/001-expected.txt
new file mode 100644
index 0000000..ececd07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/001-expected.txt
@@ -0,0 +1,65 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {H1} at (0,0) size 784x37
+        LayoutText {#text} at (0,0) size 230x36
+          text run at (0,0) width 230: "Min-Width Tests"
+      LayoutTable {TABLE} at (0,58.44) size 784x86 [border: (2px outset #808080)]
+        LayoutTableSection {TBODY} at (2,2) size 780x82
+          LayoutTableRow {TR} at (0,0) size 780x82
+            LayoutNGTableCell {TD} at (0,0) size 124x82 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+              LayoutMenuList {SELECT} at (1,1) size 122x80 [bgcolor=#C0C0C0] [border: (40px solid #FF0000)]
+                LayoutNGBlockFlow (anonymous) at (40,40) size 42x18
+                  LayoutText (anonymous) at (4,1) size 22x16
+                    text run at (4,1) width 22: "Foo"
+            LayoutNGTableCell {TD} at (124,40) size 656x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+      LayoutNGBlockFlow {P} at (0,160.44) size 784x24
+        LayoutTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
+          LayoutTableSection {TBODY} at (2,2) size 780x20
+            LayoutTableRow {TR} at (0,0) size 780x20
+              LayoutNGTableCell {TD} at (0,0) size 22x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (5,4) size 13x12
+              LayoutNGTableCell {TD} at (22,9) size 758x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+      LayoutNGBlockFlow {P} at (0,200.44) size 784x21
+        LayoutTable {TABLE} at (0,0) size 784x21 [border: (2px outset #808080)]
+          LayoutTableSection {TBODY} at (2,2) size 780x17
+            LayoutTableRow {TR} at (0,0) size 780x17
+              LayoutNGTableCell {TD} at (0,0) size 23x17 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (6,4) size 13x12
+              LayoutNGTableCell {TD} at (23,7) size 757x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+      LayoutNGBlockFlow {P} at (0,237.44) size 784x28
+        LayoutTable {TABLE} at (0,0) size 784x28 [border: (2px outset #808080)]
+          LayoutTableSection {TBODY} at (2,2) size 780x24
+            LayoutTableRow {TR} at (0,0) size 780x24
+              LayoutNGTableCell {TD} at (0,0) size 40x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                LayoutButton {INPUT} at (1,1) size 38x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 22x16
+                    LayoutText {#text} at (0,0) size 22x16
+                      text run at (0,0) width 22: "Foo"
+              LayoutNGTableCell {TD} at (40,11) size 740x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+      LayoutNGBlockFlow {P} at (0,281.44) size 784x258
+        LayoutTable {TABLE} at (0,0) size 784x88 [border: (2px outset #808080)]
+          LayoutTableSection {TBODY} at (2,2) size 780x84
+            LayoutTableRow {TR} at (0,0) size 780x84
+              LayoutNGTableCell {TD} at (0,0) size 116x84 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                LayoutButton {INPUT} at (1,1) size 114x82 [bgcolor=#C0C0C0] [border: (40px solid #FF0000)]
+                  LayoutNGBlockFlow (anonymous) at (46,41) size 22x16
+                    LayoutText {#text} at (0,0) size 22x16
+                      text run at (0,0) width 22: "Foo"
+              LayoutNGTableCell {TD} at (116,41) size 664x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+        LayoutTable {TABLE} at (0,88) size 784x88 [border: (2px outset #808080)]
+          LayoutTableSection {TBODY} at (2,2) size 780x84
+            LayoutTableRow {TR} at (0,0) size 780x84
+              LayoutNGTableCell {TD} at (0,0) size 171x84 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                LayoutButton {INPUT} at (1,1) size 169x82 [bgcolor=#C0C0C0] [border: (40px solid #FF0000)]
+                  LayoutNGBlockFlow (anonymous) at (46,41) size 77x16
+                    LayoutText {#text} at (0,0) size 77x16
+                      text run at (0,0) width 77: "Submit a bug"
+              LayoutNGTableCell {TD} at (171,41) size 609x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+        LayoutNGBlockFlow (anonymous) at (0,176) size 784x82
+          LayoutButton {INPUT} at (0,0) size 114x82 [bgcolor=#C0C0C0] [border: (40px solid #FF0000)]
+            LayoutNGBlockFlow (anonymous) at (46,41) size 22x16
+              LayoutText {#text} at (0,0) size 22x16
+                text run at (0,0) width 22: "Foo"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/007-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/007-expected.txt
new file mode 100644
index 0000000..8940708
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/007-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutFieldset {FIELDSET} at (2,0) size 115x77.59 [border: (2px groove #C0C0C0)]
+        LayoutNGBlockFlow {LEGEND} at (14,0) size 87x20
+          LayoutText {#text} at (2,0) size 83x19
+            text run at (2,0) width 83: "Number One"
+        LayoutNGBlockFlow (anonymous) at (14,25.59) size 87x40
+          LayoutText {#text} at (0,0) size 80x19
+            text run at (0,0) width 80: "Hello world."
+          LayoutBR {BR} at (80,0) size 0x0
+          LayoutText {#text} at (0,20) size 80x19
+            text run at (0,20) width 80: "Hello world."
+      LayoutText {#text} at (119,45) size 4x20
+        text run at (119,45) width 4: " "
+      LayoutFieldset {FIELDSET} at (125,20) size 116.89x57.59 [border: (2px groove #C0C0C0)]
+        LayoutNGBlockFlow {LEGEND} at (14,0) size 88.59x20
+          LayoutText {#text} at (2,0) size 85x19
+            text run at (2,0) width 85: "Number Two"
+        LayoutNGBlockFlow (anonymous) at (14,25.59) size 88.89x20
+          LayoutText {#text} at (0,0) size 80x19
+            text run at (0,0) width 80: "Hello world."
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-buttons-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-buttons-expected.txt
new file mode 100644
index 0000000..d462e4c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-buttons-expected.txt
@@ -0,0 +1,167 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x355
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x355
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x339
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x80
+        LayoutText {#text} at (0,0) size 533x19
+          text run at (0,0) width 533: "Tests for basic button rendering. Creates a table with seven columns and seven rows."
+        LayoutBR {BR} at (532,0) size 0x0
+        LayoutText {#text} at (0,20) size 507x19
+          text run at (0,20) width 507: "Creates two different types of buttons, one with an image (a red dot) and another"
+        LayoutBR {BR} at (506,20) size 0x0
+        LayoutText {#text} at (0,40) size 644x19
+          text run at (0,40) width 644: "with text (\"foo\") and then uses six different paddings to make sure each of the buttons render properly."
+        LayoutBR {BR} at (643,40) size 0x0
+        LayoutBR {BR} at (0,60) size 0x0
+      LayoutTable {TABLE} at (0,80) size 684x259
+        LayoutTableSection {TBODY} at (0,0) size 684x259
+          LayoutTableRow {TR} at (0,0) size 684x22
+            LayoutNGTableCell {TD} at (0,0) size 169x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 42x19
+                text run at (1,1) width 42: "styling"
+            LayoutNGTableCell {TD} at (169,0) size 60x22 [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 58x19
+                text run at (1,1) width 58: "<button>"
+            LayoutNGTableCell {TD} at (229,0) size 157x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 155x19
+                text run at (1,1) width 155: "(offsetH,W) (clientH,W)"
+            LayoutNGTableCell {TD} at (386,0) size 132x22 [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 130x19
+                text run at (1,1) width 130: "<input type=button>"
+            LayoutNGTableCell {TD} at (518,0) size 166x22 [r=0 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 164x19
+                text run at (1,1) width 164: "(offsetH,W) (clientH, -W)"
+          LayoutTableRow {TR} at (0,22) size 684x24
+            LayoutNGTableCell {TD} at (0,23) size 169x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,2) size 53x19
+                text run at (1,2) width 53: "(default)"
+            LayoutNGTableCell {TD} at (169,22) size 60x24 [r=1 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 26x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (8,3) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,23) size 157x22 [r=1 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,2) size 104x19
+                text run at (1,2) width 104: "(22, 26) (18, 22)"
+            LayoutNGTableCell {TD} at (386,22) size 132x24 [r=1 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 34x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (8,3) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,23) size 166x22 [r=1 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,2) size 104x19
+                text run at (1,2) width 104: "(22, 34) (18, 30)"
+          LayoutTableRow {TR} at (0,46) size 684x22
+            LayoutNGTableCell {TD} at (0,46) size 169x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 67x19
+                text run at (1,1) width 67: "padding: 0"
+            LayoutNGTableCell {TD} at (169,46) size 60x22 [r=2 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 14x20 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (2,2) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,46) size 157x22 [r=2 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 104x19
+                text run at (1,1) width 104: "(20, 14) (16, 10)"
+            LayoutNGTableCell {TD} at (386,46) size 132x22 [r=2 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 22x20 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (2,2) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,46) size 166x22 [r=2 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 104x19
+                text run at (1,1) width 104: "(20, 22) (16, 18)"
+          LayoutTableRow {TR} at (0,68) size 684x48
+            LayoutNGTableCell {TD} at (0,81) size 169x22 [r=3 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,14) size 88x19
+                text run at (1,14) width 88: "padding: 10%"
+            LayoutNGTableCell {TD} at (169,75) size 60x33.59 [r=3 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 25.59x31.59 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (7.80,7.80) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,81) size 157x22 [r=3 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,14) size 104x19
+                text run at (1,14) width 104: "(32, 26) (28, 22)"
+            LayoutNGTableCell {TD} at (386,68) size 132x48 [r=3 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 48x46 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (15,15) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,81) size 166x22 [r=3 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,14) size 104x19
+                text run at (1,14) width 104: "(46, 48) (42, 44)"
+          LayoutTableRow {TR} at (0,116) size 684x26
+            LayoutNGTableCell {TD} at (0,118) size 169x22 [r=4 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 83x19
+                text run at (1,3) width 83: "padding: 2px"
+            LayoutNGTableCell {TD} at (169,116) size 60x26 [r=4 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 18x24 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (4,4) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,118) size 157x22 [r=4 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 104x19
+                text run at (1,3) width 104: "(24, 18) (20, 14)"
+            LayoutNGTableCell {TD} at (386,116) size 132x26 [r=4 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 26x24 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (4,4) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,118) size 166x22 [r=4 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 104x19
+                text run at (1,3) width 104: "(24, 26) (20, 22)"
+          LayoutTableRow {TR} at (0,142) size 684x27
+            LayoutNGTableCell {TD} at (0,144) size 169x22 [r=5 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 167x19
+                text run at (1,3) width 167: "padding: 2px 6px 3px 6px"
+            LayoutNGTableCell {TD} at (169,142) size 60x27 [r=5 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 26x25 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (8,4) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,144) size 157x22 [r=5 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 104x19
+                text run at (1,3) width 104: "(25, 26) (21, 22)"
+            LayoutNGTableCell {TD} at (386,142) size 132x27 [r=5 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 34x25 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (8,4) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,144) size 166x22 [r=5 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 104x19
+                text run at (1,3) width 104: "(25, 34) (21, 30)"
+          LayoutTableRow {TR} at (0,169) size 684x28
+            LayoutNGTableCell {TD} at (0,172) size 169x22 [r=6 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,4) size 111x19
+                text run at (1,4) width 111: "padding: 3px 7px"
+            LayoutNGTableCell {TD} at (169,169) size 60x28 [r=6 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 28x26 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (9,5) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,172) size 157x22 [r=6 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,4) size 104x19
+                text run at (1,4) width 104: "(26, 28) (22, 24)"
+            LayoutNGTableCell {TD} at (386,169) size 132x28 [r=6 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 36x26 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (9,5) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,172) size 166x22 [r=6 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,4) size 104x19
+                text run at (1,4) width 104: "(26, 36) (22, 32)"
+          LayoutTableRow {TR} at (0,197) size 684x62
+            LayoutNGTableCell {TD} at (0,217) size 169x22 [r=7 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,21) size 91x19
+                text run at (1,21) width 91: "padding: 20px"
+            LayoutNGTableCell {TD} at (169,197) size 60x62 [r=7 c=1 rs=1 cs=1]
+              LayoutButton {BUTTON} at (1,1) size 54x60 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (22,22) size 10x16
+                  LayoutImage {IMG} at (0,3) size 10x10
+            LayoutNGTableCell {TD} at (229,217) size 157x22 [r=7 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,21) size 104x19
+                text run at (1,21) width 104: "(60, 54) (56, 50)"
+            LayoutNGTableCell {TD} at (386,197) size 132x62 [r=7 c=3 rs=1 cs=1]
+              LayoutButton {INPUT} at (1,1) size 62x60 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                LayoutNGBlockFlow (anonymous) at (22,22) size 18x16
+                  LayoutText {#text} at (0,0) size 18x16
+                    text run at (0,0) width 18: "foo"
+            LayoutNGTableCell {TD} at (518,217) size 166x22 [r=7 c=4 rs=1 cs=1]
+              LayoutText {#text} at (1,21) size 104x19
+                text run at (1,21) width 104: "(60, 62) (56, 58)"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-inputs-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-inputs-expected.txt
new file mode 100644
index 0000000..8d4b7b52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/basic-inputs-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 470x582
+      LayoutNGBlockFlow (anonymous) at (0,0) size 470x340
+        LayoutText {#text} at (0,0) size 322x19
+          text run at (0,0) width 322: "This tests basic inputs. Here's what you should see:"
+        LayoutBR {BR} at (322,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+        LayoutText {#text} at (0,40) size 455x59
+          text run at (0,40) width 432: "first line: the letter \"a\" and then a text input field filled with repeating"
+          text run at (0,60) width 455: "\"foobarbaz\", then the word \"text\" followed by a disabled text input field"
+          text run at (0,80) width 328: "filled with \"foo\" and then the letter \"b\" and then \"a\""
+        LayoutBR {BR} at (328,80) size 0x0
+        LayoutBR {BR} at (0,100) size 0x0
+        LayoutText {#text} at (0,120) size 466x59
+          text run at (0,120) width 466: "second line: and then a password input field that's filled and then the word"
+          text run at (0,140) width 448: "\"password\" and then a disabled password field that's filled and then the"
+          text run at (0,160) width 57: "letter \"b\""
+        LayoutBR {BR} at (57,160) size 0x0
+        LayoutBR {BR} at (0,180) size 0x0
+        LayoutText {#text} at (0,200) size 451x39
+          text run at (0,200) width 451: "third line: the letter \"a\" and then a checkbox (unchecked) with the word"
+          text run at (0,220) width 353: "\"checkbox\" and then a disabled checkbox and letter \"b\""
+        LayoutBR {BR} at (353,220) size 0x0
+        LayoutBR {BR} at (0,240) size 0x0
+        LayoutText {#text} at (0,260) size 449x59
+          text run at (0,260) width 401: "fourth line: the last line has the letter \"a\" and then a redio button"
+          text run at (0,280) width 449: "(unselected) and then the word \"radio\" and then a disabled radio button"
+          text run at (0,300) width 107: "and the letter \"b\""
+        LayoutBR {BR} at (107,300) size 0x0
+        LayoutBR {BR} at (0,320) size 0x0
+      LayoutNGBlockFlow {DIV} at (10,350) size 450x46 [border: (1px solid #FF0000)]
+        LayoutText {#text} at (1,2) size 7x19
+          text run at (1,2) width 7: "a"
+        LayoutTextControl {INPUT} at (8,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (162,2) size 27x19
+          text run at (162,2) width 27: "text "
+        LayoutTextControl {INPUT} at (189,1) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (343,2) size 19x19
+          text run at (343,2) width 19: "b a"
+        LayoutTextControl {INPUT} at (1,23) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (155,24) size 64x19
+          text run at (155,24) width 64: "password "
+        LayoutTextControl {INPUT} at (219,23) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (373,24) size 8x19
+          text run at (373,24) width 8: "b"
+      LayoutNGBlockFlow {DIV} at (10,406) size 450x23 [border: (1px solid #FF0000)]
+        LayoutText {#text} at (1,2) size 7x19
+          text run at (1,2) width 7: "a"
+        LayoutBlockFlow {INPUT} at (12,4) size 13x13
+        LayoutText {#text} at (28,2) size 65x19
+          text run at (28,2) width 65: "checkbox "
+        LayoutBlockFlow {INPUT} at (97,4) size 13x13 [color=#545454]
+        LayoutText {#text} at (113,2) size 8x19
+          text run at (113,2) width 8: "b"
+      LayoutNGBlockFlow {DIV} at (10,439) size 450x23 [border: (1px solid #FF0000)]
+        LayoutText {#text} at (1,2) size 7x19
+          text run at (1,2) width 7: "a"
+        LayoutBlockFlow {INPUT} at (13,4) size 13x13
+        LayoutText {#text} at (29,2) size 36x19
+          text run at (29,2) width 36: "radio "
+        LayoutBlockFlow {INPUT} at (70,4) size 13x13 [color=#545454]
+        LayoutText {#text} at (86,2) size 8x19
+          text run at (86,2) width 8: "b"
+layer at (28,362) size 150x16 scrollWidth 172
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 171x16
+      text run at (0,0) width 171: "foobarbazfoobarbazfoobarbaz"
+layer at (209,362) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (21,384) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 15x16
+      text run at (0,0) width 15: "\x{2022}\x{2022}\x{2022}"
+layer at (239,384) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 15x16
+      text run at (0,0) width 15: "\x{2022}\x{2022}\x{2022}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-sizes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-sizes-expected.txt
new file mode 100644
index 0000000..5c42f93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-sizes-expected.txt
@@ -0,0 +1,111 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutButton {BUTTON} at (0,8) size 40.45x12 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 24.45x6
+          LayoutText {#text} at (0,0) size 25x6
+            text run at (0,0) width 25: "Test Button"
+      LayoutText {#text} at (40,1) size 5x19
+        text run at (40,1) width 5: " "
+      LayoutButton {BUTTON} at (44.45,8) size 46.34x12 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 30.34x6
+          LayoutText {#text} at (0,0) size 31x6
+            text run at (0,0) width 31: "Test Button"
+      LayoutText {#text} at (90,1) size 5x19
+        text run at (90,1) width 5: " "
+      LayoutButton {BUTTON} at (94.80,7) size 52.23x13 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 36.23x7
+          LayoutText {#text} at (0,0) size 37x7
+            text run at (0,0) width 37: "Test Button"
+      LayoutText {#text} at (147,1) size 5x19
+        text run at (147,1) width 5: " "
+      LayoutButton {BUTTON} at (151.03,5) size 53.13x16 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 37.13x10
+          LayoutText {#text} at (0,0) size 38x10
+            text run at (0,0) width 38: "Test Button"
+      LayoutText {#text} at (204,1) size 5x19
+        text run at (204,1) width 5: " "
+      LayoutButton {BUTTON} at (208.16,4) size 64.02x18 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 48.02x12
+          LayoutText {#text} at (0,0) size 48x12
+            text run at (0,0) width 48: "Test Button"
+      LayoutText {#text} at (272,1) size 5x19
+        text run at (272,1) width 5: " "
+      LayoutButton {BUTTON} at (276.17,3) size 68.91x19 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 52.91x13
+          LayoutText {#text} at (0,0) size 53x13
+            text run at (0,0) width 53: "Test Button"
+      LayoutText {#text} at (345,1) size 5x19
+        text run at (345,1) width 5: " "
+      LayoutButton {BUTTON} at (349.08,2) size 70.78x20 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 54.78x14
+          LayoutText {#text} at (0,0) size 55x14
+            text run at (0,0) width 55: "Test Button"
+      LayoutText {#text} at (419,1) size 5x19
+        text run at (419,1) width 5: " "
+      LayoutButton {INPUT} at (423.86,0) size 82.53x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 66.53x16
+          LayoutText {#text} at (0,0) size 67x16
+            text run at (0,0) width 67: "Test Button"
+      LayoutText {#text} at (506,1) size 5x19
+        text run at (506,1) width 5: " "
+      LayoutButton {BUTTON} at (510.39,1) size 75.67x21 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 59.67x15
+          LayoutText {#text} at (0,0) size 60x15
+            text run at (0,0) width 60: "Test Button"
+      LayoutText {#text} at (586,1) size 5x19
+        text run at (586,1) width 5: " "
+      LayoutButton {BUTTON} at (590.06,0) size 82.56x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 66.56x16
+          LayoutText {#text} at (0,0) size 67x16
+            text run at (0,0) width 67: "Test Button"
+      LayoutText {#text} at (672,1) size 5x19
+        text run at (672,1) width 5: " "
+      LayoutButton {BUTTON} at (676.63,0) size 87.45x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 71.45x16
+          LayoutText {#text} at (0,0) size 72x16
+            text run at (0,0) width 72: "Test Button"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutButton {BUTTON} at (0,27) size 89.34x23 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 73.34x17
+          LayoutText {#text} at (0,0) size 74x17
+            text run at (0,0) width 74: "Test Button"
+      LayoutText {#text} at (89,29) size 5x19
+        text run at (89,29) width 5: " "
+      LayoutButton {BUTTON} at (93.34,26) size 95.23x25 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 79.23x19
+          LayoutText {#text} at (0,0) size 80x18
+            text run at (0,0) width 80: "Test Button"
+      LayoutText {#text} at (188,29) size 5x19
+        text run at (188,29) width 5: " "
+      LayoutButton {BUTTON} at (192.58,26) size 100.13x26 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 84.13x20
+          LayoutText {#text} at (0,0) size 85x19
+            text run at (0,0) width 85: "Test Button"
+      LayoutText {#text} at (292,29) size 5x19
+        text run at (292,29) width 5: " "
+      LayoutButton {BUTTON} at (296.70,24) size 106.02x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 90.02x22
+          LayoutText {#text} at (0,0) size 90x21
+            text run at (0,0) width 90: "Test Button"
+      LayoutText {#text} at (402,29) size 5x19
+        text run at (402,29) width 5: " "
+      LayoutButton {BUTTON} at (406.72,23) size 112.91x29 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 96.91x23
+          LayoutText {#text} at (0,0) size 97x22
+            text run at (0,0) width 97: "Test Button"
+      LayoutText {#text} at (519,29) size 5x19
+        text run at (519,29) width 5: " "
+      LayoutButton {BUTTON} at (523.63,22) size 116.80x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 100.80x24
+          LayoutText {#text} at (0,0) size 101x23
+            text run at (0,0) width 101: "Test Button"
+      LayoutText {#text} at (640,29) size 5x19
+        text run at (640,29) width 5: " "
+      LayoutButton {BUTTON} at (644.42,22) size 123.69x31 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 107.69x25
+          LayoutText {#text} at (0,0) size 108x24
+            text run at (0,0) width 108: "Test Button"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-table-styles-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-table-styles-expected.txt
new file mode 100644
index 0000000..e1a33e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button-table-styles-expected.txt
@@ -0,0 +1,135 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 338x19
+          text run at (0,0) width 338: "This tests that buttons don't honor table display styles."
+        LayoutBR {BR} at (338,0) size 0x0
+      LayoutButton {INPUT} at (0,20) size 93x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 77x16
+          LayoutText {#text} at (0,0) size 77x16
+            text run at (0,0) width 77: "display: table"
+      LayoutButton {INPUT} at (0,42) size 93x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 77x16
+          LayoutText {#text} at (0,0) size 77x16
+            text run at (0,0) width 77: "display: table"
+      LayoutNGBlockFlow (anonymous) at (0,64) size 784x398
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+        LayoutButton {INPUT} at (0,40) size 127x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 111x16
+            LayoutText {#text} at (0,0) size 111x16
+              text run at (0,0) width 111: "display: inline-table"
+        LayoutText {#text} at (127,41) size 4x19
+          text run at (127,41) width 4: " "
+        LayoutButton {INPUT} at (131,40) size 127x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 111x16
+            LayoutText {#text} at (0,0) size 111x16
+              text run at (0,0) width 111: "display: inline-table"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (258,41) size 0x0
+        LayoutBR {BR} at (0,62) size 0x0
+        LayoutButton {INPUT} at (0,82) size 153x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 137x16
+            LayoutText {#text} at (0,0) size 137x16
+              text run at (0,0) width 137: "display: table-row-group"
+        LayoutText {#text} at (153,83) size 4x19
+          text run at (153,83) width 4: " "
+        LayoutButton {INPUT} at (157,82) size 153x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 137x16
+            LayoutText {#text} at (0,0) size 137x16
+              text run at (0,0) width 137: "display: table-row-group"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (310,83) size 0x0
+        LayoutBR {BR} at (0,104) size 0x0
+        LayoutButton {INPUT} at (0,124) size 172x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 156x16
+            LayoutText {#text} at (0,0) size 156x16
+              text run at (0,0) width 156: "display: table-header-group"
+        LayoutText {#text} at (172,125) size 4x19
+          text run at (172,125) width 4: " "
+        LayoutButton {INPUT} at (176,124) size 172x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 156x16
+            LayoutText {#text} at (0,0) size 156x16
+              text run at (0,0) width 156: "display: table-header-group"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (348,125) size 0x0
+        LayoutBR {BR} at (0,146) size 0x0
+        LayoutButton {INPUT} at (0,166) size 166x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 150x16
+            LayoutText {#text} at (0,0) size 150x16
+              text run at (0,0) width 150: "display: table-footer-group"
+        LayoutText {#text} at (166,167) size 4x19
+          text run at (166,167) width 4: " "
+        LayoutButton {INPUT} at (170,166) size 166x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 150x16
+            LayoutText {#text} at (0,0) size 150x16
+              text run at (0,0) width 150: "display: table-footer-group"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (336,167) size 0x0
+        LayoutBR {BR} at (0,188) size 0x0
+        LayoutButton {INPUT} at (0,208) size 117x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 101x16
+            LayoutText {#text} at (0,0) size 101x16
+              text run at (0,0) width 101: "display: table-row"
+        LayoutText {#text} at (117,209) size 4x19
+          text run at (117,209) width 4: " "
+        LayoutButton {INPUT} at (121,208) size 117x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 101x16
+            LayoutText {#text} at (0,0) size 101x16
+              text run at (0,0) width 101: "display: table-row"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (238,209) size 0x0
+        LayoutBR {BR} at (0,230) size 0x0
+        LayoutButton {INPUT} at (0,250) size 175x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 159x16
+            LayoutText {#text} at (0,0) size 159x16
+              text run at (0,0) width 159: "display: table-column-group"
+        LayoutText {#text} at (175,251) size 4x19
+          text run at (175,251) width 4: " "
+        LayoutButton {INPUT} at (179,250) size 175x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 159x16
+            LayoutText {#text} at (0,0) size 159x16
+              text run at (0,0) width 159: "display: table-column-group"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (354,251) size 0x0
+        LayoutBR {BR} at (0,272) size 0x0
+        LayoutButton {INPUT} at (0,292) size 139x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 123x16
+            LayoutText {#text} at (0,0) size 123x16
+              text run at (0,0) width 123: "display: table-column"
+        LayoutText {#text} at (139,293) size 4x19
+          text run at (139,293) width 4: " "
+        LayoutButton {INPUT} at (143,292) size 139x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 123x16
+            LayoutText {#text} at (0,0) size 123x16
+              text run at (0,0) width 123: "display: table-column"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (282,293) size 0x0
+        LayoutBR {BR} at (0,314) size 0x0
+        LayoutButton {INPUT} at (0,334) size 117x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 101x16
+            LayoutText {#text} at (0,0) size 101x16
+              text run at (0,0) width 101: "display: table-cell"
+        LayoutText {#text} at (117,335) size 4x19
+          text run at (117,335) width 4: " "
+        LayoutButton {INPUT} at (121,334) size 117x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 101x16
+            LayoutText {#text} at (0,0) size 101x16
+              text run at (0,0) width 101: "display: table-cell"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (238,335) size 0x0
+        LayoutBR {BR} at (0,356) size 0x0
+        LayoutButton {INPUT} at (0,376) size 139x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 123x16
+            LayoutText {#text} at (0,0) size 123x16
+              text run at (0,0) width 123: "display: table-caption"
+        LayoutText {#text} at (139,377) size 4x19
+          text run at (139,377) width 4: " "
+        LayoutButton {INPUT} at (143,376) size 139x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 123x16
+            LayoutText {#text} at (0,0) size 123x16
+              text run at (0,0) width 123: "display: table-caption"
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button/button-align-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button/button-align-expected.txt
new file mode 100644
index 0000000..097cd43a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/button/button-align-expected.txt
@@ -0,0 +1,37 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 598x19
+          text run at (0,0) width 598: "The following button elements should all be rendered on the left, with their text center justified."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x88
+        LayoutButton {BUTTON} at (0,0) size 300x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 284x16
+            LayoutText {#text} at (46,0) size 192x16
+              text run at (46,0) width 192: "This is should be center justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,16) size 0x0
+        LayoutButton {BUTTON} at (0,22) size 300x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 284x16
+            LayoutText {#text} at (46,0) size 192x16
+              text run at (46,0) width 192: "This is should be center justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,38) size 0x0
+        LayoutButton {BUTTON} at (0,44) size 300x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 284x16
+            LayoutText {#text} at (46,0) size 192x16
+              text run at (46,0) width 192: "This is should be center justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,60) size 0x0
+        LayoutButton {BUTTON} at (0,66) size 300x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 284x16
+            LayoutText {#text} at (46,0) size 192x16
+              text run at (46,0) width 192: "This is should be center justified."
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,124) size 784x22
+        LayoutButton {BUTTON} at (0,0) size 300x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 284x16
+            LayoutText {#text} at (46,0) size 192x16
+              text run at (46,0) width 192: "This is should be center justified."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-clip-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-clip-expected.txt
new file mode 100644
index 0000000..8911342
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-clip-expected.txt
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 228x19
+          text run at (0,0) width 228: "Tests that buttons clip their contents."
+      LayoutNGBlockFlow {P} at (0,36) size 784x20
+        LayoutText {#text} at (0,0) size 763x19
+          text run at (0,0) width 763: "Each button below should have a yellow border and a black dashed outline. Contents should overflow the yellow border."
+      LayoutNGBlockFlow {P} at (0,72) size 784x50
+        LayoutButton {BUTTON} at (0,0) size 100x50 [bgcolor=#C0C0C0] [border: (2px outset #FFFF00)]
+          LayoutNGBlockFlow (anonymous) at (12,12) size 76x204
+            LayoutBlockFlow {DIV} at (0,0) size 74x204 [bgcolor=#008080] [border: (2px solid #800080)]
+              LayoutBlockFlow (floating) {DIV} at (52,2) size 20x100 [bgcolor=#006400]
+              LayoutNGBlockFlow (anonymous) at (2,2) size 70x64
+                LayoutText {#text} at (10,0) size 38x64
+                  text run at (10,0) width 30: "short"
+                  text run at (8,16) width 34: "words"
+                  text run at (13,32) width 24: "only"
+                  text run at (6,48) width 38: "please"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutButton {BUTTON} at (0,138) size 100x50 [bgcolor=#C0C0C0] [border: (2px outset #FFFF00)]
+        LayoutNGBlockFlow (anonymous) at (12,12) size 76x204
+          LayoutBlockFlow {DIV} at (0,0) size 74x204 [bgcolor=#008080] [border: (2px solid #800080)]
+            LayoutBlockFlow (floating) {DIV} at (52,2) size 20x100 [bgcolor=#006400]
+            LayoutNGBlockFlow (anonymous) at (2,2) size 70x64
+              LayoutText {#text} at (10,0) size 38x64
+                text run at (10,0) width 30: "short"
+                text run at (8,16) width 34: "words"
+                text run at (13,32) width 24: "only"
+                text run at (6,48) width 38: "please"
+      LayoutNGBlockFlow {P} at (0,204) size 784x0
+layer at (8,212) size 100x50
+  LayoutButton (positioned) {BUTTON} at (8,212) size 100x50 [bgcolor=#C0C0C0] [border: (2px outset #FFFF00)]
+    LayoutNGBlockFlow (anonymous) at (12,12) size 76x204
+      LayoutBlockFlow {DIV} at (0,0) size 74x204 [bgcolor=#008080] [border: (2px solid #800080)]
+        LayoutBlockFlow (floating) {DIV} at (52,2) size 20x100 [bgcolor=#006400]
+        LayoutNGBlockFlow (anonymous) at (2,2) size 70x64
+          LayoutText {#text} at (10,0) size 38x64
+            text run at (10,0) width 30: "short"
+            text run at (8,16) width 34: "words"
+            text run at (13,32) width 24: "only"
+            text run at (6,48) width 38: "please"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-restrict-line-height-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-restrict-line-height-expected.txt
new file mode 100644
index 0000000..dcade0a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-restrict-line-height-expected.txt
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 515x19
+        text run at (0,0) width 515: "This tests that we don't honor line-height for controls that have restricted font size."
+      LayoutBR {BR} at (515,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 319x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 317x18
+          LayoutText (anonymous) at (4,1) size 297x16
+            text run at (4,1) width 297: "This text should be centered vertically in the button"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (319,20) size 0x0
+      LayoutButton {INPUT} at (0,40) size 313x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 297x16
+          LayoutText {#text} at (0,0) size 297x16
+            text run at (0,0) width 297: "This text should be centered vertically in the button"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (313,41) size 0x0
+      LayoutTextControl {INPUT} at (0,62) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (3,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 137x16
+      LayoutText {#text} at (0,0) size 0x0
+layer at (11,73) size 137x16 scrollWidth 298
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 297x16
+      text run at (0,0) width 297: "This text should be centered vertically in the button"
+layer at (149,77) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-direction-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-direction-expected.txt
new file mode 100644
index 0000000..9ed7d72
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-direction-expected.txt
@@ -0,0 +1,101 @@
+layer at (0,0) size 800x600 scrollWidth 1071
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutTable {TABLE} at (0,0) size 1063x110
+        LayoutTableSection {TBODY} at (0,0) size 1063x110
+          LayoutTableRow {TR} at (0,2) size 1063x22
+            LayoutNGTableCell {TH} at (2,12) size 83x2 [r=0 c=0 rs=1 cs=1]
+            LayoutNGTableCell {TH} at (87,12) size 242x2 [r=0 c=1 rs=1 cs=1]
+            LayoutNGTableCell {TH} at (331,2) size 242x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (76,1) size 90x19
+                text run at (76,1) width 90: "text-align:left"
+            LayoutNGTableCell {TH} at (575,2) size 242x22 [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (66,1) size 110x19
+                text run at (66,1) width 110: "text-align:center"
+            LayoutNGTableCell {TH} at (819,2) size 242x22 [r=0 c=4 rs=1 cs=1]
+              LayoutText {#text} at (70,1) size 102x19
+                text run at (70,1) width 102: "text-align:right"
+          LayoutTableRow {TR} at (0,26) size 1063x26
+            LayoutNGTableCell {TH} at (2,38) size 83x2 [r=1 c=0 rs=1 cs=1]
+            LayoutNGTableCell {TD} at (87,26) size 242x26 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (331,26) size 242x26 [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (575,26) size 242x26 [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (819,26) size 242x26 [border: (1px solid #000000)] [r=1 c=4 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+          LayoutTableRow {TR} at (0,54) size 1063x26
+            LayoutNGTableCell {TH} at (2,56) size 83x22 [r=2 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 81x19
+                text run at (1,3) width 81: "direction:ltr"
+            LayoutNGTableCell {TD} at (87,54) size 242x26 [border: (1px solid #000000)] [r=2 c=1 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (331,54) size 242x26 [border: (1px solid #000000)] [r=2 c=2 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (575,54) size 242x26 [border: (1px solid #000000)] [r=2 c=3 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (819,54) size 242x26 [border: (1px solid #000000)] [r=2 c=4 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+          LayoutTableRow {TR} at (0,82) size 1063x26
+            LayoutNGTableCell {TH} at (2,84) size 83x22 [r=3 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,3) size 81x19
+                text run at (1,3) width 81: "direction:rtl"
+            LayoutNGTableCell {TD} at (87,82) size 242x26 [border: (1px solid #000000)] [r=3 c=1 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (153,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (331,82) size 242x26 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (153,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (575,82) size 242x26 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (153,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
+            LayoutNGTableCell {TD} at (819,82) size 242x26 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+              LayoutFileUploadControl {INPUT} at (2,2) size 238x22 "No file chosen"
+                LayoutButton {INPUT} at (153,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                    LayoutText {#text} at (0,0) size 69x16
+                      text run at (0,0) width 69: "Choose File"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-disabled-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-disabled-expected.txt
new file mode 100644
index 0000000..4d0e2fd3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/file/file-input-disabled-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {FORM} at (0,0) size 784x63
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x63
+          LayoutBlockFlow {INPUT} at (4,3) size 13x13
+          LayoutInline {B} at (0,0) size 75x19
+            LayoutText {#text} at (20,1) size 75x19
+              text run at (20,1) width 75: "Attach File"
+          LayoutBR {BR} at (95,16) size 0x0
+          LayoutBR {BR} at (0,21) size 0x0
+          LayoutText {#text} at (0,42) size 86x19
+            text run at (0,42) width 86: "  Select File:  "
+          LayoutFileUploadControl {INPUT} at (86,41) size 238x22 "No file chosen" [color=#545454]
+            LayoutButton {INPUT} at (0,0) size 85x22 [color=#808080] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+              LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                LayoutText {#text} at (0,0) size 69x16
+                  text run at (0,0) width 69: "Choose File"
+          LayoutBR {BR} at (324,42) size 0x0
+        LayoutTable {TABLE} at (0,63) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/form-in-malformed-markup-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/form-in-malformed-markup-expected.txt
new file mode 100644
index 0000000..4ae7826b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/form-in-malformed-markup-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutInline {B} at (0,0) size 0x0
+          LayoutInline {FORM} at (0,0) size 0x0
+      LayoutTable {TABLE} at (0,0) size 230x26
+        LayoutTableSection {TBODY} at (0,0) size 230x26
+          LayoutTableRow {TR} at (0,2) size 230x22
+            LayoutNGTableCell {TD} at (2,2) size 222x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 220x19
+                text run at (1,1) width 220: "This test passes if it does not crash."
+            LayoutNGTableCell {TD} at (226,12) size 2x2 [r=0 c=1 rs=1 cs=1]
+              LayoutNGBlockFlow {P} at (1,1) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/formmove-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/formmove-expected.txt
new file mode 100644
index 0000000..71d1dbe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/formmove-expected.txt
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {FORM} at (0,0) size 784x21
+        LayoutBlockFlow {INPUT} at (5,3) size 13x13
+        LayoutText {#text} at (21,1) size 33x19
+          text run at (21,1) width 33: "Two "
+        LayoutBlockFlow {INPUT} at (58.89,3) size 13x13
+        LayoutText {#text} at (74,1) size 38x19
+          text run at (74,1) width 38: "Three"
+      LayoutNGBlockFlow {FORM} at (0,37) size 784x21
+        LayoutBlockFlow {INPUT} at (5,3) size 13x13
+        LayoutText {#text} at (21,1) size 31x19
+          text run at (21,1) width 31: "One "
+        LayoutBlockFlow {INPUT} at (57,3) size 13x13
+        LayoutText {#text} at (73,1) size 33x19
+          text run at (73,1) width 33: "Two "
+        LayoutBlockFlow {INPUT} at (110.89,3) size 13x13
+        LayoutText {#text} at (126,1) size 42x19
+          text run at (126,1) width 42: "Three "
+        LayoutBlockFlow {INPUT} at (172.89,3) size 13x13
+        LayoutText {#text} at (188,1) size 28x19
+          text run at (188,1) width 28: "One"
+      LayoutNGBlockFlow (anonymous) at (0,74) size 784x40
+        LayoutText {#text} at (0,0) size 766x39
+          text run at (0,0) width 766: "The count of the # of elements in form 1 should be 2 and in form 2 should be 4. The count in form 1 is 2, and the count in"
+          text run at (0,20) width 68: "form 2 is 4"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image-border-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image-border-expected.txt
new file mode 100644
index 0000000..1caf0a1c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image-border-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 768x39
+          text run at (0,0) width 768: "The first empty image box below should have the default grey \"no border\" border. The second should have a 1-pixel solid"
+          text run at (0,20) width 312: "black border. They should be the same otherwise."
+      LayoutNGBlockFlow (anonymous) at (0,56) size 784x55
+        LayoutText {#text} at (0,35) size 53x19
+          text run at (0,35) width 53: "border:0"
+        LayoutImage {IMG} at (53,0) size 338x50
+      LayoutNGBlockFlow (anonymous) at (0,129) size 784x57
+        LayoutText {#text} at (0,37) size 53x19
+          text run at (0,37) width 53: "border:1"
+        LayoutImage {IMG} at (53,0) size 340x52 [border: (1px solid #000000)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,127) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,119) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/002-expected.txt
new file mode 100644
index 0000000..1587521
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/002-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (floating) {DIV} at (0,0) size 156x24 [border: (2px solid #FF0000)]
+        LayoutBlockFlow {INPUT} at (2,2) size 152x20
+        LayoutText {#text} at (0,0) size 0x0
+layer at (10,10) size 152x20 clip at (11,11) size 150x18
+  LayoutBlockFlow {SPAN} at (0,0) size 152x20 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 148x16
+      LayoutInline {SPAN} at (0,0) size 41x16
+        LayoutText {#text} at (16,0) size 41x16
+          text run at (16,0) width 41: "Submit"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/005-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/005-expected.txt
new file mode 100644
index 0000000..1e714af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/005-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutTable {TABLE} at (0,0) size 44x54
+        LayoutTableSection {TBODY} at (0,0) size 44x54
+          LayoutTableRow {TR} at (0,0) size 44x54
+            LayoutNGTableCell {TD} at (0,0) size 44x54 [r=0 c=0 rs=1 cs=1]
+              LayoutBlockFlow {INPUT} at (2,2) size 40x50
+              LayoutText {#text} at (0,0) size 0x0
+layer at (10,10) size 40x50 clip at (11,11) size 38x48 scrollWidth 42
+  LayoutBlockFlow {SPAN} at (0,0) size 40x50 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 36x32
+      LayoutInline {SPAN} at (0,0) size 41x16
+        LayoutText {#text} at (0,16) size 41x16
+          text run at (0,16) width 41: "Submit"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/input-align-image-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/input-align-image-expected.txt
new file mode 100644
index 0000000..f86c842
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/image/input-align-image-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 579x19
+          text run at (0,0) width 579: "The following 4 images should be all be rendered exactly the same, aligned to the right side."
+      LayoutImage (floating) {INPUT} at (767,36) size 17x19
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x120
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+        LayoutImage (floating) {INPUT} at (767,40) size 17x19
+        LayoutBR {BR} at (0,40) size 0x0
+        LayoutBR {BR} at (0,60) size 0x0
+        LayoutImage (floating) {INPUT} at (767,80) size 17x19
+        LayoutBR {BR} at (0,80) size 0x0
+        LayoutBR {BR} at (0,100) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,156) size 784x0
+        LayoutImage (floating) {INPUT} at (767,0) size 17x19
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-align-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-align-expected.txt
new file mode 100644
index 0000000..b870e56
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-align-expected.txt
@@ -0,0 +1,43 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 564x19
+          text run at (0,0) width 564: "The following 5 inputs should be all be rendered exactly the same, aligned to the left side."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x88
+        LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (154,16) size 0x0
+        LayoutTextControl {INPUT} at (0,22) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (154,38) size 0x0
+        LayoutTextControl {INPUT} at (0,44) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (154,60) size 0x0
+        LayoutTextControl {INPUT} at (0,66) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (154,82) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,124) size 784x22
+        LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+layer at (10,47) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 107x16
+      text run at (0,0) width 107: "The quick brown..."
+layer at (10,69) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 107x16
+      text run at (0,0) width 107: "The quick brown..."
+layer at (10,91) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 107x16
+      text run at (0,0) width 107: "The quick brown..."
+layer at (10,113) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 107x16
+      text run at (0,0) width 107: "The quick brown..."
+layer at (10,135) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 107x16
+      text run at (0,0) width 107: "The quick brown..."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-appearance-height-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-appearance-height-expected.txt
new file mode 100644
index 0000000..279c12a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-appearance-height-expected.txt
@@ -0,0 +1,95 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 762x19
+          text run at (0,0) width 762: "This tests the height attribute of form elements. The only element that should honour this value is the Image type of input."
+      LayoutNGBlockFlow {FORM} at (0,20) size 784x266
+        LayoutText {#text} at (0,1) size 36x19
+          text run at (0,1) width 36: "input "
+        LayoutTextControl {INPUT} at (36,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (190,1) size 0x0
+        LayoutText {#text} at (0,23) size 27x19
+          text run at (0,23) width 27: "text "
+        LayoutTextControl {INPUT} at (27,22) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (181,23) size 0x0
+        LayoutText {#text} at (0,45) size 65x19
+          text run at (0,45) width 65: "checkbox "
+        LayoutBlockFlow {INPUT} at (69,47) size 13x13
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (85,45) size 0x0
+        LayoutText {#text} at (0,66) size 24x19
+          text run at (0,66) width 24: "file "
+        LayoutFileUploadControl {INPUT} at (24,65) size 238x22 "No file chosen"
+          LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+            LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+              LayoutText {#text} at (0,0) size 69x16
+                text run at (0,0) width 69: "Choose File"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (262,66) size 0x0
+        LayoutText {#text} at (0,87) size 42x19
+          text run at (0,87) width 42: "image "
+        LayoutImage {INPUT} at (42,101) size 10x1
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (52,87) size 0x0
+        LayoutText {#text} at (0,108) size 36x19
+          text run at (0,108) width 36: "radio "
+        LayoutBlockFlow {INPUT} at (41,110) size 13x13
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (57,108) size 0x0
+        LayoutText {#text} at (0,136) size 39x19
+          text run at (0,136) width 39: "range "
+        LayoutSlider {INPUT} at (41,130) size 129x21 [color=#9D968E] [bgcolor=#FFFFFF]
+          LayoutFlexibleBox {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (0,0) size 129x21
+              LayoutBlockFlow {DIV} at (59,0) size 11x21
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (172,136) size 0x0
+        LayoutText {#text} at (0,157) size 33x19
+          text run at (0,157) width 33: "reset "
+        LayoutButton {INPUT} at (33,156) size 50x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 34x16
+            LayoutText {#text} at (0,0) size 34x16
+              text run at (0,0) width 34: "Reset"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (83,157) size 0x0
+        LayoutText {#text} at (0,179) size 46x19
+          text run at (0,179) width 46: "submit "
+        LayoutButton {INPUT} at (46,178) size 57x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 41x16
+            LayoutText {#text} at (0,0) size 41x16
+              text run at (0,0) width 41: "Submit"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (103,179) size 0x0
+        LayoutText {#text} at (0,201) size 49x19
+          text run at (0,201) width 49: "isindex "
+        LayoutTextControl {INPUT} at (49,200) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (205,201) size 0x0
+        LayoutText {#text} at (0,223) size 64x19
+          text run at (0,223) width 64: "password "
+        LayoutTextControl {INPUT} at (64,222) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (218,223) size 0x0
+        LayoutText {#text} at (0,245) size 44x19
+          text run at (0,245) width 44: "search "
+        LayoutTextControl {INPUT} at (44,244) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+layer at (46,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (37,53) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (60,231) size 150x16
+  LayoutBlockFlow {DIV} at (3,3) size 150x16
+layer at (74,253) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (55,275) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+layer at (193,279) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-button-sizes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-button-sizes-expected.txt
new file mode 100644
index 0000000..a0b0432
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-button-sizes-expected.txt
@@ -0,0 +1,105 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutButton {INPUT} at (0,9) size 40.45x12 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 24.45x6
+          LayoutText {#text} at (0,0) size 25x6
+            text run at (0,0) width 25: "Test Button"
+      LayoutText {#text} at (40,2) size 5x19
+        text run at (40,2) width 5: " "
+      LayoutButton {INPUT} at (44.45,9) size 46.34x12 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 30.34x6
+          LayoutText {#text} at (0,0) size 31x6
+            text run at (0,0) width 31: "Test Button"
+      LayoutText {#text} at (90,2) size 5x19
+        text run at (90,2) width 5: " "
+      LayoutButton {INPUT} at (94.80,8) size 52.23x13 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 36.23x7
+          LayoutText {#text} at (0,0) size 37x7
+            text run at (0,0) width 37: "Test Button"
+      LayoutText {#text} at (147,2) size 5x19
+        text run at (147,2) width 5: " "
+      LayoutButton {INPUT} at (151.03,6) size 53.13x16 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 37.13x10
+          LayoutText {#text} at (0,0) size 38x10
+            text run at (0,0) width 38: "Test Button"
+      LayoutText {#text} at (204,2) size 5x19
+        text run at (204,2) width 5: " "
+      LayoutButton {INPUT} at (208.16,5) size 64.02x18 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 48.02x12
+          LayoutText {#text} at (0,0) size 48x12
+            text run at (0,0) width 48: "Test Button"
+      LayoutText {#text} at (272,2) size 5x19
+        text run at (272,2) width 5: " "
+      LayoutButton {INPUT} at (276.17,4) size 68.91x19 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 52.91x13
+          LayoutText {#text} at (0,0) size 53x13
+            text run at (0,0) width 53: "Test Button"
+      LayoutText {#text} at (345,2) size 5x19
+        text run at (345,2) width 5: " "
+      LayoutButton {INPUT} at (349.08,3) size 70.78x20 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 54.78x14
+          LayoutText {#text} at (0,0) size 55x14
+            text run at (0,0) width 55: "Test Button"
+      LayoutText {#text} at (419,2) size 5x19
+        text run at (419,2) width 5: " "
+      LayoutButton {INPUT} at (423.86,2) size 75.67x21 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 59.67x15
+          LayoutText {#text} at (0,0) size 60x15
+            text run at (0,0) width 60: "Test Button"
+      LayoutText {#text} at (499,2) size 5x19
+        text run at (499,2) width 5: " "
+      LayoutButton {INPUT} at (503.53,1) size 82.56x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 66.56x16
+          LayoutText {#text} at (0,0) size 67x16
+            text run at (0,0) width 67: "Test Button"
+      LayoutText {#text} at (586,2) size 5x19
+        text run at (586,2) width 5: " "
+      LayoutButton {INPUT} at (590.09,1) size 87.45x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 71.45x16
+          LayoutText {#text} at (0,0) size 72x16
+            text run at (0,0) width 72: "Test Button"
+      LayoutText {#text} at (677,2) size 5x19
+        text run at (677,2) width 5: " "
+      LayoutButton {INPUT} at (681.55,0) size 89.34x23 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 73.34x17
+          LayoutText {#text} at (0,0) size 74x17
+            text run at (0,0) width 74: "Test Button"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutButton {INPUT} at (0,27) size 95.23x25 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 79.23x19
+          LayoutText {#text} at (0,0) size 80x18
+            text run at (0,0) width 80: "Test Button"
+      LayoutText {#text} at (95,30) size 5x19
+        text run at (95,30) width 5: " "
+      LayoutButton {INPUT} at (99.23,27) size 100.13x26 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 84.13x20
+          LayoutText {#text} at (0,0) size 85x19
+            text run at (0,0) width 85: "Test Button"
+      LayoutText {#text} at (199,30) size 5x19
+        text run at (199,30) width 5: " "
+      LayoutButton {INPUT} at (203.36,25) size 106.02x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 90.02x22
+          LayoutText {#text} at (0,0) size 90x21
+            text run at (0,0) width 90: "Test Button"
+      LayoutText {#text} at (309,30) size 5x19
+        text run at (309,30) width 5: " "
+      LayoutButton {INPUT} at (313.38,24) size 112.91x29 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 96.91x23
+          LayoutText {#text} at (0,0) size 97x22
+            text run at (0,0) width 97: "Test Button"
+      LayoutText {#text} at (426,30) size 5x19
+        text run at (426,30) width 5: " "
+      LayoutButton {INPUT} at (430.28,23) size 116.80x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 100.80x24
+          LayoutText {#text} at (0,0) size 101x23
+            text run at (0,0) width 101: "Test Button"
+      LayoutText {#text} at (547,30) size 5x19
+        text run at (547,30) width 5: " "
+      LayoutButton {INPUT} at (551.08,23) size 123.69x31 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 107.69x25
+          LayoutText {#text} at (0,0) size 108x24
+            text run at (0,0) width 108: "Test Button"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-first-letter-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-first-letter-expected.txt
new file mode 100644
index 0000000..1b031ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-first-letter-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 585x19
+        text run at (0,0) width 585: "This test passes if it doesn't crash and if the Submit button does not honor the first-letter style."
+      LayoutBR {BR} at (585,0) size 0x0
+      LayoutButton {INPUT} at (0,20) size 57x22 [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 41x16
+          LayoutText {#text} at (0,0) size 41x16
+            text run at (0,0) width 41: "Submit"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-type-text-min-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-type-text-min-width-expected.txt
new file mode 100644
index 0000000..5605230
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-type-text-min-width-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 768x39
+        text run at (0,0) width 768: "This test checks if correct min width is applied to \"input type=text\". To match IE and Firefox, the input field below should"
+        text run at (0,20) width 615: "show \"1987\", with the 7 slightly truncated. See https://bugs.webkit.org/show_bug.cgi?id=15312 ."
+      LayoutBR {BR} at (614,20) size 0x0
+      LayoutTextControl {INPUT} at (0,40) size 40x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,51) size 36x16 scrollWidth 43
+  LayoutBlockFlow {DIV} at (2,3) size 36x16
+    LayoutText {#text} at (0,0) size 42x16
+      text run at (0,0) width 42: "198765"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-value-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-value-expected.txt
new file mode 100644
index 0000000..afddb24
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/input-value-expected.txt
@@ -0,0 +1,228 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 784x39
+          text run at (0,0) width 784: "Results that match WinIE are two columns on the right that say \"after\" every time, except for the last row which should have"
+          text run at (0,20) width 158: "nothing in either column."
+      LayoutNGBlockFlow {P} at (0,56) size 784x20
+        LayoutText {#text} at (0,0) size 712x19
+          text run at (0,0) width 712: "Results that match Gecko are like WinIE, but with \"before\" for the attribute in the first two rows and the last row."
+      LayoutNGBlockFlow {FORM} at (0,102) size 784x376
+        LayoutTable {TABLE} at (0,0) size 758x376
+          LayoutTableSection {THEAD} at (0,0) size 758x26
+            LayoutTableRow {TR} at (0,2) size 758x22
+              LayoutNGTableCell {TH} at (2,2) size 385x22 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 55x19
+                  text run at (1,1) width 55: "test case"
+              LayoutNGTableCell {TH} at (389,2) size 240x22 [r=0 c=1 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 89x19
+                  text run at (1,1) width 89: "form element"
+              LayoutNGTableCell {TH} at (631,2) size 62x22 [r=0 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 60x19
+                  text run at (1,1) width 60: "property"
+              LayoutNGTableCell {TH} at (695,2) size 61x22 [r=0 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 59x19
+                  text run at (1,1) width 59: "attribute"
+          LayoutTableSection {TBODY} at (0,26) size 758x350
+            LayoutTableRow {TR} at (0,0) size 758x24
+              LayoutNGTableCell {TD} at (2,1) size 385x22 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 207x19
+                  text run at (1,2) width 207: "text with value property changed"
+              LayoutNGTableCell {TD} at (389,0) size 240x24 [r=0 c=1 rs=1 cs=1]
+                LayoutTextControl {INPUT} at (1,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+              LayoutNGTableCell {TD} at (631,1) size 62x22 [r=0 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,1) size 61x22 [r=0 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 40x19
+                  text run at (1,2) width 40: "before"
+            LayoutTableRow {TR} at (0,26) size 758x24
+              LayoutNGTableCell {TD} at (2,27) size 385x22 [r=1 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 244x19
+                  text run at (1,2) width 244: "password with value property changed"
+              LayoutNGTableCell {TD} at (389,26) size 240x24 [r=1 c=1 rs=1 cs=1]
+                LayoutTextControl {INPUT} at (1,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+              LayoutNGTableCell {TD} at (631,27) size 62x22 [r=1 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,27) size 61x22 [r=1 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 40x19
+                  text run at (1,2) width 40: "before"
+            LayoutTableRow {TR} at (0,52) size 758x22
+              LayoutNGTableCell {TD} at (2,52) size 385x22 [r=2 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 249x19
+                  text run at (1,1) width 249: "check box with value property changed"
+              LayoutNGTableCell {TD} at (389,52) size 240x21 [r=2 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (5,4) size 13x13
+              LayoutNGTableCell {TD} at (631,52) size 62x22 [r=2 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,52) size 61x22 [r=2 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,76) size 758x22
+              LayoutNGTableCell {TD} at (2,76) size 385x22 [r=3 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 227x19
+                  text run at (1,1) width 227: "hidden with value property changed"
+              LayoutNGTableCell {TD} at (389,86) size 240x2 [r=3 c=1 rs=1 cs=1]
+              LayoutNGTableCell {TD} at (631,76) size 62x22 [r=3 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,76) size 61x22 [r=3 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,100) size 758x24
+              LayoutNGTableCell {TD} at (2,101) size 385x22 [r=4 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 224x19
+                  text run at (1,2) width 224: "button with value property changed"
+              LayoutNGTableCell {TD} at (389,100) size 240x24 [r=4 c=1 rs=1 cs=1]
+                LayoutButton {INPUT} at (1,1) size 42x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                  LayoutNGBlockFlow (anonymous) at (8,3) size 26x16
+                    LayoutText {#text} at (0,0) size 26x16
+                      text run at (0,0) width 26: "after"
+              LayoutNGTableCell {TD} at (631,101) size 62x22 [r=4 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,101) size 61x22 [r=4 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+            LayoutTableRow {TR} at (0,126) size 758x22
+              LayoutNGTableCell {TD} at (2,126) size 385x22 [r=5 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 222x19
+                  text run at (1,1) width 222: "image with value property changed"
+              LayoutNGTableCell {TD} at (389,128) size 240x18 [r=5 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (1,1) size 52x16
+                  LayoutInline {SPAN} at (0,0) size 36x16
+                    LayoutImage (floating) {IMG} at (0,0) size 16x16
+                    LayoutInline {SPAN} at (0,0) size 36x16
+                      LayoutText {#text} at (16,0) size 36x16
+                        text run at (16,0) width 36: "before"
+              LayoutNGTableCell {TD} at (631,126) size 62x22 [r=5 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,126) size 61x22 [r=5 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,150) size 758x22
+              LayoutNGTableCell {TD} at (2,150) size 385x22 [r=6 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 216x19
+                  text run at (1,1) width 216: "radio with value property changed"
+              LayoutNGTableCell {TD} at (389,152) size 240x18 [r=6 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (6,4) size 13x13
+              LayoutNGTableCell {TD} at (631,150) size 62x22 [r=6 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,150) size 61x22 [r=6 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,174) size 758x24
+              LayoutNGTableCell {TD} at (2,175) size 385x22 [r=7 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 205x19
+                  text run at (1,2) width 205: "text with value attribute changed"
+              LayoutNGTableCell {TD} at (389,174) size 240x24 [r=7 c=1 rs=1 cs=1]
+                LayoutTextControl {INPUT} at (1,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+              LayoutNGTableCell {TD} at (631,175) size 62x22 [r=7 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,175) size 61x22 [r=7 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+            LayoutTableRow {TR} at (0,200) size 758x22
+              LayoutNGTableCell {TD} at (2,200) size 385x22 [r=8 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 247x19
+                  text run at (1,1) width 247: "check box with value attribute changed"
+              LayoutNGTableCell {TD} at (389,200) size 240x21 [r=8 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (5,4) size 13x13
+              LayoutNGTableCell {TD} at (631,200) size 62x22 [r=8 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,200) size 61x22 [r=8 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,224) size 758x22
+              LayoutNGTableCell {TD} at (2,224) size 385x22 [r=9 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 383x19
+                  text run at (1,1) width 383: "text with value property changed, then turned into check box"
+              LayoutNGTableCell {TD} at (389,224) size 240x21 [r=9 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (5,4) size 13x13
+              LayoutNGTableCell {TD} at (631,224) size 62x22 [r=9 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,224) size 61x22 [r=9 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,248) size 758x24
+              LayoutNGTableCell {TD} at (2,249) size 385x22 [r=10 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 383x19
+                  text run at (1,2) width 383: "check box with value property changed, then turned into text"
+              LayoutNGTableCell {TD} at (389,248) size 240x24 [r=10 c=1 rs=1 cs=1]
+                LayoutTextControl {INPUT} at (1,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+              LayoutNGTableCell {TD} at (631,249) size 62x22 [r=10 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,249) size 61x22 [r=10 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+            LayoutTableRow {TR} at (0,274) size 758x22
+              LayoutNGTableCell {TD} at (2,274) size 385x22 [r=11 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 381x19
+                  text run at (1,1) width 381: "text with value attribute changed, then turned into check box"
+              LayoutNGTableCell {TD} at (389,274) size 240x21 [r=11 c=1 rs=1 cs=1]
+                LayoutBlockFlow {INPUT} at (5,4) size 13x13
+              LayoutNGTableCell {TD} at (631,274) size 62x22 [r=11 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+              LayoutNGTableCell {TD} at (695,274) size 61x22 [r=11 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 28x19
+                  text run at (1,1) width 28: "after"
+            LayoutTableRow {TR} at (0,298) size 758x24
+              LayoutNGTableCell {TD} at (2,299) size 385x22 [r=12 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 381x19
+                  text run at (1,2) width 381: "check box with value attribute changed, then turned into text"
+              LayoutNGTableCell {TD} at (389,298) size 240x24 [r=12 c=1 rs=1 cs=1]
+                LayoutTextControl {INPUT} at (1,1) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+              LayoutNGTableCell {TD} at (631,299) size 62x22 [r=12 c=2 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+              LayoutNGTableCell {TD} at (695,299) size 61x22 [r=12 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 28x19
+                  text run at (1,2) width 28: "after"
+            LayoutTableRow {TR} at (0,324) size 758x24
+              LayoutNGTableCell {TD} at (2,325) size 385x22 [r=13 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 204x19
+                  text run at (1,2) width 204: "file with value property changed"
+              LayoutNGTableCell {TD} at (389,324) size 240x24 [r=13 c=1 rs=1 cs=1]
+                LayoutFileUploadControl {INPUT} at (1,1) size 238x22 "No file chosen"
+                  LayoutButton {INPUT} at (0,0) size 85x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+                    LayoutNGBlockFlow (anonymous) at (8,3) size 69x16
+                      LayoutText {#text} at (0,0) size 69x16
+                        text run at (0,0) width 69: "Choose File"
+              LayoutNGTableCell {TD} at (631,335) size 62x2 [r=13 c=2 rs=1 cs=1]
+              LayoutNGTableCell {TD} at (695,325) size 61x22 [r=13 c=3 rs=1 cs=1]
+                LayoutText {#text} at (1,2) size 40x19
+                  text run at (1,2) width 40: "before"
+layer at (8,100) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,92) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (400,140) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 36x16
+      text run at (0,0) width 36: "before"
+layer at (400,166) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 30x16
+      text run at (0,0) width 30: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
+layer at (400,314) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 26x16
+      text run at (0,0) width 26: "after"
+layer at (400,388) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 26x16
+      text run at (0,0) width 26: "after"
+layer at (400,438) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 26x16
+      text run at (0,0) width 26: "after"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/negativeLineHeight-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/negativeLineHeight-expected.txt
new file mode 100644
index 0000000..a08d31d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/negativeLineHeight-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 666x19
+          text run at (0,0) width 666: "The textarea below should have standard line-height because textareas should ignore negative line-heights"
+        LayoutBR {BR} at (666,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,36) size 784x240
+        LayoutText {#text} at (0,0) size 86x19
+          text run at (0,0) width 86: "TEXTAREA"
+        LayoutBR {BR} at (85,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (400,205) size 0x0
+        LayoutBR {BR} at (0,220) size 0x0
+layer at (8,64) size 400x200 clip at (9,65) size 398x198
+  LayoutTextControl {TEXTAREA} at (0,20) size 400x200 [bgcolor=#FFFFFF] [border: (1px dotted #C0C0C0)]
+    LayoutBlockFlow {DIV} at (3,3) size 396x32
+      LayoutText {#text} at (0,0) size 387x32
+        text run at (0,0) width 382: "Demo text here that wraps a bit and should demonstrate"
+        text run at (382,0) width 5: " "
+        text run at (0,16) width 182: "the goodness of line-height"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-datalist-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-datalist-expected.txt
new file mode 100644
index 0000000..dcfd836
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-datalist-expected.txt
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x60
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x60
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x44
+      LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+          LayoutDetailsMarker {DIV} at (117.14,1.33) size 17.86x13.33: down
+          LayoutBlockFlow {DIV} at (135,0) size 15x16
+      LayoutText {#text} at (154,1) size 4x19
+        text run at (154,1) width 4: " "
+      LayoutTextControl {INPUT} at (158,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+          LayoutDetailsMarker {DIV} at (117.14,1.33) size 17.86x13.33: down
+          LayoutBlockFlow {DIV} at (135,0) size 15x16
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (312,1) size 0x0
+      LayoutTextControl {INPUT} at (0,22) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+      LayoutText {#text} at (154,23) size 4x19
+        text run at (154,23) width 4: " "
+      LayoutTextControl {INPUT} at (158,22) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,11) size 117x16
+  LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+layer at (168,11) size 117x16
+  LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+layer at (10,33) size 117x16
+  LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+layer at (168,33) size 117x16
+  LayoutBlockFlow {DIV} at (0,0) size 117.14x16
+hidden layer at (127,34) size 18x14 transparent
+  LayoutDetailsMarker {DIV} at (117.14,1.33) size 17.86x13.33: down
+layer at (145,33) size 15x16 transparent
+  LayoutBlockFlow {DIV} at (135,0) size 15x16
+hidden layer at (285,34) size 18x14 transparent
+  LayoutDetailsMarker {DIV} at (117.14,1.33) size 17.86x13.33: down
+layer at (303,33) size 15x16 transparent
+  LayoutBlockFlow {DIV} at (135,0) size 15x16
+caret: position 0 of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
new file mode 100644
index 0000000..642651f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
@@ -0,0 +1,47 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 782x19
+          text run at (0,0) width 782: "Test appearances of spin buttons. Disabled state and read-only state should have appearances different from the normal state."
+      LayoutNGBlockFlow {DIV} at (0,36) size 784x30
+        LayoutInline {LABEL} at (0,0) size 313x30
+          LayoutTextControl {INPUT} at (0,0) size 229x30 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+            LayoutFlexibleBox {DIV} at (2,3) size 225x24
+              LayoutBlockFlow {DIV} at (0,0) size 210x24
+              LayoutBlockFlow {DIV} at (210,0) size 15x24
+          LayoutText {#text} at (229,7) size 84x19
+            text run at (229,7) width 84: " Normal state"
+      LayoutNGBlockFlow {DIV} at (0,66) size 784x30
+        LayoutInline {LABEL} at (0,0) size 321x30
+          LayoutTextControl {INPUT} at (0,0) size 229x30 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+            LayoutFlexibleBox {DIV} at (2,3) size 225x24
+              LayoutBlockFlow {DIV} at (0,0) size 210x24
+          LayoutText {#text} at (229,7) size 92x19
+            text run at (229,7) width 92: " Disabled state"
+      LayoutNGBlockFlow {DIV} at (0,96) size 784x30
+        LayoutInline {LABEL} at (0,0) size 331x30
+          LayoutTextControl {INPUT} at (0,0) size 229x30 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+            LayoutFlexibleBox {DIV} at (2,3) size 225x24
+              LayoutBlockFlow {DIV} at (0,0) size 210x24
+          LayoutText {#text} at (229,7) size 102x19
+            text run at (229,7) width 102: " Read-only state"
+layer at (10,47) size 210x24
+  LayoutBlockFlow {DIV} at (0,0) size 210x24
+    LayoutText {#text} at (0,0) size 11x23
+      text run at (0,0) width 11: "0"
+layer at (10,77) size 210x24
+  LayoutBlockFlow {DIV} at (0,0) size 210x24
+    LayoutText {#text} at (0,0) size 11x23
+      text run at (0,0) width 11: "0"
+layer at (10,107) size 210x24
+  LayoutBlockFlow {DIV} at (0,0) size 210x24
+    LayoutText {#text} at (0,0) size 11x23
+      text run at (0,0) width 11: "0"
+layer at (220,77) size 15x24 transparent
+  LayoutBlockFlow {DIV} at (210,0) size 15x24
+layer at (220,107) size 15x24 transparent
+  LayoutBlockFlow {DIV} at (210,0) size 15x24
+caret: position 0 of child 0 {#text} of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 0 {INPUT} of child 0 {LABEL} of child 9 {DIV} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/radio/radio-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/radio/radio-appearance-basic-expected.txt
new file mode 100644
index 0000000..3db7b0b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/radio/radio-appearance-basic-expected.txt
@@ -0,0 +1,41 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x168
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x168
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x152
+      LayoutBlockFlow {INPUT} at (4,4) size 13x13
+      LayoutText {#text} at (21,2) size 4x19
+        text run at (21,2) width 4: " "
+      LayoutBlockFlow {INPUT} at (29,4) size 13x13
+      LayoutText {#text} at (46,2) size 4x19
+        text run at (46,2) width 4: " "
+      LayoutBlockFlow {INPUT} at (54,4) size 13x13
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (71,2) size 0x0
+      LayoutBlockFlow {INPUT} at (4,26) size 13x13
+      LayoutText {#text} at (21,24) size 4x19
+        text run at (21,24) width 4: " "
+      LayoutBlockFlow {INPUT} at (29,26) size 13x13
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (46,24) size 0x0
+      LayoutBlockFlow {INPUT} at (4,48) size 13x13
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (21,46) size 0x0
+      LayoutBlockFlow {INPUT} at (4,70) size 13x13
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (21,68) size 0x0
+      LayoutBlockFlow {INPUT} at (4,92) size 8x13
+      LayoutText {#text} at (16,90) size 4x19
+        text run at (16,90) width 4: " "
+      LayoutBlockFlow {INPUT} at (24,92) size 16x13
+      LayoutText {#text} at (44,90) size 4x19
+        text run at (44,90) width 4: " "
+      LayoutBlockFlow {INPUT} at (52,92) size 24x13
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (80,90) size 0x0
+      LayoutBlockFlow {INPUT} at (6,125) size 19x19
+      LayoutText {#text} at (31,129) size 4x19
+        text run at (31,129) width 4: " "
+      LayoutBlockFlow {INPUT} at (43,118) size 26x26
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (77,129) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/range-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/range-appearance-basic-expected.txt
new file mode 100644
index 0000000..1096be26
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/range-appearance-basic-expected.txt
@@ -0,0 +1,65 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x209
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x209
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x193
+      LayoutSlider {INPUT} at (4,4) size 129x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 129x21
+          LayoutBlockFlow {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (59,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (137,10) size 0x0
+      LayoutSlider {INPUT} at (4,34) size 135x27 [color=#9D968E] [bgcolor=#FFFFFF] [border: (3px solid #00FF00)]
+        LayoutFlexibleBox {DIV} at (3,3) size 129x21
+          LayoutBlockFlow {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (59,0) size 11x21
+      LayoutText {#text} at (143,46) size 4x19
+        text run at (143,46) width 4: " "
+      LayoutSlider {INPUT} at (151,40) size 129x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 129x21
+          LayoutBlockFlow {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (59,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (284,46) size 0x0
+      LayoutSlider {INPUT} at (4,70) size 129x21 [color=#9D968E]
+        LayoutFlexibleBox {DIV} at (0,0) size 129x21
+          LayoutBlockFlow {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (59,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (137,76) size 0x0
+      LayoutSlider {INPUT} at (4,100) size 129x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 129x21
+          LayoutBlockFlow {DIV} at (0,0) size 129x21
+            LayoutBlockFlow {DIV} at (59,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (137,106) size 0x0
+      LayoutSlider {INPUT} at (4,130) size 40x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 40x21
+          LayoutBlockFlow {DIV} at (0,0) size 40x21
+            LayoutBlockFlow {DIV} at (14.50,0) size 11x21
+      LayoutText {#text} at (48,136) size 4x19
+        text run at (48,136) width 4: " "
+      LayoutSlider {INPUT} at (56,130) size 40x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 40x21
+          LayoutBlockFlow {DIV} at (0,0) size 40x21
+            LayoutBlockFlow {DIV} at (14.50,0) size 11x21
+      LayoutText {#text} at (100,136) size 4x19
+        text run at (100,136) width 4: " "
+      LayoutSlider {INPUT} at (108,130) size 40x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 40x21
+          LayoutBlockFlow {DIV} at (0,0) size 40x21
+            LayoutBlockFlow {DIV} at (14.50,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (152,136) size 0x0
+      LayoutSlider {INPUT} at (6,164) size 193.50x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 193.50x21
+          LayoutBlockFlow {DIV} at (0,0) size 193.50x21
+            LayoutBlockFlow {DIV} at (91.25,0) size 11x21
+      LayoutText {#text} at (205,170) size 5x19
+        text run at (205,170) width 5: " "
+      LayoutSlider {INPUT} at (217.50,164) size 258x21 [color=#9D968E] [bgcolor=#FFFFFF]
+        LayoutFlexibleBox {DIV} at (0,0) size 258x21
+          LayoutBlockFlow {DIV} at (0,0) size 258x21
+            LayoutBlockFlow {DIV} at (123.50,0) size 11x21
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (483,170) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/slider-padding-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/slider-padding-expected.txt
new file mode 100644
index 0000000..9a96c24
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/range/slider-padding-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x579
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "This tests that the slider control considers padding."
+        LayoutBR {BR} at (317,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,20) size 784x45 [bgcolor=#ADD8E6]
+        LayoutSlider {INPUT} at (2,2) size 100x41 [color=#9D968E] [bgcolor=#FFFFFF]
+          LayoutFlexibleBox {DIV} at (10,10) size 80x21
+            LayoutBlockFlow {DIV} at (0,0) size 80x21
+              LayoutBlockFlow {DIV} at (0,0) size 11x21
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {PRE} at (0,78) size 784x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-appearance-basic-expected.txt
new file mode 100644
index 0000000..eaee8b0dc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-appearance-basic-expected.txt
@@ -0,0 +1,194 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x406
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x406
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x390
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x92
+        LayoutTextControl {INPUT} at (4,4) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (164,5) size 4x19
+          text run at (164,5) width 4: " "
+        LayoutTextControl {INPUT} at (172,4) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+            LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+        LayoutBR {BR} at (332,5) size 0x0
+        LayoutTextControl {INPUT} at (4,34) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (164,35) size 4x19
+          text run at (164,35) width 4: " "
+        LayoutTextControl {INPUT} at (172,34) size 156x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (332,35) size 0x0
+        LayoutTextControl {INPUT} at (4,64) size 158x24 [bgcolor=#FFFFFF] [border: (3px solid #00FF00)]
+          LayoutFlexibleBox {DIV} at (4,4) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (166,66) size 4x19
+          text run at (166,66) width 4: " "
+        LayoutTextControl {INPUT} at (174,65) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (334,66) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,92) size 163x45 [bgcolor=#888888]
+        LayoutTextControl {INPUT} at (11,9) size 133x22 [bgcolor=#00FF00] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 127x16
+            LayoutBlockFlow {DIV} at (0,0) size 114x16
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow (anonymous) at (0,137) size 784x253
+        LayoutTextControl {INPUT} at (4,4) size 156x22 [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (164,5) size 0x0
+        LayoutTextControl {INPUT} at (4,34) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 150x16
+            LayoutBlockFlow {DIV} at (0,0) size 137x16
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (164,35) size 0x0
+        LayoutTextControl {INPUT} at (4,70) size 182x25 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 176x19
+            LayoutBlockFlow {DIV} at (0,0) size 161x19
+        LayoutText {#text} at (190,73) size 4x19
+          text run at (190,73) width 4: " "
+        LayoutTextControl {INPUT} at (198,66) size 231x30 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 225x24
+            LayoutBlockFlow {DIV} at (0,0) size 207x24
+        LayoutText {#text} at (433,73) size 4x19
+          text run at (433,73) width 4: " "
+        LayoutTextControl {INPUT} at (441,64) size 280x34 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (3,3) size 274x28
+            LayoutBlockFlow {DIV} at (0,0) size 253x28
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (725,73) size 0x0
+        LayoutTextControl {INPUT} at (6,118.50) size 234x33 [bgcolor=#FFFFFF] [border: (3px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (4.50,4.50) size 225x24
+            LayoutBlockFlow {DIV} at (0,0) size 205x24
+        LayoutText {#text} at (246,127) size 4x19
+          text run at (246,127) width 4: " "
+        LayoutTextControl {INPUT} at (258,110) size 312x45 [bgcolor=#FFFFFF] [border: (4px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (6,6) size 300x33
+            LayoutBlockFlow {DIV} at (0,0) size 273x33
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (578,127) size 0x0
+        LayoutTextControl {INPUT} at (6,179.50) size 234x33 [bgcolor=#FFFFFF] [border: (3px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (4.50,4.50) size 225x24
+            LayoutBlockFlow {DIV} at (0,0) size 205x24
+        LayoutText {#text} at (246,188) size 4x19
+          text run at (246,188) width 4: " "
+        LayoutTextControl {INPUT} at (258,171) size 312x45 [bgcolor=#FFFFFF] [border: (4px inset #EEEEEE)]
+          LayoutFlexibleBox {DIV} at (6,6) size 300x33
+            LayoutBlockFlow {DIV} at (0,0) size 273x33
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (578,188) size 0x0
+        LayoutTextControl {INPUT} at (4,228) size 152x21 [bgcolor=#FFFFFF] [border: (1px solid #BDC7D8)]
+          LayoutFlexibleBox {DIV} at (18,4) size 130x13
+            LayoutBlockFlow {DIV} at (0,0) size 118x13
+        LayoutText {#text} at (0,0) size 0x0
+layer at (15,15) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (183,15) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (15,45) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (183,45) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (16,76) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (185,76) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (22,112) size 114x16
+  LayoutBlockFlow {DIV} at (0,0) size 114x16
+    LayoutText {#text} at (0,0) size 65x16
+      text run at (0,0) width 65: "default text"
+layer at (15,152) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (15,182) size 137x16
+  LayoutBlockFlow {DIV} at (0,0) size 137x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (15,218) size 161x19
+  LayoutBlockFlow {DIV} at (0,0) size 161x19
+    LayoutText {#text} at (0,0) size 22x18
+      text run at (0,0) width 22: "foo"
+layer at (209,214) size 207x24
+  LayoutBlockFlow {DIV} at (0,0) size 207x24
+    LayoutText {#text} at (0,0) size 28x23
+      text run at (0,0) width 28: "foo"
+layer at (452,212) size 253x28
+  LayoutBlockFlow {DIV} at (0,0) size 253x28
+    LayoutText {#text} at (0,0) size 33x27
+      text run at (0,0) width 33: "foo"
+layer at (19,268) size 205x24
+  LayoutBlockFlow {DIV} at (0,0) size 205x24
+    LayoutText {#text} at (0,0) size 28x23
+      text run at (0,0) width 28: "foo"
+layer at (272,261) size 273x33
+  LayoutBlockFlow {DIV} at (0,0) size 273x33
+    LayoutText {#text} at (0,0) size 38x32
+      text run at (0,0) width 38: "foo"
+layer at (19,329) size 205x24
+  LayoutBlockFlow {DIV} at (0,0) size 205x24
+    LayoutText {#text} at (0,0) size 28x23
+      text run at (0,0) width 28: "foo"
+layer at (272,322) size 273x33
+  LayoutBlockFlow {DIV} at (0,0) size 273x33
+    LayoutText {#text} at (0,0) size 38x32
+      text run at (0,0) width 38: "foo"
+layer at (30,377) size 118x13
+  LayoutBlockFlow {DIV} at (18,4) size 118x13 [color=#757575]
+    LayoutText {#text} at (0,0) size 102x13
+      text run at (0,0) width 102: "Search for Events"
+layer at (30,377) size 118x13
+  LayoutBlockFlow {DIV} at (0,0) size 118x13
+layer at (153,19) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (153,49) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (321,49) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (154,80) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (323,80) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (137,116) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (115,3.50) size 9x9
+layer at (153,156) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (153,186) size 9x9 transparent
+  LayoutBlockFlow {DIV} at (138,3.50) size 9x9
+layer at (177,222) size 11x11 transparent
+  LayoutBlockFlow {DIV} at (162,4) size 11x11
+layer at (417,219) size 14x14 transparent
+  LayoutBlockFlow {DIV} at (208,5) size 14x14
+layer at (706,218) size 17x17 transparent
+  LayoutBlockFlow {DIV} at (254,5.50) size 17x17
+layer at (225,273) size 14x14 transparent
+  LayoutBlockFlow {DIV} at (206.50,5) size 14x14
+layer at (547,268) size 19x19 transparent
+  LayoutBlockFlow {DIV} at (275,7) size 19x19
+layer at (225,334) size 14x14 transparent
+  LayoutBlockFlow {DIV} at (206.50,5) size 14x14
+layer at (547,329) size 19x19 transparent
+  LayoutBlockFlow {DIV} at (275,7) size 19x19
+layer at (149,380) size 8x8 transparent
+  LayoutBlockFlow {DIV} at (119,2.50) size 8x8
+caret: position 0 of child 0 {#text} of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 10 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-display-none-cancel-button-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-display-none-cancel-button-expected.txt
new file mode 100644
index 0000000..ec49f1e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/search-display-none-cancel-button-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 499x19
+        text run at (0,0) width 499: "This tests that the display:none style will work on a search field's cancel button."
+      LayoutBR {BR} at (499,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 156x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (3,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 150x16
+      LayoutText {#text} at (0,0) size 0x0
+layer at (11,31) size 150x16
+  LayoutBlockFlow {DIV} at (0,0) size 150x16
+    LayoutText {#text} at (0,0) size 22x16
+      text run at (0,0) width 22: "test"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/searchfield-heights-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/searchfield-heights-expected.txt
new file mode 100644
index 0000000..150f99f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/search/searchfield-heights-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 368x19
+        text run at (0,0) width 368: "This tests that aqua-style search fields do not honor height."
+      LayoutBR {BR} at (368,0) size 0x0
+      LayoutTextControl {INPUT} at (0,124.50) size 79x6 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (3,0) size 73x6
+          LayoutBlockFlow {DIV} at (0,0) size 64x6
+      LayoutText {#text} at (79,114) size 4x20
+        text run at (79,114) width 4: " "
+      LayoutTextControl {INPUT} at (83,104) size 179x40 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (3,11.50) size 173x17
+          LayoutBlockFlow {DIV} at (0,0) size 159x17
+      LayoutText {#text} at (262,114) size 4x20
+        text run at (262,114) width 4: " "
+      LayoutTextControl {INPUT} at (266,20) size 307x200 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (3,83.50) size 301x33
+          LayoutBlockFlow {DIV} at (0,0) size 278x33
+      LayoutText {#text} at (0,0) size 0x0
+layer at (11,133) size 64x6 backgroundClip at (11,135) size 64x2 clip at (11,135) size 64x2
+  LayoutBlockFlow {DIV} at (0,0) size 64x6
+    LayoutText {#text} at (0,0) size 10x6
+      text run at (0,0) width 10: "mini"
+layer at (94,124) size 159x17
+  LayoutBlockFlow {DIV} at (0,0) size 159x17
+    LayoutText {#text} at (0,0) size 35x17
+      text run at (0,0) width 35: "small"
+layer at (277,112) size 278x33
+  LayoutBlockFlow {DIV} at (0,0) size 278x33
+    LayoutText {#text} at (0,0) size 84x32
+      text run at (0,0) width 84: "regular"
+layer at (76,133) size 5x5 backgroundClip at (10,135) size 75x2 clip at (10,135) size 75x2 transparent
+  LayoutBlockFlow {DIV} at (65,0.50) size 5x5
+layer at (254,127) size 10x10 transparent
+  LayoutBlockFlow {DIV} at (160,3.50) size 10x10
+layer at (556,119) size 19x19 transparent
+  LayoutBlockFlow {DIV} at (279,7) size 19x19
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label01-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label01-expected.txt
new file mode 100644
index 0000000..f987572
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label01-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 672x19
+        text run at (0,0) width 672: "In the selection list below, the text 'The label for this element is \"1\"' should appear, and not the character '1'"
+      LayoutBR {BR} at (671,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 200x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 198x18
+          LayoutText (anonymous) at (4,1) size 178x16
+            text run at (4,1) width 178: "the label for this element is \"1\""
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label02-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label02-expected.txt
new file mode 100644
index 0000000..fbd603b9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label02-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 299x19
+        text run at (0,0) width 299: "With the label empty, the enclosing text is used."
+      LayoutBR {BR} at (298,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 324x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 322x18
+          LayoutText (anonymous) at (4,1) size 302x16
+            text run at (4,1) width 302: "empty label should display empty string to match IE"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label03-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label03-expected.txt
new file mode 100644
index 0000000..596a8c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label03-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 436x19
+        text run at (0,0) width 436: "When the label contains only white space, the containing text is used."
+      LayoutBR {BR} at (436,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 357x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 355x18
+          LayoutText (anonymous) at (4,1) size 335x16
+            text run at (4,1) width 335: "white space label should display empty string to match IE"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label04-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label04-expected.txt
new file mode 100644
index 0000000..1bbcef6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label04-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 595x19
+        text run at (0,0) width 595: "The label attribute appears, but is missing the equals value piece, so the containing text is used."
+      LayoutBR {BR} at (595,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 485x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 483x18
+          LayoutText (anonymous) at (4,1) size 463x16
+            text run at (4,1) width 463: "the label attribute is mentioned but no value is specified; this text should appear"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label05-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label05-expected.txt
new file mode 100644
index 0000000..01f917c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label05-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 667x19
+        text run at (0,0) width 667: "In the list box below, the text \"This text should appear\" should be shown as the first entry into the list box."
+      LayoutBR {BR} at (666,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 157x87 clip at (9,29) size 140x85
+  LayoutListBox {SELECT} at (0,20) size 157x87 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 140x17
+      LayoutText {#text} at (2,0) size 136x16
+        text run at (2,0) width 136: "This text should appear"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label06-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label06-expected.txt
new file mode 100644
index 0000000..09c6963
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label06-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 718x19
+        text run at (0,0) width 718: "The select item below has a label specified, and no enclosed text. There should be no text shown in the select box."
+      LayoutBR {BR} at (717,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 22x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 4x16
+            text run at (4,1) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label07-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label07-expected.txt
new file mode 100644
index 0000000..92d9a16
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/HTMLOptionElement_label07-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 781x39
+        text run at (0,0) width 781: "The select item below has a label specified, and enclosed text that is whitespace. There should be no text shown in the select"
+        text run at (0,20) width 28: "box."
+      LayoutBR {BR} at (28,20) size 0x0
+      LayoutMenuList {SELECT} at (0,40) size 22x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 4x16
+            text run at (4,1) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/basic-selects-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/basic-selects-expected.txt
new file mode 100644
index 0000000..5a55629
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/basic-selects-expected.txt
@@ -0,0 +1,170 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x536
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x536
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x520
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x520 [border: (1px solid #FF0000)]
+        LayoutText {#text} at (1,1) size 164x19
+          text run at (1,1) width 164: "Whitespace in option text:"
+        LayoutMenuList {SELECT} at (165,1) size 48x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 46x18
+            LayoutText (anonymous) at (4,1) size 26x16
+              text run at (4,1) width 26: "f o o"
+        LayoutText {#text} at (213,1) size 7x19
+          text run at (213,1) width 7: "a"
+        LayoutMenuList {SELECT} at (220,1) size 48x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 46x18
+            LayoutText (anonymous) at (4,1) size 4x16
+              text run at (4,1) width 4: " "
+        LayoutText {#text} at (268,1) size 8x19
+          text run at (268,1) width 8: "b"
+        LayoutBR {BR} at (276,1) size 0x0
+        LayoutBR {BR} at (1,19) size 0x0
+        LayoutText {#text} at (1,37) size 135x19
+          text run at (1,37) width 135: "Simple select control:"
+        LayoutMenuList {SELECT} at (136,37) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (176,37) size 7x19
+          text run at (176,37) width 7: "a"
+        LayoutMenuList {SELECT} at (183,37) size 40x20 [color=#808080] [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (223,37) size 8x19
+          text run at (223,37) width 8: "b"
+        LayoutBR {BR} at (231,37) size 0x0
+        LayoutBR {BR} at (1,55) size 0x0
+        LayoutText {#text} at (1,73) size 194x19
+          text run at (1,73) width 194: "Line-height should be ignored:"
+        LayoutMenuList {SELECT} at (195,73) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (235,73) size 7x19
+          text run at (235,73) width 7: "a"
+        LayoutMenuList {SELECT} at (242,73) size 40x20 [color=#808080] [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "bar"
+        LayoutText {#text} at (282,73) size 8x19
+          text run at (282,73) width 8: "b"
+        LayoutBR {BR} at (290,73) size 0x0
+        LayoutBR {BR} at (1,91) size 0x0
+        LayoutText {#text} at (1,113) size 434x19
+          text run at (1,113) width 434: "Padding should be respected, the arrow button shouldn't change size:"
+        LayoutMenuList {SELECT} at (435,109) size 48x28 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (5,5) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (483,113) size 7x19
+          text run at (483,113) width 7: "a"
+        LayoutMenuList {SELECT} at (490,109) size 48x28 [color=#808080] [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (5,5) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (538,113) size 8x19
+          text run at (538,113) width 8: "b"
+        LayoutBR {BR} at (546,113) size 0x0
+        LayoutBR {BR} at (1,135) size 0x0
+        LayoutText {#text} at (1,160) size 176x19
+          text run at (1,160) width 176: "Border should be respected:"
+        LayoutMenuList {SELECT} at (177,153) size 54x34 [bgcolor=#DDDDDD] [border: (8px solid #33CCFF)]
+          LayoutNGBlockFlow (anonymous) at (8,8) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (231,160) size 7x19
+          text run at (231,160) width 7: "a"
+        LayoutMenuList {SELECT} at (238,153) size 54x34 [color=#808080] [bgcolor=#DDDDDD] [border: (8px solid #33CCFF)]
+          LayoutNGBlockFlow (anonymous) at (8,8) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (292,160) size 8x19
+          text run at (292,160) width 8: "b"
+        LayoutBR {BR} at (300,160) size 0x0
+        LayoutBR {BR} at (1,185) size 0x0
+        LayoutText {#text} at (1,211) size 116x19
+          text run at (1,211) width 116: "Border + padding:"
+        LayoutMenuList {SELECT} at (117,203) size 56x36 [bgcolor=#DDDDDD] [border: (4px solid #33CCFF)]
+          LayoutNGBlockFlow (anonymous) at (9,9) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (173,211) size 7x19
+          text run at (173,211) width 7: "a"
+        LayoutMenuList {SELECT} at (180,203) size 56x36 [color=#808080] [bgcolor=#DDDDDD] [border: (4px solid #33CCFF)]
+          LayoutNGBlockFlow (anonymous) at (9,9) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (236,211) size 8x19
+          text run at (236,211) width 8: "b"
+        LayoutBR {BR} at (244,211) size 0x0
+        LayoutBR {BR} at (1,237) size 0x0
+        LayoutText {#text} at (1,260) size 480x19
+          text run at (1,260) width 480: "Height larger than font-size, button should grow, text baseline should center:"
+        LayoutMenuList {SELECT} at (480.67,255) size 40x30 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,6) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (520,260) size 8x19
+          text run at (520,260) width 8: "a"
+        LayoutMenuList {SELECT} at (527.67,255) size 40x30 [color=#808080] [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,6) size 38x18
+            LayoutText (anonymous) at (4,1) size 4x16
+              text run at (4,1) width 4: " "
+        LayoutText {#text} at (567,260) size 9x19
+          text run at (567,260) width 9: "b"
+        LayoutBR {BR} at (575,260) size 0x0
+        LayoutBR {BR} at (1,283) size 0x0
+        LayoutText {#text} at (1,301) size 486x19
+          text run at (1,301) width 486: "Height smaller than font-size, whole select shrinks but baseline is unchanged:"
+        LayoutMenuList {SELECT} at (487,301) size 40x3 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "foo"
+        LayoutText {#text} at (527,301) size 7x19
+          text run at (527,301) width 7: "a"
+        LayoutMenuList {SELECT} at (534,301) size 40x3 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "bar"
+        LayoutText {#text} at (574,301) size 8x19
+          text run at (574,301) width 8: "b"
+        LayoutBR {BR} at (582,301) size 0x0
+        LayoutBR {BR} at (1,317) size 0x0
+        LayoutText {#text} at (1,333) size 164x19
+          text run at (1,333) width 164: "select control with size=0:"
+        LayoutBR {BR} at (165,333) size 0x0
+        LayoutMenuList {SELECT} at (1,351) size 201x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 199x18
+            LayoutText (anonymous) at (4,1) size 78x16
+              text run at (4,1) width 78: "Future Series"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (202,351) size 0x0
+        LayoutText {#text} at (1,369) size 164x19
+          text run at (1,369) width 164: "select control with size=1:"
+        LayoutBR {BR} at (165,369) size 0x0
+        LayoutMenuList {SELECT} at (1,387) size 201x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 199x18
+            LayoutText (anonymous) at (4,1) size 78x16
+              text run at (4,1) width 78: "Future Series"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (202,387) size 0x0
+        LayoutText {#text} at (1,405) size 161x19
+          text run at (1,405) width 161: "Non-styled select control:"
+        LayoutBR {BR} at (162,405) size 0x0
+        LayoutMenuList {SELECT} at (1,423) size 221x40 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (11,11) size 199x18
+            LayoutText (anonymous) at (4,1) size 78x16
+              text run at (4,1) width 78: "Future Series"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (222,433) size 0x0
+        LayoutText {#text} at (1,461) size 286x19
+          text run at (1,461) width 286: "Styled select control with large border-radius:"
+        LayoutBR {BR} at (286,461) size 0x0
+        LayoutMenuList {SELECT} at (1,479) size 221x40 [bgcolor=#33CCFF] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (11,11) size 199x18
+            LayoutText (anonymous) at (4,1) size 78x16
+              text run at (4,1) width 78: "Future Series"
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (222,489) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/disabled-select-change-index-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/disabled-select-change-index-expected.txt
new file mode 100644
index 0000000..699a3ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/disabled-select-change-index-expected.txt
@@ -0,0 +1,85 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutMenuList {SELECT} at (0,0) size 58x20 [color=#808080] [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 56x18
+          LayoutText (anonymous) at (4,1) size 35x16
+            text run at (4,1) width 35: "PASS"
+      LayoutBR {BR} at (58,15) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 58x20 [color=#808080] [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 56x18
+          LayoutText (anonymous) at (4,1) size 35x16
+            text run at (4,1) width 35: "PASS"
+      LayoutBR {BR} at (58,35) size 0x0
+      LayoutMenuList {SELECT} at (0,40) size 58x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 56x18
+          LayoutText (anonymous) at (4,1) size 35x16
+            text run at (4,1) width 35: "PASS"
+      LayoutBR {BR} at (58,55) size 0x0
+      LayoutMenuList {SELECT} at (0,60) size 58x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 56x18
+          LayoutText (anonymous) at (4,1) size 35x16
+            text run at (4,1) width 35: "PASS"
+      LayoutBR {BR} at (58,75) size 0x0
+      LayoutBR {BR} at (56,112) size 0x0
+      LayoutBR {BR} at (56,148) size 0x0
+      LayoutBR {BR} at (56,184) size 0x0
+      LayoutBR {BR} at (56,220) size 0x0
+      LayoutText {#text} at (0,224) size 485x19
+        text run at (0,224) width 485: "PASS: sel1 correctly set to selectedIndex 1 by sel1.options[1].selected = true."
+      LayoutBR {BR} at (484,224) size 0x0
+      LayoutText {#text} at (0,244) size 437x19
+        text run at (0,244) width 437: "PASS: sel2 correctly set to selectedIndex 1 by sel2.selectedIndex = 1."
+      LayoutBR {BR} at (436,244) size 0x0
+      LayoutText {#text} at (0,264) size 485x19
+        text run at (0,264) width 485: "PASS: sel3 correctly set to selectedIndex 1 by sel3.options[1].selected = true."
+      LayoutBR {BR} at (484,264) size 0x0
+      LayoutText {#text} at (0,284) size 437x19
+        text run at (0,284) width 437: "PASS: sel4 correctly set to selectedIndex 1 by sel4.selectedIndex = 1."
+      LayoutBR {BR} at (436,284) size 0x0
+      LayoutText {#text} at (0,304) size 485x19
+        text run at (0,304) width 485: "PASS: sel5 correctly set to selectedIndex 1 by sel5.options[1].selected = true."
+      LayoutBR {BR} at (484,304) size 0x0
+      LayoutText {#text} at (0,324) size 437x19
+        text run at (0,324) width 437: "PASS: sel6 correctly set to selectedIndex 1 by sel6.selectedIndex = 1."
+      LayoutBR {BR} at (436,324) size 0x0
+      LayoutText {#text} at (0,344) size 485x19
+        text run at (0,344) width 485: "PASS: sel7 correctly set to selectedIndex 1 by sel7.options[1].selected = true."
+      LayoutBR {BR} at (484,344) size 0x0
+      LayoutText {#text} at (0,364) size 437x19
+        text run at (0,364) width 437: "PASS: sel8 correctly set to selectedIndex 1 by sel8.selectedIndex = 1."
+      LayoutBR {BR} at (436,364) size 0x0
+layer at (8,88) size 56x36 clip at (9,89) size 39x34
+  LayoutListBox {SELECT} at (0,80) size 56.02x36 [color=#808080] [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 39.02x17
+      LayoutText {#text} at (2,0) size 28x16
+        text run at (2,0) width 28: "FAIL"
+    LayoutBlockFlow {OPTION} at (1,18) size 39.02x17 [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 35x16
+        text run at (2,0) width 35: "PASS"
+layer at (8,124) size 56x36 clip at (9,125) size 39x34
+  LayoutListBox {SELECT} at (0,116) size 56.02x36 [color=#808080] [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 39.02x17
+      LayoutText {#text} at (2,0) size 28x16
+        text run at (2,0) width 28: "FAIL"
+    LayoutBlockFlow {OPTION} at (1,18) size 39.02x17 [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 35x16
+        text run at (2,0) width 35: "PASS"
+layer at (8,160) size 56x36 clip at (9,161) size 39x34
+  LayoutListBox {SELECT} at (0,152) size 56.02x36 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 39.02x17
+      LayoutText {#text} at (2,0) size 28x16
+        text run at (2,0) width 28: "FAIL"
+    LayoutBlockFlow {OPTION} at (1,18) size 39.02x17 [color=#808080] [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 35x16
+        text run at (2,0) width 35: "PASS"
+layer at (8,196) size 56x36 clip at (9,197) size 39x34
+  LayoutListBox {SELECT} at (0,188) size 56.02x36 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 39.02x17
+      LayoutText {#text} at (2,0) size 28x16
+        text run at (2,0) width 28: "FAIL"
+    LayoutBlockFlow {OPTION} at (1,18) size 39.02x17 [color=#808080] [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 35x16
+        text run at (2,0) width 35: "PASS"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/hidden-listbox-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/hidden-listbox-expected.txt
new file mode 100644
index 0000000..f082f4b0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/hidden-listbox-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 506x19
+        text run at (0,0) width 506: "This tests that the whole listbox control is hidden when visibility is set to hidden."
+      LayoutBR {BR} at (506,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+hidden layer at (8,28) size 195x70 clip at (9,29) size 178x68
+  LayoutListBox {SELECT} at (0,20) size 195x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 178x17
+      LayoutText {#text} at (2,0) size 174x16
+        text run at (2,0) width 174: "This text should not be visible"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-appearance-basic-expected.txt
new file mode 100644
index 0000000..309a045
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-appearance-basic-expected.txt
@@ -0,0 +1,174 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 627
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x627 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x627.19
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x611.19
+      LayoutText {#text} at (47,59) size 4x19
+        text run at (47,59) width 4: " "
+      LayoutText {#text} at (130,59) size 4x19
+        text run at (130,59) width 4: " "
+      LayoutText {#text} at (181,59) size 4x19
+        text run at (181,59) width 4: " "
+      LayoutText {#text} at (251,59) size 4x19
+        text run at (251,59) width 4: " "
+      LayoutText {#text} at (309,59) size 4x19
+        text run at (309,59) width 4: " "
+      LayoutText {#text} at (367,59) size 4x19
+        text run at (367,59) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (425,59) size 0x0
+      LayoutText {#text} at (51,142) size 4x19
+        text run at (51,142) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (102,142) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (47,221) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (47,300) size 0x0
+      LayoutText {#text} at (51,430) size 4x20
+        text run at (51,430) width 4: " "
+      LayoutText {#text} at (112,430) size 4x20
+        text run at (112,430) width 4: " "
+      LayoutText {#text} at (178,430) size 4x20
+        text run at (178,430) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (245,430) size 0x0
+      LayoutText {#text} at (64,591) size 4x20
+        text run at (64,591) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (149,591) size 0x0
+layer at (12,12) size 39x70 clip at (13,13) size 22x68
+  LayoutListBox {SELECT} at (4,4) size 39x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 22x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+layer at (63,12) size 71x70 clip at (64,13) size 54x68
+  LayoutListBox {SELECT} at (55,4) size 71x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 54x17 [bgcolor=#1E90FF]
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+    LayoutBlockFlow {OPTION} at (1,18) size 54x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "bar"
+    LayoutBlockFlow {OPTION} at (1,35) size 54x17 [color=#808080] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Disabled"
+layer at (146,12) size 39x70 clip at (147,13) size 22x68
+  LayoutListBox {SELECT} at (138,4) size 39x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 22x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+    LayoutBlockFlow {OPTION} at (1,18) size 22x17 [color=#808080] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "bar"
+layer at (197,12) size 58x70 clip at (198,13) size 41x68
+  LayoutListBox {SELECT} at (189,4) size 58x70 [color=#808080] [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 41x17 [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+    LayoutBlockFlow {OPTION} at (1,18) size 41x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "bar"
+    LayoutBlockFlow {OPTGROUP} at (1,35) size 41x34
+      LayoutBlockFlow {DIV} at (0,0) size 41x17
+      LayoutBlockFlow {OPTION} at (0,17) size 41x17 [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 21x16
+          text run at (18,0) width 21: "baz"
+layer at (267,63) size 46x19 clip at (268,64) size 29x17 scrollHeight 68
+  LayoutListBox {SELECT} at (259,55) size 46x19 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo1"
+    LayoutBlockFlow {OPTION} at (1,18) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo2"
+    LayoutBlockFlow {OPTION} at (1,35) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo3"
+    LayoutBlockFlow {OPTION} at (1,52) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo4"
+layer at (325,46) size 46x36 clip at (326,47) size 29x34 scrollHeight 68
+  LayoutListBox {SELECT} at (317,38) size 46x36 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo1"
+    LayoutBlockFlow {OPTION} at (1,18) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo2"
+    LayoutBlockFlow {OPTION} at (1,35) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo3"
+    LayoutBlockFlow {OPTION} at (1,52) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo4"
+layer at (383,29) size 46x53 clip at (384,30) size 29x51 scrollHeight 68
+  LayoutListBox {SELECT} at (375,21) size 46x53 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo1"
+    LayoutBlockFlow {OPTION} at (1,18) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo2"
+    LayoutBlockFlow {OPTION} at (1,35) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo3"
+    LayoutBlockFlow {OPTION} at (1,52) size 29x17
+      LayoutText {#text} at (2,0) size 25x16
+        text run at (2,0) width 25: "foo4"
+layer at (12,91) size 43x74 clip at (15,94) size 22x68
+  LayoutListBox {SELECT} at (4,83) size 43x74 [bgcolor=#FFFFFF] [border: (3px solid #00FF00)]
+    LayoutBlockFlow {OPTION} at (3,3) size 22x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+layer at (67,95) size 39x70 clip at (68,96) size 22x68
+  LayoutListBox {SELECT} at (59,87) size 39x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 22x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+layer at (12,174) size 39x70 clip at (13,175) size 22x68
+  LayoutListBox {SELECT} at (4,166) size 39x70 [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 22x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+layer at (12,253) size 39x70 clip at (13,254) size 22x68
+  LayoutListBox {SELECT} at (4,245) size 39x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 22x17
+      LayoutText {#text} at (2,0) size 18x16
+        text run at (2,0) width 18: "foo"
+layer at (12,370) size 43x83 clip at (13,371) size 26x81
+  LayoutListBox {SELECT} at (4,362.44) size 43x82.75 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 26x20.19
+      LayoutText {#text} at (2,0) size 22x18
+        text run at (2,0) width 22: "foo"
+layer at (67,351) size 49x102 clip at (68,352) size 32x100
+  LayoutListBox {SELECT} at (59,343.19) size 49x102 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 32x25
+      LayoutText {#text} at (2,0) size 28x23
+        text run at (2,0) width 28: "foo"
+layer at (128,332) size 54x121 clip at (129,333) size 37x119
+  LayoutListBox {SELECT} at (120,324) size 54x121.19 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 37x29.80
+      LayoutText {#text} at (2,0) size 33x27
+        text run at (2,0) width 33: "foo"
+layer at (194,332) size 55x121 clip at (195,333) size 38x119
+  LayoutListBox {SELECT} at (186,324) size 55x121.19 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 38x20.19
+      LayoutText {#text} at (2,0) size 22x18
+        text run at (2,0) width 22: "foo"
+    LayoutBlockFlow {OPTION} at (1,21.19) size 38x29.80
+      LayoutText {#text} at (2,0) size 34x27
+        text run at (2,0) width 34: "bar"
+layer at (14,507) size 52x105 backgroundClip at (14,507) size 52x93 clip at (16,509) size 34x91
+  LayoutListBox {SELECT} at (6,499.19) size 52x105 [bgcolor=#FFFFFF] [border: (1.50px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1.50,1.50) size 34x25.50
+      LayoutText {#text} at (3,0) size 28x23
+        text run at (3,0) width 28: "foo"
+layer at (84,466) size 65x144 backgroundClip at (84,466) size 65x134 clip at (86,468) size 46x132
+  LayoutListBox {SELECT} at (76,458.19) size 65x144 [bgcolor=#FFFFFF] [border: (2px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (2,2) size 46x35
+      LayoutText {#text} at (4,0) size 38x32
+        text run at (4,0) width 38: "foo"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-width-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-width-change-expected.txt
new file mode 100644
index 0000000..e6217de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/listbox-width-change-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 646x19
+        text run at (0,0) width 646: "This tests that when a list box's options get updated, the list box will recalculate its width, and relayout."
+      LayoutBR {BR} at (646,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 211x70 clip at (9,29) size 194x68
+  LayoutListBox {SELECT} at (0,20) size 211x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 194x17
+      LayoutText {#text} at (2,0) size 190x16
+        text run at (2,0) width 190: "This text should fit in the list box"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-basic-expected.txt
new file mode 100644
index 0000000..34d1de2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-basic-expected.txt
@@ -0,0 +1,4003 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x525
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x525
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x509
+      LayoutMenuList {SELECT} at (4,4) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (48,4) size 0x0
+      LayoutMenuList {SELECT} at (4,32) size 40x28 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,9) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (48,40) size 4x19
+        text run at (48,40) width 4: " "
+      LayoutMenuList {SELECT} at (56,40) size 46x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (106,40) size 4x19
+        text run at (106,40) width 4: " "
+      LayoutMenuList {SELECT} at (114,40) size 40x28 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (158,40) size 4x19
+        text run at (158,40) width 4: " "
+      LayoutMenuList {SELECT} at (166,40) size 46x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (7,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (216,40) size 0x0
+      LayoutMenuList {SELECT} at (4,76) size 44x24 [bgcolor=#DDDDDD] [border: (3px solid #00FF00)]
+        LayoutNGBlockFlow (anonymous) at (3,3) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (52,78) size 4x19
+        text run at (52,78) width 4: " "
+      LayoutMenuList {SELECT} at (60,78) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (104,78) size 0x0
+      LayoutMenuList {SELECT} at (4,115) size 40x20 [color=#FFFFFF] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (48,115) size 4x19
+        text run at (48,115) width 4: " "
+      LayoutNGBlockFlow {DIV} at (52,104) size 62x42 [bgcolor=#DBB102]
+        LayoutMenuList {SELECT} at (12,12) size 38x18
+          LayoutNGBlockFlow (anonymous) at (0,0) size 38x18
+            LayoutText (anonymous) at (4,1) size 18x16
+              text run at (4,1) width 18: "bar"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (114,115) size 0x0
+      LayoutMenuList {SELECT} at (4,150) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (4,1) size 18x16
+            text run at (4,1) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (48,150) size 0x0
+      LayoutMenuList {SELECT} at (4,184) size 44x22 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 42x21
+          LayoutText (anonymous) at (4,1) size 22x18
+            text run at (4,1) width 22: "foo"
+      LayoutText {#text} at (52,186) size 4x19
+        text run at (52,186) width 4: " "
+      LayoutMenuList {SELECT} at (60,180) size 50x27 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 48x26
+          LayoutText (anonymous) at (4,1) size 28x23
+            text run at (4,1) width 28: "foo"
+      LayoutText {#text} at (114,186) size 4x19
+        text run at (114,186) width 4: " "
+      LayoutMenuList {SELECT} at (122,178) size 55x31 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 53x30
+          LayoutText (anonymous) at (4,1) size 33x27
+            text run at (4,1) width 33: "foo"
+      LayoutText {#text} at (181,186) size 4x19
+        text run at (181,186) width 4: " "
+      LayoutMenuList {SELECT} at (189,186) size 121x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 119x18
+          LayoutText (anonymous) at (4,1) size 99x16
+            text run at (4,1) width 99: "September 2016"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (314,186) size 0x0
+      LayoutMenuList {SELECT} at (6,229.50) size 61x28 [bgcolor=#DDDDDD] [border: (1.50px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1.50,1.50) size 58x26
+          LayoutText (anonymous) at (6,1) size 28x23
+            text run at (6,1) width 28: "foo"
+      LayoutText {#text} at (73,236) size 4x19
+        text run at (73,236) width 4: " "
+      LayoutMenuList {SELECT} at (85,221) size 82x40 [bgcolor=#DDDDDD] [border: (2px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (2,2) size 78x37
+          LayoutText (anonymous) at (8,2) size 38x32
+            text run at (8,2) width 38: "foo"
+      LayoutText {#text} at (175,236) size 4x19
+        text run at (175,236) width 4: " "
+      LayoutMenuList {SELECT} at (181,241.50) size 31x13 [bgcolor=#DDDDDD] [border: (0.50px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (0.50,0.50) size 30x12
+          LayoutText (anonymous) at (2,0) size 13x12
+            text run at (2,0) width 13: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (214,236) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (208,283) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (208,317) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (208,351) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (208,385) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (208,419) size 0x0
+      LayoutMenuList {SELECT} at (4,443) size 60x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 58x18
+          LayoutText (anonymous) at (4,1) size 36x16
+            text run at (4,1) width 36: "Month"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (68,443) size 0x0
+      LayoutMenuList {SELECT} at (4,478) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (16,1) size 18x16
+            text run at (16,1) width 18: "foo"
+      LayoutText {#text} at (48,478) size 4x19
+        text run at (48,478) width 4: " "
+      LayoutMenuList {SELECT} at (56,476) size 44x24 [bgcolor=#DDDDDD] [border: (3px solid #00FF00)]
+        LayoutNGBlockFlow (anonymous) at (3,3) size 38x18
+          LayoutText (anonymous) at (16,1) size 18x16
+            text run at (16,1) width 18: "foo"
+      LayoutText {#text} at (104,478) size 4x19
+        text run at (104,478) width 4: " "
+      LayoutMenuList {SELECT} at (112,471) size 54x34 [bgcolor=#DDDDDD] [border: (8px solid #00FF00)]
+        LayoutNGBlockFlow (anonymous) at (8,8) size 38x18
+          LayoutText (anonymous) at (16,1) size 18x16
+            text run at (16,1) width 18: "foo"
+      LayoutText {#text} at (170,478) size 4x19
+        text run at (170,478) width 4: " "
+      LayoutMenuList {SELECT} at (178,478) size 40x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 38x18
+          LayoutText (anonymous) at (16,1) size 18x16
+            text run at (16,1) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (222,478) size 0x0
+layer at (12,281) size 200x25 clip at (13,282) size 183x23 scrollHeight 51
+  LayoutListBox {SELECT} at (4,273) size 200x25 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 1"
+    LayoutBlockFlow {OPTION} at (1,18) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 2"
+    LayoutBlockFlow {OPTION} at (1,35) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 3"
+layer at (12,315) size 200x25 clip at (13,316) size 183x23 scrollY 11.00 scrollHeight 51
+  LayoutListBox {SELECT} at (4,307) size 200x25 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 1"
+    LayoutBlockFlow {OPTION} at (1,18) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 2"
+    LayoutBlockFlow {OPTION} at (1,35) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 3"
+layer at (12,349) size 200x25 clip at (13,350) size 183x23 scrollY 11.00 scrollHeight 51
+  LayoutListBox {SELECT} at (4,341) size 200x25 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 183x17
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 1"
+    LayoutBlockFlow {OPTION} at (1,18) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 2"
+    LayoutBlockFlow {OPTION} at (1,35) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 3"
+layer at (12,383) size 200x25 clip at (13,384) size 183x23 scrollHeight 374
+  LayoutListBox {SELECT} at (4,375) size 200x25 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 48x16
+        text run at (2,0) width 48: "Item 0.1"
+    LayoutBlockFlow {OPTGROUP} at (1,18) size 183x68
+      LayoutBlockFlow {DIV} at (0,0) size 183x17
+        LayoutText {#text} at (2,0) size 50x16
+          text run at (2,0) width 50: "Group 1"
+      LayoutBlockFlow {OPTION} at (0,17) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 1.1"
+      LayoutBlockFlow {OPTION} at (0,34) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 1.2"
+      LayoutBlockFlow {OPTION} at (0,51) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 1.3"
+    LayoutBlockFlow {OPTGROUP} at (1,86) size 183x68
+      LayoutBlockFlow {DIV} at (0,0) size 183x17
+        LayoutText {#text} at (2,0) size 50x16
+          text run at (2,0) width 50: "Group 2"
+      LayoutBlockFlow {OPTION} at (0,17) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 2.1"
+      LayoutBlockFlow {OPTION} at (0,34) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 2.2"
+      LayoutBlockFlow {OPTION} at (0,51) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 2.3"
+    LayoutBlockFlow {OPTGROUP} at (1,154) size 183x68
+      LayoutBlockFlow {DIV} at (0,0) size 183x17
+        LayoutText {#text} at (2,0) size 50x16
+          text run at (2,0) width 50: "Group 3"
+      LayoutBlockFlow {OPTION} at (0,17) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 3.1"
+      LayoutBlockFlow {OPTION} at (0,34) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 3.2"
+      LayoutBlockFlow {OPTION} at (0,51) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 3.3"
+    LayoutBlockFlow {OPTGROUP} at (1,222) size 183x68
+      LayoutBlockFlow {DIV} at (0,0) size 183x17
+        LayoutText {#text} at (2,0) size 50x16
+          text run at (2,0) width 50: "Group 4"
+      LayoutBlockFlow {OPTION} at (0,17) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 4.1"
+      LayoutBlockFlow {OPTION} at (0,34) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 4.2"
+      LayoutBlockFlow {OPTION} at (0,51) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 4.3"
+    LayoutBlockFlow {OPTGROUP} at (1,290) size 183x68
+      LayoutBlockFlow {DIV} at (0,0) size 183x17
+        LayoutText {#text} at (2,0) size 50x16
+          text run at (2,0) width 50: "Group 5"
+      LayoutBlockFlow {OPTION} at (0,17) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 5.1"
+      LayoutBlockFlow {OPTION} at (0,34) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 5.2"
+      LayoutBlockFlow {OPTION} at (0,51) size 183x17
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 48x16
+          text run at (18,0) width 48: "Item 5.3"
+    LayoutBlockFlow {OPTION} at (1,358) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 48x16
+        text run at (2,0) width 48: "Item 0.2"
+layer at (12,417) size 200x25 clip at (13,418) size 183x23 scrollHeight 20978
+  LayoutListBox {SELECT} at (4,409) size 200x25 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 1"
+    LayoutBlockFlow {OPTION} at (1,18) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 2"
+    LayoutBlockFlow {OPTION} at (1,35) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 3"
+    LayoutBlockFlow {OPTION} at (1,52) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 4"
+    LayoutBlockFlow {OPTION} at (1,69) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 5"
+    LayoutBlockFlow {OPTION} at (1,86) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 6"
+    LayoutBlockFlow {OPTION} at (1,103) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 7"
+    LayoutBlockFlow {OPTION} at (1,120) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 8"
+    LayoutBlockFlow {OPTION} at (1,137) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 37x16
+        text run at (2,0) width 37: "Item 9"
+    LayoutBlockFlow {OPTION} at (1,154) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 10"
+    LayoutBlockFlow {OPTION} at (1,171) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 43x16
+        text run at (2,0) width 43: "Item 11"
+    LayoutBlockFlow {OPTION} at (1,188) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 12"
+    LayoutBlockFlow {OPTION} at (1,205) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 13"
+    LayoutBlockFlow {OPTION} at (1,222) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 14"
+    LayoutBlockFlow {OPTION} at (1,239) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 15"
+    LayoutBlockFlow {OPTION} at (1,256) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 16"
+    LayoutBlockFlow {OPTION} at (1,273) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 17"
+    LayoutBlockFlow {OPTION} at (1,290) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 18"
+    LayoutBlockFlow {OPTION} at (1,307) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 19"
+    LayoutBlockFlow {OPTION} at (1,324) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 20"
+    LayoutBlockFlow {OPTION} at (1,341) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 21"
+    LayoutBlockFlow {OPTION} at (1,358) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 22"
+    LayoutBlockFlow {OPTION} at (1,375) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 23"
+    LayoutBlockFlow {OPTION} at (1,392) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 24"
+    LayoutBlockFlow {OPTION} at (1,409) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 25"
+    LayoutBlockFlow {OPTION} at (1,426) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 26"
+    LayoutBlockFlow {OPTION} at (1,443) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 27"
+    LayoutBlockFlow {OPTION} at (1,460) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 28"
+    LayoutBlockFlow {OPTION} at (1,477) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 29"
+    LayoutBlockFlow {OPTION} at (1,494) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 30"
+    LayoutBlockFlow {OPTION} at (1,511) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 31"
+    LayoutBlockFlow {OPTION} at (1,528) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 32"
+    LayoutBlockFlow {OPTION} at (1,545) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 33"
+    LayoutBlockFlow {OPTION} at (1,562) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 34"
+    LayoutBlockFlow {OPTION} at (1,579) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 35"
+    LayoutBlockFlow {OPTION} at (1,596) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 36"
+    LayoutBlockFlow {OPTION} at (1,613) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 37"
+    LayoutBlockFlow {OPTION} at (1,630) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 38"
+    LayoutBlockFlow {OPTION} at (1,647) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 39"
+    LayoutBlockFlow {OPTION} at (1,664) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 40"
+    LayoutBlockFlow {OPTION} at (1,681) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 41"
+    LayoutBlockFlow {OPTION} at (1,698) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 42"
+    LayoutBlockFlow {OPTION} at (1,715) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 43"
+    LayoutBlockFlow {OPTION} at (1,732) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 44"
+    LayoutBlockFlow {OPTION} at (1,749) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 45"
+    LayoutBlockFlow {OPTION} at (1,766) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 46"
+    LayoutBlockFlow {OPTION} at (1,783) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 47"
+    LayoutBlockFlow {OPTION} at (1,800) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 48"
+    LayoutBlockFlow {OPTION} at (1,817) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 49"
+    LayoutBlockFlow {OPTION} at (1,834) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 50"
+    LayoutBlockFlow {OPTION} at (1,851) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 51"
+    LayoutBlockFlow {OPTION} at (1,868) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 52"
+    LayoutBlockFlow {OPTION} at (1,885) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 53"
+    LayoutBlockFlow {OPTION} at (1,902) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 54"
+    LayoutBlockFlow {OPTION} at (1,919) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 55"
+    LayoutBlockFlow {OPTION} at (1,936) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 56"
+    LayoutBlockFlow {OPTION} at (1,953) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 57"
+    LayoutBlockFlow {OPTION} at (1,970) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 58"
+    LayoutBlockFlow {OPTION} at (1,987) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 59"
+    LayoutBlockFlow {OPTION} at (1,1004) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 60"
+    LayoutBlockFlow {OPTION} at (1,1021) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 61"
+    LayoutBlockFlow {OPTION} at (1,1038) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 62"
+    LayoutBlockFlow {OPTION} at (1,1055) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 63"
+    LayoutBlockFlow {OPTION} at (1,1072) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 64"
+    LayoutBlockFlow {OPTION} at (1,1089) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 65"
+    LayoutBlockFlow {OPTION} at (1,1106) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 66"
+    LayoutBlockFlow {OPTION} at (1,1123) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 67"
+    LayoutBlockFlow {OPTION} at (1,1140) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 68"
+    LayoutBlockFlow {OPTION} at (1,1157) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 69"
+    LayoutBlockFlow {OPTION} at (1,1174) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 70"
+    LayoutBlockFlow {OPTION} at (1,1191) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 71"
+    LayoutBlockFlow {OPTION} at (1,1208) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 72"
+    LayoutBlockFlow {OPTION} at (1,1225) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 73"
+    LayoutBlockFlow {OPTION} at (1,1242) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 74"
+    LayoutBlockFlow {OPTION} at (1,1259) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 75"
+    LayoutBlockFlow {OPTION} at (1,1276) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 76"
+    LayoutBlockFlow {OPTION} at (1,1293) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 77"
+    LayoutBlockFlow {OPTION} at (1,1310) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 78"
+    LayoutBlockFlow {OPTION} at (1,1327) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 79"
+    LayoutBlockFlow {OPTION} at (1,1344) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 80"
+    LayoutBlockFlow {OPTION} at (1,1361) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 81"
+    LayoutBlockFlow {OPTION} at (1,1378) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 82"
+    LayoutBlockFlow {OPTION} at (1,1395) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 83"
+    LayoutBlockFlow {OPTION} at (1,1412) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 84"
+    LayoutBlockFlow {OPTION} at (1,1429) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 85"
+    LayoutBlockFlow {OPTION} at (1,1446) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 86"
+    LayoutBlockFlow {OPTION} at (1,1463) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 87"
+    LayoutBlockFlow {OPTION} at (1,1480) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 88"
+    LayoutBlockFlow {OPTION} at (1,1497) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 89"
+    LayoutBlockFlow {OPTION} at (1,1514) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 90"
+    LayoutBlockFlow {OPTION} at (1,1531) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 91"
+    LayoutBlockFlow {OPTION} at (1,1548) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 92"
+    LayoutBlockFlow {OPTION} at (1,1565) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 93"
+    LayoutBlockFlow {OPTION} at (1,1582) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 94"
+    LayoutBlockFlow {OPTION} at (1,1599) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 95"
+    LayoutBlockFlow {OPTION} at (1,1616) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 96"
+    LayoutBlockFlow {OPTION} at (1,1633) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 97"
+    LayoutBlockFlow {OPTION} at (1,1650) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 98"
+    LayoutBlockFlow {OPTION} at (1,1667) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 44x16
+        text run at (2,0) width 44: "Item 99"
+    LayoutBlockFlow {OPTION} at (1,1684) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 100"
+    LayoutBlockFlow {OPTION} at (1,1701) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 101"
+    LayoutBlockFlow {OPTION} at (1,1718) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 102"
+    LayoutBlockFlow {OPTION} at (1,1735) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 103"
+    LayoutBlockFlow {OPTION} at (1,1752) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 104"
+    LayoutBlockFlow {OPTION} at (1,1769) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 105"
+    LayoutBlockFlow {OPTION} at (1,1786) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 106"
+    LayoutBlockFlow {OPTION} at (1,1803) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 107"
+    LayoutBlockFlow {OPTION} at (1,1820) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 108"
+    LayoutBlockFlow {OPTION} at (1,1837) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 109"
+    LayoutBlockFlow {OPTION} at (1,1854) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 110"
+    LayoutBlockFlow {OPTION} at (1,1871) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 111"
+    LayoutBlockFlow {OPTION} at (1,1888) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 112"
+    LayoutBlockFlow {OPTION} at (1,1905) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 113"
+    LayoutBlockFlow {OPTION} at (1,1922) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 114"
+    LayoutBlockFlow {OPTION} at (1,1939) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 115"
+    LayoutBlockFlow {OPTION} at (1,1956) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 116"
+    LayoutBlockFlow {OPTION} at (1,1973) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 117"
+    LayoutBlockFlow {OPTION} at (1,1990) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 118"
+    LayoutBlockFlow {OPTION} at (1,2007) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 119"
+    LayoutBlockFlow {OPTION} at (1,2024) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 120"
+    LayoutBlockFlow {OPTION} at (1,2041) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 121"
+    LayoutBlockFlow {OPTION} at (1,2058) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 122"
+    LayoutBlockFlow {OPTION} at (1,2075) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 123"
+    LayoutBlockFlow {OPTION} at (1,2092) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 124"
+    LayoutBlockFlow {OPTION} at (1,2109) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 125"
+    LayoutBlockFlow {OPTION} at (1,2126) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 126"
+    LayoutBlockFlow {OPTION} at (1,2143) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 127"
+    LayoutBlockFlow {OPTION} at (1,2160) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 128"
+    LayoutBlockFlow {OPTION} at (1,2177) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 129"
+    LayoutBlockFlow {OPTION} at (1,2194) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 130"
+    LayoutBlockFlow {OPTION} at (1,2211) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 131"
+    LayoutBlockFlow {OPTION} at (1,2228) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 132"
+    LayoutBlockFlow {OPTION} at (1,2245) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 133"
+    LayoutBlockFlow {OPTION} at (1,2262) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 134"
+    LayoutBlockFlow {OPTION} at (1,2279) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 135"
+    LayoutBlockFlow {OPTION} at (1,2296) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 136"
+    LayoutBlockFlow {OPTION} at (1,2313) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 137"
+    LayoutBlockFlow {OPTION} at (1,2330) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 138"
+    LayoutBlockFlow {OPTION} at (1,2347) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 139"
+    LayoutBlockFlow {OPTION} at (1,2364) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 140"
+    LayoutBlockFlow {OPTION} at (1,2381) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 141"
+    LayoutBlockFlow {OPTION} at (1,2398) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 142"
+    LayoutBlockFlow {OPTION} at (1,2415) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 143"
+    LayoutBlockFlow {OPTION} at (1,2432) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 144"
+    LayoutBlockFlow {OPTION} at (1,2449) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 145"
+    LayoutBlockFlow {OPTION} at (1,2466) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 146"
+    LayoutBlockFlow {OPTION} at (1,2483) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 147"
+    LayoutBlockFlow {OPTION} at (1,2500) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 148"
+    LayoutBlockFlow {OPTION} at (1,2517) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 149"
+    LayoutBlockFlow {OPTION} at (1,2534) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 150"
+    LayoutBlockFlow {OPTION} at (1,2551) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 151"
+    LayoutBlockFlow {OPTION} at (1,2568) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 152"
+    LayoutBlockFlow {OPTION} at (1,2585) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 153"
+    LayoutBlockFlow {OPTION} at (1,2602) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 154"
+    LayoutBlockFlow {OPTION} at (1,2619) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 155"
+    LayoutBlockFlow {OPTION} at (1,2636) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 156"
+    LayoutBlockFlow {OPTION} at (1,2653) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 157"
+    LayoutBlockFlow {OPTION} at (1,2670) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 158"
+    LayoutBlockFlow {OPTION} at (1,2687) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 159"
+    LayoutBlockFlow {OPTION} at (1,2704) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 160"
+    LayoutBlockFlow {OPTION} at (1,2721) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 161"
+    LayoutBlockFlow {OPTION} at (1,2738) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 162"
+    LayoutBlockFlow {OPTION} at (1,2755) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 163"
+    LayoutBlockFlow {OPTION} at (1,2772) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 164"
+    LayoutBlockFlow {OPTION} at (1,2789) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 165"
+    LayoutBlockFlow {OPTION} at (1,2806) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 166"
+    LayoutBlockFlow {OPTION} at (1,2823) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 167"
+    LayoutBlockFlow {OPTION} at (1,2840) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 168"
+    LayoutBlockFlow {OPTION} at (1,2857) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 169"
+    LayoutBlockFlow {OPTION} at (1,2874) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 170"
+    LayoutBlockFlow {OPTION} at (1,2891) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 171"
+    LayoutBlockFlow {OPTION} at (1,2908) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 172"
+    LayoutBlockFlow {OPTION} at (1,2925) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 173"
+    LayoutBlockFlow {OPTION} at (1,2942) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 174"
+    LayoutBlockFlow {OPTION} at (1,2959) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 175"
+    LayoutBlockFlow {OPTION} at (1,2976) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 176"
+    LayoutBlockFlow {OPTION} at (1,2993) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 177"
+    LayoutBlockFlow {OPTION} at (1,3010) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 178"
+    LayoutBlockFlow {OPTION} at (1,3027) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 179"
+    LayoutBlockFlow {OPTION} at (1,3044) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 180"
+    LayoutBlockFlow {OPTION} at (1,3061) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 181"
+    LayoutBlockFlow {OPTION} at (1,3078) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 182"
+    LayoutBlockFlow {OPTION} at (1,3095) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 183"
+    LayoutBlockFlow {OPTION} at (1,3112) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 184"
+    LayoutBlockFlow {OPTION} at (1,3129) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 185"
+    LayoutBlockFlow {OPTION} at (1,3146) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 186"
+    LayoutBlockFlow {OPTION} at (1,3163) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 187"
+    LayoutBlockFlow {OPTION} at (1,3180) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 188"
+    LayoutBlockFlow {OPTION} at (1,3197) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 189"
+    LayoutBlockFlow {OPTION} at (1,3214) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 190"
+    LayoutBlockFlow {OPTION} at (1,3231) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 191"
+    LayoutBlockFlow {OPTION} at (1,3248) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 192"
+    LayoutBlockFlow {OPTION} at (1,3265) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 193"
+    LayoutBlockFlow {OPTION} at (1,3282) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 194"
+    LayoutBlockFlow {OPTION} at (1,3299) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 195"
+    LayoutBlockFlow {OPTION} at (1,3316) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 196"
+    LayoutBlockFlow {OPTION} at (1,3333) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 197"
+    LayoutBlockFlow {OPTION} at (1,3350) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 198"
+    LayoutBlockFlow {OPTION} at (1,3367) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 199"
+    LayoutBlockFlow {OPTION} at (1,3384) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 200"
+    LayoutBlockFlow {OPTION} at (1,3401) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 201"
+    LayoutBlockFlow {OPTION} at (1,3418) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 202"
+    LayoutBlockFlow {OPTION} at (1,3435) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 203"
+    LayoutBlockFlow {OPTION} at (1,3452) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 204"
+    LayoutBlockFlow {OPTION} at (1,3469) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 205"
+    LayoutBlockFlow {OPTION} at (1,3486) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 206"
+    LayoutBlockFlow {OPTION} at (1,3503) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 207"
+    LayoutBlockFlow {OPTION} at (1,3520) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 208"
+    LayoutBlockFlow {OPTION} at (1,3537) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 209"
+    LayoutBlockFlow {OPTION} at (1,3554) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 210"
+    LayoutBlockFlow {OPTION} at (1,3571) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 211"
+    LayoutBlockFlow {OPTION} at (1,3588) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 212"
+    LayoutBlockFlow {OPTION} at (1,3605) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 213"
+    LayoutBlockFlow {OPTION} at (1,3622) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 214"
+    LayoutBlockFlow {OPTION} at (1,3639) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 215"
+    LayoutBlockFlow {OPTION} at (1,3656) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 216"
+    LayoutBlockFlow {OPTION} at (1,3673) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 217"
+    LayoutBlockFlow {OPTION} at (1,3690) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 218"
+    LayoutBlockFlow {OPTION} at (1,3707) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 219"
+    LayoutBlockFlow {OPTION} at (1,3724) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 220"
+    LayoutBlockFlow {OPTION} at (1,3741) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 221"
+    LayoutBlockFlow {OPTION} at (1,3758) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 222"
+    LayoutBlockFlow {OPTION} at (1,3775) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 223"
+    LayoutBlockFlow {OPTION} at (1,3792) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 224"
+    LayoutBlockFlow {OPTION} at (1,3809) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 225"
+    LayoutBlockFlow {OPTION} at (1,3826) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 226"
+    LayoutBlockFlow {OPTION} at (1,3843) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 227"
+    LayoutBlockFlow {OPTION} at (1,3860) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 228"
+    LayoutBlockFlow {OPTION} at (1,3877) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 229"
+    LayoutBlockFlow {OPTION} at (1,3894) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 230"
+    LayoutBlockFlow {OPTION} at (1,3911) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 231"
+    LayoutBlockFlow {OPTION} at (1,3928) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 232"
+    LayoutBlockFlow {OPTION} at (1,3945) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 233"
+    LayoutBlockFlow {OPTION} at (1,3962) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 234"
+    LayoutBlockFlow {OPTION} at (1,3979) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 235"
+    LayoutBlockFlow {OPTION} at (1,3996) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 236"
+    LayoutBlockFlow {OPTION} at (1,4013) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 237"
+    LayoutBlockFlow {OPTION} at (1,4030) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 238"
+    LayoutBlockFlow {OPTION} at (1,4047) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 239"
+    LayoutBlockFlow {OPTION} at (1,4064) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 240"
+    LayoutBlockFlow {OPTION} at (1,4081) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 241"
+    LayoutBlockFlow {OPTION} at (1,4098) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 242"
+    LayoutBlockFlow {OPTION} at (1,4115) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 243"
+    LayoutBlockFlow {OPTION} at (1,4132) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 244"
+    LayoutBlockFlow {OPTION} at (1,4149) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 245"
+    LayoutBlockFlow {OPTION} at (1,4166) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 246"
+    LayoutBlockFlow {OPTION} at (1,4183) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 247"
+    LayoutBlockFlow {OPTION} at (1,4200) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 248"
+    LayoutBlockFlow {OPTION} at (1,4217) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 249"
+    LayoutBlockFlow {OPTION} at (1,4234) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 250"
+    LayoutBlockFlow {OPTION} at (1,4251) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 251"
+    LayoutBlockFlow {OPTION} at (1,4268) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 252"
+    LayoutBlockFlow {OPTION} at (1,4285) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 253"
+    LayoutBlockFlow {OPTION} at (1,4302) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 254"
+    LayoutBlockFlow {OPTION} at (1,4319) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 255"
+    LayoutBlockFlow {OPTION} at (1,4336) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 256"
+    LayoutBlockFlow {OPTION} at (1,4353) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 257"
+    LayoutBlockFlow {OPTION} at (1,4370) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 258"
+    LayoutBlockFlow {OPTION} at (1,4387) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 259"
+    LayoutBlockFlow {OPTION} at (1,4404) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 260"
+    LayoutBlockFlow {OPTION} at (1,4421) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 261"
+    LayoutBlockFlow {OPTION} at (1,4438) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 262"
+    LayoutBlockFlow {OPTION} at (1,4455) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 263"
+    LayoutBlockFlow {OPTION} at (1,4472) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 264"
+    LayoutBlockFlow {OPTION} at (1,4489) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 265"
+    LayoutBlockFlow {OPTION} at (1,4506) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 266"
+    LayoutBlockFlow {OPTION} at (1,4523) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 267"
+    LayoutBlockFlow {OPTION} at (1,4540) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 268"
+    LayoutBlockFlow {OPTION} at (1,4557) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 269"
+    LayoutBlockFlow {OPTION} at (1,4574) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 270"
+    LayoutBlockFlow {OPTION} at (1,4591) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 271"
+    LayoutBlockFlow {OPTION} at (1,4608) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 272"
+    LayoutBlockFlow {OPTION} at (1,4625) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 273"
+    LayoutBlockFlow {OPTION} at (1,4642) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 274"
+    LayoutBlockFlow {OPTION} at (1,4659) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 275"
+    LayoutBlockFlow {OPTION} at (1,4676) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 276"
+    LayoutBlockFlow {OPTION} at (1,4693) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 277"
+    LayoutBlockFlow {OPTION} at (1,4710) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 278"
+    LayoutBlockFlow {OPTION} at (1,4727) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 279"
+    LayoutBlockFlow {OPTION} at (1,4744) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 280"
+    LayoutBlockFlow {OPTION} at (1,4761) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 281"
+    LayoutBlockFlow {OPTION} at (1,4778) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 282"
+    LayoutBlockFlow {OPTION} at (1,4795) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 283"
+    LayoutBlockFlow {OPTION} at (1,4812) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 284"
+    LayoutBlockFlow {OPTION} at (1,4829) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 285"
+    LayoutBlockFlow {OPTION} at (1,4846) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 286"
+    LayoutBlockFlow {OPTION} at (1,4863) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 287"
+    LayoutBlockFlow {OPTION} at (1,4880) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 288"
+    LayoutBlockFlow {OPTION} at (1,4897) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 289"
+    LayoutBlockFlow {OPTION} at (1,4914) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 290"
+    LayoutBlockFlow {OPTION} at (1,4931) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 291"
+    LayoutBlockFlow {OPTION} at (1,4948) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 292"
+    LayoutBlockFlow {OPTION} at (1,4965) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 293"
+    LayoutBlockFlow {OPTION} at (1,4982) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 294"
+    LayoutBlockFlow {OPTION} at (1,4999) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 295"
+    LayoutBlockFlow {OPTION} at (1,5016) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 296"
+    LayoutBlockFlow {OPTION} at (1,5033) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 297"
+    LayoutBlockFlow {OPTION} at (1,5050) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 298"
+    LayoutBlockFlow {OPTION} at (1,5067) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 299"
+    LayoutBlockFlow {OPTION} at (1,5084) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 300"
+    LayoutBlockFlow {OPTION} at (1,5101) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 301"
+    LayoutBlockFlow {OPTION} at (1,5118) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 302"
+    LayoutBlockFlow {OPTION} at (1,5135) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 303"
+    LayoutBlockFlow {OPTION} at (1,5152) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 304"
+    LayoutBlockFlow {OPTION} at (1,5169) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 305"
+    LayoutBlockFlow {OPTION} at (1,5186) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 306"
+    LayoutBlockFlow {OPTION} at (1,5203) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 307"
+    LayoutBlockFlow {OPTION} at (1,5220) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 308"
+    LayoutBlockFlow {OPTION} at (1,5237) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 309"
+    LayoutBlockFlow {OPTION} at (1,5254) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 310"
+    LayoutBlockFlow {OPTION} at (1,5271) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 311"
+    LayoutBlockFlow {OPTION} at (1,5288) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 312"
+    LayoutBlockFlow {OPTION} at (1,5305) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 313"
+    LayoutBlockFlow {OPTION} at (1,5322) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 314"
+    LayoutBlockFlow {OPTION} at (1,5339) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 315"
+    LayoutBlockFlow {OPTION} at (1,5356) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 316"
+    LayoutBlockFlow {OPTION} at (1,5373) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 317"
+    LayoutBlockFlow {OPTION} at (1,5390) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 318"
+    LayoutBlockFlow {OPTION} at (1,5407) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 319"
+    LayoutBlockFlow {OPTION} at (1,5424) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 320"
+    LayoutBlockFlow {OPTION} at (1,5441) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 321"
+    LayoutBlockFlow {OPTION} at (1,5458) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 322"
+    LayoutBlockFlow {OPTION} at (1,5475) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 323"
+    LayoutBlockFlow {OPTION} at (1,5492) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 324"
+    LayoutBlockFlow {OPTION} at (1,5509) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 325"
+    LayoutBlockFlow {OPTION} at (1,5526) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 326"
+    LayoutBlockFlow {OPTION} at (1,5543) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 327"
+    LayoutBlockFlow {OPTION} at (1,5560) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 328"
+    LayoutBlockFlow {OPTION} at (1,5577) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 329"
+    LayoutBlockFlow {OPTION} at (1,5594) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 330"
+    LayoutBlockFlow {OPTION} at (1,5611) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 331"
+    LayoutBlockFlow {OPTION} at (1,5628) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 332"
+    LayoutBlockFlow {OPTION} at (1,5645) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 333"
+    LayoutBlockFlow {OPTION} at (1,5662) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 334"
+    LayoutBlockFlow {OPTION} at (1,5679) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 335"
+    LayoutBlockFlow {OPTION} at (1,5696) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 336"
+    LayoutBlockFlow {OPTION} at (1,5713) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 337"
+    LayoutBlockFlow {OPTION} at (1,5730) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 338"
+    LayoutBlockFlow {OPTION} at (1,5747) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 339"
+    LayoutBlockFlow {OPTION} at (1,5764) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 340"
+    LayoutBlockFlow {OPTION} at (1,5781) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 341"
+    LayoutBlockFlow {OPTION} at (1,5798) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 342"
+    LayoutBlockFlow {OPTION} at (1,5815) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 343"
+    LayoutBlockFlow {OPTION} at (1,5832) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 344"
+    LayoutBlockFlow {OPTION} at (1,5849) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 345"
+    LayoutBlockFlow {OPTION} at (1,5866) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 346"
+    LayoutBlockFlow {OPTION} at (1,5883) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 347"
+    LayoutBlockFlow {OPTION} at (1,5900) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 348"
+    LayoutBlockFlow {OPTION} at (1,5917) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 349"
+    LayoutBlockFlow {OPTION} at (1,5934) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 350"
+    LayoutBlockFlow {OPTION} at (1,5951) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 351"
+    LayoutBlockFlow {OPTION} at (1,5968) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 352"
+    LayoutBlockFlow {OPTION} at (1,5985) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 353"
+    LayoutBlockFlow {OPTION} at (1,6002) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 354"
+    LayoutBlockFlow {OPTION} at (1,6019) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 355"
+    LayoutBlockFlow {OPTION} at (1,6036) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 356"
+    LayoutBlockFlow {OPTION} at (1,6053) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 357"
+    LayoutBlockFlow {OPTION} at (1,6070) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 358"
+    LayoutBlockFlow {OPTION} at (1,6087) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 359"
+    LayoutBlockFlow {OPTION} at (1,6104) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 360"
+    LayoutBlockFlow {OPTION} at (1,6121) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 361"
+    LayoutBlockFlow {OPTION} at (1,6138) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 362"
+    LayoutBlockFlow {OPTION} at (1,6155) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 363"
+    LayoutBlockFlow {OPTION} at (1,6172) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 364"
+    LayoutBlockFlow {OPTION} at (1,6189) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 365"
+    LayoutBlockFlow {OPTION} at (1,6206) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 366"
+    LayoutBlockFlow {OPTION} at (1,6223) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 367"
+    LayoutBlockFlow {OPTION} at (1,6240) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 368"
+    LayoutBlockFlow {OPTION} at (1,6257) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 369"
+    LayoutBlockFlow {OPTION} at (1,6274) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 370"
+    LayoutBlockFlow {OPTION} at (1,6291) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 371"
+    LayoutBlockFlow {OPTION} at (1,6308) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 372"
+    LayoutBlockFlow {OPTION} at (1,6325) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 373"
+    LayoutBlockFlow {OPTION} at (1,6342) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 374"
+    LayoutBlockFlow {OPTION} at (1,6359) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 375"
+    LayoutBlockFlow {OPTION} at (1,6376) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 376"
+    LayoutBlockFlow {OPTION} at (1,6393) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 377"
+    LayoutBlockFlow {OPTION} at (1,6410) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 378"
+    LayoutBlockFlow {OPTION} at (1,6427) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 379"
+    LayoutBlockFlow {OPTION} at (1,6444) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 380"
+    LayoutBlockFlow {OPTION} at (1,6461) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 381"
+    LayoutBlockFlow {OPTION} at (1,6478) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 382"
+    LayoutBlockFlow {OPTION} at (1,6495) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 383"
+    LayoutBlockFlow {OPTION} at (1,6512) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 384"
+    LayoutBlockFlow {OPTION} at (1,6529) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 385"
+    LayoutBlockFlow {OPTION} at (1,6546) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 386"
+    LayoutBlockFlow {OPTION} at (1,6563) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 387"
+    LayoutBlockFlow {OPTION} at (1,6580) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 388"
+    LayoutBlockFlow {OPTION} at (1,6597) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 389"
+    LayoutBlockFlow {OPTION} at (1,6614) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 390"
+    LayoutBlockFlow {OPTION} at (1,6631) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 391"
+    LayoutBlockFlow {OPTION} at (1,6648) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 392"
+    LayoutBlockFlow {OPTION} at (1,6665) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 393"
+    LayoutBlockFlow {OPTION} at (1,6682) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 394"
+    LayoutBlockFlow {OPTION} at (1,6699) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 395"
+    LayoutBlockFlow {OPTION} at (1,6716) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 396"
+    LayoutBlockFlow {OPTION} at (1,6733) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 397"
+    LayoutBlockFlow {OPTION} at (1,6750) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 398"
+    LayoutBlockFlow {OPTION} at (1,6767) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 399"
+    LayoutBlockFlow {OPTION} at (1,6784) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 400"
+    LayoutBlockFlow {OPTION} at (1,6801) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 401"
+    LayoutBlockFlow {OPTION} at (1,6818) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 402"
+    LayoutBlockFlow {OPTION} at (1,6835) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 403"
+    LayoutBlockFlow {OPTION} at (1,6852) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 404"
+    LayoutBlockFlow {OPTION} at (1,6869) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 405"
+    LayoutBlockFlow {OPTION} at (1,6886) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 406"
+    LayoutBlockFlow {OPTION} at (1,6903) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 407"
+    LayoutBlockFlow {OPTION} at (1,6920) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 408"
+    LayoutBlockFlow {OPTION} at (1,6937) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 409"
+    LayoutBlockFlow {OPTION} at (1,6954) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 410"
+    LayoutBlockFlow {OPTION} at (1,6971) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 411"
+    LayoutBlockFlow {OPTION} at (1,6988) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 412"
+    LayoutBlockFlow {OPTION} at (1,7005) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 413"
+    LayoutBlockFlow {OPTION} at (1,7022) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 414"
+    LayoutBlockFlow {OPTION} at (1,7039) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 415"
+    LayoutBlockFlow {OPTION} at (1,7056) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 416"
+    LayoutBlockFlow {OPTION} at (1,7073) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 417"
+    LayoutBlockFlow {OPTION} at (1,7090) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 418"
+    LayoutBlockFlow {OPTION} at (1,7107) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 419"
+    LayoutBlockFlow {OPTION} at (1,7124) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 420"
+    LayoutBlockFlow {OPTION} at (1,7141) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 421"
+    LayoutBlockFlow {OPTION} at (1,7158) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 422"
+    LayoutBlockFlow {OPTION} at (1,7175) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 423"
+    LayoutBlockFlow {OPTION} at (1,7192) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 424"
+    LayoutBlockFlow {OPTION} at (1,7209) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 425"
+    LayoutBlockFlow {OPTION} at (1,7226) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 426"
+    LayoutBlockFlow {OPTION} at (1,7243) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 427"
+    LayoutBlockFlow {OPTION} at (1,7260) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 428"
+    LayoutBlockFlow {OPTION} at (1,7277) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 429"
+    LayoutBlockFlow {OPTION} at (1,7294) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 430"
+    LayoutBlockFlow {OPTION} at (1,7311) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 431"
+    LayoutBlockFlow {OPTION} at (1,7328) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 432"
+    LayoutBlockFlow {OPTION} at (1,7345) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 433"
+    LayoutBlockFlow {OPTION} at (1,7362) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 434"
+    LayoutBlockFlow {OPTION} at (1,7379) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 435"
+    LayoutBlockFlow {OPTION} at (1,7396) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 436"
+    LayoutBlockFlow {OPTION} at (1,7413) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 437"
+    LayoutBlockFlow {OPTION} at (1,7430) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 438"
+    LayoutBlockFlow {OPTION} at (1,7447) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 439"
+    LayoutBlockFlow {OPTION} at (1,7464) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 440"
+    LayoutBlockFlow {OPTION} at (1,7481) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 441"
+    LayoutBlockFlow {OPTION} at (1,7498) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 442"
+    LayoutBlockFlow {OPTION} at (1,7515) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 443"
+    LayoutBlockFlow {OPTION} at (1,7532) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 444"
+    LayoutBlockFlow {OPTION} at (1,7549) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 445"
+    LayoutBlockFlow {OPTION} at (1,7566) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 446"
+    LayoutBlockFlow {OPTION} at (1,7583) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 447"
+    LayoutBlockFlow {OPTION} at (1,7600) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 448"
+    LayoutBlockFlow {OPTION} at (1,7617) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 449"
+    LayoutBlockFlow {OPTION} at (1,7634) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 450"
+    LayoutBlockFlow {OPTION} at (1,7651) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 451"
+    LayoutBlockFlow {OPTION} at (1,7668) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 452"
+    LayoutBlockFlow {OPTION} at (1,7685) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 453"
+    LayoutBlockFlow {OPTION} at (1,7702) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 454"
+    LayoutBlockFlow {OPTION} at (1,7719) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 455"
+    LayoutBlockFlow {OPTION} at (1,7736) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 456"
+    LayoutBlockFlow {OPTION} at (1,7753) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 457"
+    LayoutBlockFlow {OPTION} at (1,7770) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 458"
+    LayoutBlockFlow {OPTION} at (1,7787) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 459"
+    LayoutBlockFlow {OPTION} at (1,7804) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 460"
+    LayoutBlockFlow {OPTION} at (1,7821) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 461"
+    LayoutBlockFlow {OPTION} at (1,7838) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 462"
+    LayoutBlockFlow {OPTION} at (1,7855) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 463"
+    LayoutBlockFlow {OPTION} at (1,7872) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 464"
+    LayoutBlockFlow {OPTION} at (1,7889) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 465"
+    LayoutBlockFlow {OPTION} at (1,7906) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 466"
+    LayoutBlockFlow {OPTION} at (1,7923) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 467"
+    LayoutBlockFlow {OPTION} at (1,7940) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 468"
+    LayoutBlockFlow {OPTION} at (1,7957) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 469"
+    LayoutBlockFlow {OPTION} at (1,7974) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 470"
+    LayoutBlockFlow {OPTION} at (1,7991) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 471"
+    LayoutBlockFlow {OPTION} at (1,8008) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 472"
+    LayoutBlockFlow {OPTION} at (1,8025) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 473"
+    LayoutBlockFlow {OPTION} at (1,8042) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 474"
+    LayoutBlockFlow {OPTION} at (1,8059) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 475"
+    LayoutBlockFlow {OPTION} at (1,8076) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 476"
+    LayoutBlockFlow {OPTION} at (1,8093) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 477"
+    LayoutBlockFlow {OPTION} at (1,8110) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 478"
+    LayoutBlockFlow {OPTION} at (1,8127) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 479"
+    LayoutBlockFlow {OPTION} at (1,8144) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 480"
+    LayoutBlockFlow {OPTION} at (1,8161) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 481"
+    LayoutBlockFlow {OPTION} at (1,8178) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 482"
+    LayoutBlockFlow {OPTION} at (1,8195) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 483"
+    LayoutBlockFlow {OPTION} at (1,8212) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 484"
+    LayoutBlockFlow {OPTION} at (1,8229) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 485"
+    LayoutBlockFlow {OPTION} at (1,8246) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 486"
+    LayoutBlockFlow {OPTION} at (1,8263) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 487"
+    LayoutBlockFlow {OPTION} at (1,8280) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 488"
+    LayoutBlockFlow {OPTION} at (1,8297) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 489"
+    LayoutBlockFlow {OPTION} at (1,8314) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 490"
+    LayoutBlockFlow {OPTION} at (1,8331) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 491"
+    LayoutBlockFlow {OPTION} at (1,8348) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 492"
+    LayoutBlockFlow {OPTION} at (1,8365) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 493"
+    LayoutBlockFlow {OPTION} at (1,8382) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 494"
+    LayoutBlockFlow {OPTION} at (1,8399) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 495"
+    LayoutBlockFlow {OPTION} at (1,8416) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 496"
+    LayoutBlockFlow {OPTION} at (1,8433) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 497"
+    LayoutBlockFlow {OPTION} at (1,8450) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 498"
+    LayoutBlockFlow {OPTION} at (1,8467) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 499"
+    LayoutBlockFlow {OPTION} at (1,8484) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 500"
+    LayoutBlockFlow {OPTION} at (1,8501) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 501"
+    LayoutBlockFlow {OPTION} at (1,8518) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 502"
+    LayoutBlockFlow {OPTION} at (1,8535) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 503"
+    LayoutBlockFlow {OPTION} at (1,8552) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 504"
+    LayoutBlockFlow {OPTION} at (1,8569) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 505"
+    LayoutBlockFlow {OPTION} at (1,8586) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 506"
+    LayoutBlockFlow {OPTION} at (1,8603) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 507"
+    LayoutBlockFlow {OPTION} at (1,8620) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 508"
+    LayoutBlockFlow {OPTION} at (1,8637) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 509"
+    LayoutBlockFlow {OPTION} at (1,8654) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 510"
+    LayoutBlockFlow {OPTION} at (1,8671) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 511"
+    LayoutBlockFlow {OPTION} at (1,8688) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 512"
+    LayoutBlockFlow {OPTION} at (1,8705) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 513"
+    LayoutBlockFlow {OPTION} at (1,8722) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 514"
+    LayoutBlockFlow {OPTION} at (1,8739) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 515"
+    LayoutBlockFlow {OPTION} at (1,8756) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 516"
+    LayoutBlockFlow {OPTION} at (1,8773) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 517"
+    LayoutBlockFlow {OPTION} at (1,8790) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 518"
+    LayoutBlockFlow {OPTION} at (1,8807) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 519"
+    LayoutBlockFlow {OPTION} at (1,8824) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 520"
+    LayoutBlockFlow {OPTION} at (1,8841) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 521"
+    LayoutBlockFlow {OPTION} at (1,8858) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 522"
+    LayoutBlockFlow {OPTION} at (1,8875) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 523"
+    LayoutBlockFlow {OPTION} at (1,8892) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 524"
+    LayoutBlockFlow {OPTION} at (1,8909) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 525"
+    LayoutBlockFlow {OPTION} at (1,8926) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 526"
+    LayoutBlockFlow {OPTION} at (1,8943) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 527"
+    LayoutBlockFlow {OPTION} at (1,8960) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 528"
+    LayoutBlockFlow {OPTION} at (1,8977) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 529"
+    LayoutBlockFlow {OPTION} at (1,8994) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 530"
+    LayoutBlockFlow {OPTION} at (1,9011) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 531"
+    LayoutBlockFlow {OPTION} at (1,9028) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 532"
+    LayoutBlockFlow {OPTION} at (1,9045) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 533"
+    LayoutBlockFlow {OPTION} at (1,9062) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 534"
+    LayoutBlockFlow {OPTION} at (1,9079) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 535"
+    LayoutBlockFlow {OPTION} at (1,9096) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 536"
+    LayoutBlockFlow {OPTION} at (1,9113) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 537"
+    LayoutBlockFlow {OPTION} at (1,9130) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 538"
+    LayoutBlockFlow {OPTION} at (1,9147) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 539"
+    LayoutBlockFlow {OPTION} at (1,9164) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 540"
+    LayoutBlockFlow {OPTION} at (1,9181) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 541"
+    LayoutBlockFlow {OPTION} at (1,9198) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 542"
+    LayoutBlockFlow {OPTION} at (1,9215) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 543"
+    LayoutBlockFlow {OPTION} at (1,9232) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 544"
+    LayoutBlockFlow {OPTION} at (1,9249) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 545"
+    LayoutBlockFlow {OPTION} at (1,9266) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 546"
+    LayoutBlockFlow {OPTION} at (1,9283) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 547"
+    LayoutBlockFlow {OPTION} at (1,9300) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 548"
+    LayoutBlockFlow {OPTION} at (1,9317) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 549"
+    LayoutBlockFlow {OPTION} at (1,9334) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 550"
+    LayoutBlockFlow {OPTION} at (1,9351) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 551"
+    LayoutBlockFlow {OPTION} at (1,9368) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 552"
+    LayoutBlockFlow {OPTION} at (1,9385) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 553"
+    LayoutBlockFlow {OPTION} at (1,9402) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 554"
+    LayoutBlockFlow {OPTION} at (1,9419) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 555"
+    LayoutBlockFlow {OPTION} at (1,9436) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 556"
+    LayoutBlockFlow {OPTION} at (1,9453) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 557"
+    LayoutBlockFlow {OPTION} at (1,9470) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 558"
+    LayoutBlockFlow {OPTION} at (1,9487) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 559"
+    LayoutBlockFlow {OPTION} at (1,9504) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 560"
+    LayoutBlockFlow {OPTION} at (1,9521) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 561"
+    LayoutBlockFlow {OPTION} at (1,9538) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 562"
+    LayoutBlockFlow {OPTION} at (1,9555) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 563"
+    LayoutBlockFlow {OPTION} at (1,9572) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 564"
+    LayoutBlockFlow {OPTION} at (1,9589) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 565"
+    LayoutBlockFlow {OPTION} at (1,9606) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 566"
+    LayoutBlockFlow {OPTION} at (1,9623) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 567"
+    LayoutBlockFlow {OPTION} at (1,9640) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 568"
+    LayoutBlockFlow {OPTION} at (1,9657) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 569"
+    LayoutBlockFlow {OPTION} at (1,9674) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 570"
+    LayoutBlockFlow {OPTION} at (1,9691) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 571"
+    LayoutBlockFlow {OPTION} at (1,9708) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 572"
+    LayoutBlockFlow {OPTION} at (1,9725) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 573"
+    LayoutBlockFlow {OPTION} at (1,9742) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 574"
+    LayoutBlockFlow {OPTION} at (1,9759) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 575"
+    LayoutBlockFlow {OPTION} at (1,9776) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 576"
+    LayoutBlockFlow {OPTION} at (1,9793) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 577"
+    LayoutBlockFlow {OPTION} at (1,9810) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 578"
+    LayoutBlockFlow {OPTION} at (1,9827) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 579"
+    LayoutBlockFlow {OPTION} at (1,9844) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 580"
+    LayoutBlockFlow {OPTION} at (1,9861) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 581"
+    LayoutBlockFlow {OPTION} at (1,9878) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 582"
+    LayoutBlockFlow {OPTION} at (1,9895) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 583"
+    LayoutBlockFlow {OPTION} at (1,9912) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 584"
+    LayoutBlockFlow {OPTION} at (1,9929) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 585"
+    LayoutBlockFlow {OPTION} at (1,9946) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 586"
+    LayoutBlockFlow {OPTION} at (1,9963) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 587"
+    LayoutBlockFlow {OPTION} at (1,9980) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 588"
+    LayoutBlockFlow {OPTION} at (1,9997) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 589"
+    LayoutBlockFlow {OPTION} at (1,10014) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 590"
+    LayoutBlockFlow {OPTION} at (1,10031) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 591"
+    LayoutBlockFlow {OPTION} at (1,10048) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 592"
+    LayoutBlockFlow {OPTION} at (1,10065) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 593"
+    LayoutBlockFlow {OPTION} at (1,10082) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 594"
+    LayoutBlockFlow {OPTION} at (1,10099) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 595"
+    LayoutBlockFlow {OPTION} at (1,10116) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 596"
+    LayoutBlockFlow {OPTION} at (1,10133) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 597"
+    LayoutBlockFlow {OPTION} at (1,10150) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 598"
+    LayoutBlockFlow {OPTION} at (1,10167) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 599"
+    LayoutBlockFlow {OPTION} at (1,10184) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 600"
+    LayoutBlockFlow {OPTION} at (1,10201) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 601"
+    LayoutBlockFlow {OPTION} at (1,10218) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 602"
+    LayoutBlockFlow {OPTION} at (1,10235) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 603"
+    LayoutBlockFlow {OPTION} at (1,10252) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 604"
+    LayoutBlockFlow {OPTION} at (1,10269) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 605"
+    LayoutBlockFlow {OPTION} at (1,10286) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 606"
+    LayoutBlockFlow {OPTION} at (1,10303) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 607"
+    LayoutBlockFlow {OPTION} at (1,10320) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 608"
+    LayoutBlockFlow {OPTION} at (1,10337) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 609"
+    LayoutBlockFlow {OPTION} at (1,10354) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 610"
+    LayoutBlockFlow {OPTION} at (1,10371) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 611"
+    LayoutBlockFlow {OPTION} at (1,10388) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 612"
+    LayoutBlockFlow {OPTION} at (1,10405) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 613"
+    LayoutBlockFlow {OPTION} at (1,10422) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 614"
+    LayoutBlockFlow {OPTION} at (1,10439) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 615"
+    LayoutBlockFlow {OPTION} at (1,10456) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 616"
+    LayoutBlockFlow {OPTION} at (1,10473) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 617"
+    LayoutBlockFlow {OPTION} at (1,10490) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 618"
+    LayoutBlockFlow {OPTION} at (1,10507) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 619"
+    LayoutBlockFlow {OPTION} at (1,10524) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 620"
+    LayoutBlockFlow {OPTION} at (1,10541) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 621"
+    LayoutBlockFlow {OPTION} at (1,10558) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 622"
+    LayoutBlockFlow {OPTION} at (1,10575) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 623"
+    LayoutBlockFlow {OPTION} at (1,10592) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 624"
+    LayoutBlockFlow {OPTION} at (1,10609) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 625"
+    LayoutBlockFlow {OPTION} at (1,10626) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 626"
+    LayoutBlockFlow {OPTION} at (1,10643) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 627"
+    LayoutBlockFlow {OPTION} at (1,10660) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 628"
+    LayoutBlockFlow {OPTION} at (1,10677) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 629"
+    LayoutBlockFlow {OPTION} at (1,10694) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 630"
+    LayoutBlockFlow {OPTION} at (1,10711) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 631"
+    LayoutBlockFlow {OPTION} at (1,10728) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 632"
+    LayoutBlockFlow {OPTION} at (1,10745) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 633"
+    LayoutBlockFlow {OPTION} at (1,10762) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 634"
+    LayoutBlockFlow {OPTION} at (1,10779) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 635"
+    LayoutBlockFlow {OPTION} at (1,10796) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 636"
+    LayoutBlockFlow {OPTION} at (1,10813) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 637"
+    LayoutBlockFlow {OPTION} at (1,10830) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 638"
+    LayoutBlockFlow {OPTION} at (1,10847) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 639"
+    LayoutBlockFlow {OPTION} at (1,10864) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 640"
+    LayoutBlockFlow {OPTION} at (1,10881) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 641"
+    LayoutBlockFlow {OPTION} at (1,10898) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 642"
+    LayoutBlockFlow {OPTION} at (1,10915) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 643"
+    LayoutBlockFlow {OPTION} at (1,10932) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 644"
+    LayoutBlockFlow {OPTION} at (1,10949) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 645"
+    LayoutBlockFlow {OPTION} at (1,10966) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 646"
+    LayoutBlockFlow {OPTION} at (1,10983) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 647"
+    LayoutBlockFlow {OPTION} at (1,11000) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 648"
+    LayoutBlockFlow {OPTION} at (1,11017) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 649"
+    LayoutBlockFlow {OPTION} at (1,11034) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 650"
+    LayoutBlockFlow {OPTION} at (1,11051) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 651"
+    LayoutBlockFlow {OPTION} at (1,11068) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 652"
+    LayoutBlockFlow {OPTION} at (1,11085) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 653"
+    LayoutBlockFlow {OPTION} at (1,11102) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 654"
+    LayoutBlockFlow {OPTION} at (1,11119) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 655"
+    LayoutBlockFlow {OPTION} at (1,11136) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 656"
+    LayoutBlockFlow {OPTION} at (1,11153) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 657"
+    LayoutBlockFlow {OPTION} at (1,11170) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 658"
+    LayoutBlockFlow {OPTION} at (1,11187) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 659"
+    LayoutBlockFlow {OPTION} at (1,11204) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 660"
+    LayoutBlockFlow {OPTION} at (1,11221) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 661"
+    LayoutBlockFlow {OPTION} at (1,11238) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 662"
+    LayoutBlockFlow {OPTION} at (1,11255) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 663"
+    LayoutBlockFlow {OPTION} at (1,11272) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 664"
+    LayoutBlockFlow {OPTION} at (1,11289) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 665"
+    LayoutBlockFlow {OPTION} at (1,11306) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 666"
+    LayoutBlockFlow {OPTION} at (1,11323) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 667"
+    LayoutBlockFlow {OPTION} at (1,11340) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 668"
+    LayoutBlockFlow {OPTION} at (1,11357) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 669"
+    LayoutBlockFlow {OPTION} at (1,11374) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 670"
+    LayoutBlockFlow {OPTION} at (1,11391) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 671"
+    LayoutBlockFlow {OPTION} at (1,11408) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 672"
+    LayoutBlockFlow {OPTION} at (1,11425) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 673"
+    LayoutBlockFlow {OPTION} at (1,11442) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 674"
+    LayoutBlockFlow {OPTION} at (1,11459) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 675"
+    LayoutBlockFlow {OPTION} at (1,11476) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 676"
+    LayoutBlockFlow {OPTION} at (1,11493) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 677"
+    LayoutBlockFlow {OPTION} at (1,11510) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 678"
+    LayoutBlockFlow {OPTION} at (1,11527) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 679"
+    LayoutBlockFlow {OPTION} at (1,11544) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 680"
+    LayoutBlockFlow {OPTION} at (1,11561) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 681"
+    LayoutBlockFlow {OPTION} at (1,11578) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 682"
+    LayoutBlockFlow {OPTION} at (1,11595) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 683"
+    LayoutBlockFlow {OPTION} at (1,11612) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 684"
+    LayoutBlockFlow {OPTION} at (1,11629) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 685"
+    LayoutBlockFlow {OPTION} at (1,11646) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 686"
+    LayoutBlockFlow {OPTION} at (1,11663) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 687"
+    LayoutBlockFlow {OPTION} at (1,11680) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 688"
+    LayoutBlockFlow {OPTION} at (1,11697) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 689"
+    LayoutBlockFlow {OPTION} at (1,11714) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 690"
+    LayoutBlockFlow {OPTION} at (1,11731) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 691"
+    LayoutBlockFlow {OPTION} at (1,11748) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 692"
+    LayoutBlockFlow {OPTION} at (1,11765) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 693"
+    LayoutBlockFlow {OPTION} at (1,11782) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 694"
+    LayoutBlockFlow {OPTION} at (1,11799) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 695"
+    LayoutBlockFlow {OPTION} at (1,11816) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 696"
+    LayoutBlockFlow {OPTION} at (1,11833) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 697"
+    LayoutBlockFlow {OPTION} at (1,11850) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 698"
+    LayoutBlockFlow {OPTION} at (1,11867) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 699"
+    LayoutBlockFlow {OPTION} at (1,11884) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 700"
+    LayoutBlockFlow {OPTION} at (1,11901) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 701"
+    LayoutBlockFlow {OPTION} at (1,11918) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 702"
+    LayoutBlockFlow {OPTION} at (1,11935) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 703"
+    LayoutBlockFlow {OPTION} at (1,11952) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 704"
+    LayoutBlockFlow {OPTION} at (1,11969) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 705"
+    LayoutBlockFlow {OPTION} at (1,11986) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 706"
+    LayoutBlockFlow {OPTION} at (1,12003) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 707"
+    LayoutBlockFlow {OPTION} at (1,12020) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 708"
+    LayoutBlockFlow {OPTION} at (1,12037) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 709"
+    LayoutBlockFlow {OPTION} at (1,12054) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 710"
+    LayoutBlockFlow {OPTION} at (1,12071) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 711"
+    LayoutBlockFlow {OPTION} at (1,12088) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 712"
+    LayoutBlockFlow {OPTION} at (1,12105) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 713"
+    LayoutBlockFlow {OPTION} at (1,12122) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 714"
+    LayoutBlockFlow {OPTION} at (1,12139) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 715"
+    LayoutBlockFlow {OPTION} at (1,12156) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 716"
+    LayoutBlockFlow {OPTION} at (1,12173) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 717"
+    LayoutBlockFlow {OPTION} at (1,12190) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 718"
+    LayoutBlockFlow {OPTION} at (1,12207) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 719"
+    LayoutBlockFlow {OPTION} at (1,12224) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 720"
+    LayoutBlockFlow {OPTION} at (1,12241) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 721"
+    LayoutBlockFlow {OPTION} at (1,12258) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 722"
+    LayoutBlockFlow {OPTION} at (1,12275) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 723"
+    LayoutBlockFlow {OPTION} at (1,12292) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 724"
+    LayoutBlockFlow {OPTION} at (1,12309) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 725"
+    LayoutBlockFlow {OPTION} at (1,12326) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 726"
+    LayoutBlockFlow {OPTION} at (1,12343) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 727"
+    LayoutBlockFlow {OPTION} at (1,12360) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 728"
+    LayoutBlockFlow {OPTION} at (1,12377) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 729"
+    LayoutBlockFlow {OPTION} at (1,12394) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 730"
+    LayoutBlockFlow {OPTION} at (1,12411) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 731"
+    LayoutBlockFlow {OPTION} at (1,12428) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 732"
+    LayoutBlockFlow {OPTION} at (1,12445) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 733"
+    LayoutBlockFlow {OPTION} at (1,12462) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 734"
+    LayoutBlockFlow {OPTION} at (1,12479) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 735"
+    LayoutBlockFlow {OPTION} at (1,12496) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 736"
+    LayoutBlockFlow {OPTION} at (1,12513) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 737"
+    LayoutBlockFlow {OPTION} at (1,12530) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 738"
+    LayoutBlockFlow {OPTION} at (1,12547) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 739"
+    LayoutBlockFlow {OPTION} at (1,12564) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 740"
+    LayoutBlockFlow {OPTION} at (1,12581) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 741"
+    LayoutBlockFlow {OPTION} at (1,12598) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 742"
+    LayoutBlockFlow {OPTION} at (1,12615) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 743"
+    LayoutBlockFlow {OPTION} at (1,12632) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 744"
+    LayoutBlockFlow {OPTION} at (1,12649) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 745"
+    LayoutBlockFlow {OPTION} at (1,12666) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 746"
+    LayoutBlockFlow {OPTION} at (1,12683) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 747"
+    LayoutBlockFlow {OPTION} at (1,12700) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 748"
+    LayoutBlockFlow {OPTION} at (1,12717) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 749"
+    LayoutBlockFlow {OPTION} at (1,12734) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 750"
+    LayoutBlockFlow {OPTION} at (1,12751) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 751"
+    LayoutBlockFlow {OPTION} at (1,12768) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 752"
+    LayoutBlockFlow {OPTION} at (1,12785) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 753"
+    LayoutBlockFlow {OPTION} at (1,12802) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 754"
+    LayoutBlockFlow {OPTION} at (1,12819) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 755"
+    LayoutBlockFlow {OPTION} at (1,12836) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 756"
+    LayoutBlockFlow {OPTION} at (1,12853) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 757"
+    LayoutBlockFlow {OPTION} at (1,12870) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 758"
+    LayoutBlockFlow {OPTION} at (1,12887) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 759"
+    LayoutBlockFlow {OPTION} at (1,12904) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 760"
+    LayoutBlockFlow {OPTION} at (1,12921) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 761"
+    LayoutBlockFlow {OPTION} at (1,12938) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 762"
+    LayoutBlockFlow {OPTION} at (1,12955) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 763"
+    LayoutBlockFlow {OPTION} at (1,12972) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 764"
+    LayoutBlockFlow {OPTION} at (1,12989) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 765"
+    LayoutBlockFlow {OPTION} at (1,13006) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 766"
+    LayoutBlockFlow {OPTION} at (1,13023) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 767"
+    LayoutBlockFlow {OPTION} at (1,13040) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 768"
+    LayoutBlockFlow {OPTION} at (1,13057) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 769"
+    LayoutBlockFlow {OPTION} at (1,13074) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 770"
+    LayoutBlockFlow {OPTION} at (1,13091) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 771"
+    LayoutBlockFlow {OPTION} at (1,13108) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 772"
+    LayoutBlockFlow {OPTION} at (1,13125) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 773"
+    LayoutBlockFlow {OPTION} at (1,13142) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 774"
+    LayoutBlockFlow {OPTION} at (1,13159) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 775"
+    LayoutBlockFlow {OPTION} at (1,13176) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 776"
+    LayoutBlockFlow {OPTION} at (1,13193) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 777"
+    LayoutBlockFlow {OPTION} at (1,13210) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 778"
+    LayoutBlockFlow {OPTION} at (1,13227) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 779"
+    LayoutBlockFlow {OPTION} at (1,13244) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 780"
+    LayoutBlockFlow {OPTION} at (1,13261) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 781"
+    LayoutBlockFlow {OPTION} at (1,13278) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 782"
+    LayoutBlockFlow {OPTION} at (1,13295) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 783"
+    LayoutBlockFlow {OPTION} at (1,13312) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 784"
+    LayoutBlockFlow {OPTION} at (1,13329) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 785"
+    LayoutBlockFlow {OPTION} at (1,13346) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 786"
+    LayoutBlockFlow {OPTION} at (1,13363) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 787"
+    LayoutBlockFlow {OPTION} at (1,13380) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 788"
+    LayoutBlockFlow {OPTION} at (1,13397) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 789"
+    LayoutBlockFlow {OPTION} at (1,13414) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 790"
+    LayoutBlockFlow {OPTION} at (1,13431) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 791"
+    LayoutBlockFlow {OPTION} at (1,13448) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 792"
+    LayoutBlockFlow {OPTION} at (1,13465) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 793"
+    LayoutBlockFlow {OPTION} at (1,13482) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 794"
+    LayoutBlockFlow {OPTION} at (1,13499) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 795"
+    LayoutBlockFlow {OPTION} at (1,13516) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 796"
+    LayoutBlockFlow {OPTION} at (1,13533) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 797"
+    LayoutBlockFlow {OPTION} at (1,13550) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 798"
+    LayoutBlockFlow {OPTION} at (1,13567) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 799"
+    LayoutBlockFlow {OPTION} at (1,13584) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 800"
+    LayoutBlockFlow {OPTION} at (1,13601) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 801"
+    LayoutBlockFlow {OPTION} at (1,13618) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 802"
+    LayoutBlockFlow {OPTION} at (1,13635) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 803"
+    LayoutBlockFlow {OPTION} at (1,13652) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 804"
+    LayoutBlockFlow {OPTION} at (1,13669) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 805"
+    LayoutBlockFlow {OPTION} at (1,13686) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 806"
+    LayoutBlockFlow {OPTION} at (1,13703) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 807"
+    LayoutBlockFlow {OPTION} at (1,13720) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 808"
+    LayoutBlockFlow {OPTION} at (1,13737) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 809"
+    LayoutBlockFlow {OPTION} at (1,13754) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 810"
+    LayoutBlockFlow {OPTION} at (1,13771) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 811"
+    LayoutBlockFlow {OPTION} at (1,13788) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 812"
+    LayoutBlockFlow {OPTION} at (1,13805) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 813"
+    LayoutBlockFlow {OPTION} at (1,13822) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 814"
+    LayoutBlockFlow {OPTION} at (1,13839) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 815"
+    LayoutBlockFlow {OPTION} at (1,13856) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 816"
+    LayoutBlockFlow {OPTION} at (1,13873) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 817"
+    LayoutBlockFlow {OPTION} at (1,13890) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 818"
+    LayoutBlockFlow {OPTION} at (1,13907) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 819"
+    LayoutBlockFlow {OPTION} at (1,13924) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 820"
+    LayoutBlockFlow {OPTION} at (1,13941) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 821"
+    LayoutBlockFlow {OPTION} at (1,13958) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 822"
+    LayoutBlockFlow {OPTION} at (1,13975) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 823"
+    LayoutBlockFlow {OPTION} at (1,13992) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 824"
+    LayoutBlockFlow {OPTION} at (1,14009) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 825"
+    LayoutBlockFlow {OPTION} at (1,14026) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 826"
+    LayoutBlockFlow {OPTION} at (1,14043) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 827"
+    LayoutBlockFlow {OPTION} at (1,14060) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 828"
+    LayoutBlockFlow {OPTION} at (1,14077) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 829"
+    LayoutBlockFlow {OPTION} at (1,14094) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 830"
+    LayoutBlockFlow {OPTION} at (1,14111) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 831"
+    LayoutBlockFlow {OPTION} at (1,14128) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 832"
+    LayoutBlockFlow {OPTION} at (1,14145) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 833"
+    LayoutBlockFlow {OPTION} at (1,14162) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 834"
+    LayoutBlockFlow {OPTION} at (1,14179) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 835"
+    LayoutBlockFlow {OPTION} at (1,14196) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 836"
+    LayoutBlockFlow {OPTION} at (1,14213) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 837"
+    LayoutBlockFlow {OPTION} at (1,14230) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 838"
+    LayoutBlockFlow {OPTION} at (1,14247) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 839"
+    LayoutBlockFlow {OPTION} at (1,14264) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 840"
+    LayoutBlockFlow {OPTION} at (1,14281) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 841"
+    LayoutBlockFlow {OPTION} at (1,14298) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 842"
+    LayoutBlockFlow {OPTION} at (1,14315) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 843"
+    LayoutBlockFlow {OPTION} at (1,14332) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 844"
+    LayoutBlockFlow {OPTION} at (1,14349) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 845"
+    LayoutBlockFlow {OPTION} at (1,14366) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 846"
+    LayoutBlockFlow {OPTION} at (1,14383) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 847"
+    LayoutBlockFlow {OPTION} at (1,14400) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 848"
+    LayoutBlockFlow {OPTION} at (1,14417) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 849"
+    LayoutBlockFlow {OPTION} at (1,14434) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 850"
+    LayoutBlockFlow {OPTION} at (1,14451) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 851"
+    LayoutBlockFlow {OPTION} at (1,14468) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 852"
+    LayoutBlockFlow {OPTION} at (1,14485) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 853"
+    LayoutBlockFlow {OPTION} at (1,14502) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 854"
+    LayoutBlockFlow {OPTION} at (1,14519) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 855"
+    LayoutBlockFlow {OPTION} at (1,14536) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 856"
+    LayoutBlockFlow {OPTION} at (1,14553) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 857"
+    LayoutBlockFlow {OPTION} at (1,14570) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 858"
+    LayoutBlockFlow {OPTION} at (1,14587) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 859"
+    LayoutBlockFlow {OPTION} at (1,14604) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 860"
+    LayoutBlockFlow {OPTION} at (1,14621) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 861"
+    LayoutBlockFlow {OPTION} at (1,14638) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 862"
+    LayoutBlockFlow {OPTION} at (1,14655) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 863"
+    LayoutBlockFlow {OPTION} at (1,14672) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 864"
+    LayoutBlockFlow {OPTION} at (1,14689) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 865"
+    LayoutBlockFlow {OPTION} at (1,14706) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 866"
+    LayoutBlockFlow {OPTION} at (1,14723) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 867"
+    LayoutBlockFlow {OPTION} at (1,14740) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 868"
+    LayoutBlockFlow {OPTION} at (1,14757) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 869"
+    LayoutBlockFlow {OPTION} at (1,14774) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 870"
+    LayoutBlockFlow {OPTION} at (1,14791) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 871"
+    LayoutBlockFlow {OPTION} at (1,14808) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 872"
+    LayoutBlockFlow {OPTION} at (1,14825) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 873"
+    LayoutBlockFlow {OPTION} at (1,14842) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 874"
+    LayoutBlockFlow {OPTION} at (1,14859) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 875"
+    LayoutBlockFlow {OPTION} at (1,14876) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 876"
+    LayoutBlockFlow {OPTION} at (1,14893) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 877"
+    LayoutBlockFlow {OPTION} at (1,14910) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 878"
+    LayoutBlockFlow {OPTION} at (1,14927) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 879"
+    LayoutBlockFlow {OPTION} at (1,14944) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 880"
+    LayoutBlockFlow {OPTION} at (1,14961) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 881"
+    LayoutBlockFlow {OPTION} at (1,14978) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 882"
+    LayoutBlockFlow {OPTION} at (1,14995) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 883"
+    LayoutBlockFlow {OPTION} at (1,15012) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 884"
+    LayoutBlockFlow {OPTION} at (1,15029) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 885"
+    LayoutBlockFlow {OPTION} at (1,15046) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 886"
+    LayoutBlockFlow {OPTION} at (1,15063) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 887"
+    LayoutBlockFlow {OPTION} at (1,15080) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 888"
+    LayoutBlockFlow {OPTION} at (1,15097) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 889"
+    LayoutBlockFlow {OPTION} at (1,15114) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 890"
+    LayoutBlockFlow {OPTION} at (1,15131) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 891"
+    LayoutBlockFlow {OPTION} at (1,15148) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 892"
+    LayoutBlockFlow {OPTION} at (1,15165) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 893"
+    LayoutBlockFlow {OPTION} at (1,15182) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 894"
+    LayoutBlockFlow {OPTION} at (1,15199) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 895"
+    LayoutBlockFlow {OPTION} at (1,15216) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 896"
+    LayoutBlockFlow {OPTION} at (1,15233) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 897"
+    LayoutBlockFlow {OPTION} at (1,15250) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 898"
+    LayoutBlockFlow {OPTION} at (1,15267) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 899"
+    LayoutBlockFlow {OPTION} at (1,15284) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 900"
+    LayoutBlockFlow {OPTION} at (1,15301) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 901"
+    LayoutBlockFlow {OPTION} at (1,15318) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 902"
+    LayoutBlockFlow {OPTION} at (1,15335) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 903"
+    LayoutBlockFlow {OPTION} at (1,15352) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 904"
+    LayoutBlockFlow {OPTION} at (1,15369) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 905"
+    LayoutBlockFlow {OPTION} at (1,15386) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 906"
+    LayoutBlockFlow {OPTION} at (1,15403) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 907"
+    LayoutBlockFlow {OPTION} at (1,15420) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 908"
+    LayoutBlockFlow {OPTION} at (1,15437) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 909"
+    LayoutBlockFlow {OPTION} at (1,15454) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 910"
+    LayoutBlockFlow {OPTION} at (1,15471) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 50x16
+        text run at (2,0) width 50: "Item 911"
+    LayoutBlockFlow {OPTION} at (1,15488) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 912"
+    LayoutBlockFlow {OPTION} at (1,15505) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 913"
+    LayoutBlockFlow {OPTION} at (1,15522) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 914"
+    LayoutBlockFlow {OPTION} at (1,15539) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 915"
+    LayoutBlockFlow {OPTION} at (1,15556) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 916"
+    LayoutBlockFlow {OPTION} at (1,15573) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 917"
+    LayoutBlockFlow {OPTION} at (1,15590) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 918"
+    LayoutBlockFlow {OPTION} at (1,15607) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 919"
+    LayoutBlockFlow {OPTION} at (1,15624) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 920"
+    LayoutBlockFlow {OPTION} at (1,15641) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 921"
+    LayoutBlockFlow {OPTION} at (1,15658) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 922"
+    LayoutBlockFlow {OPTION} at (1,15675) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 923"
+    LayoutBlockFlow {OPTION} at (1,15692) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 924"
+    LayoutBlockFlow {OPTION} at (1,15709) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 925"
+    LayoutBlockFlow {OPTION} at (1,15726) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 926"
+    LayoutBlockFlow {OPTION} at (1,15743) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 927"
+    LayoutBlockFlow {OPTION} at (1,15760) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 928"
+    LayoutBlockFlow {OPTION} at (1,15777) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 929"
+    LayoutBlockFlow {OPTION} at (1,15794) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 930"
+    LayoutBlockFlow {OPTION} at (1,15811) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 931"
+    LayoutBlockFlow {OPTION} at (1,15828) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 932"
+    LayoutBlockFlow {OPTION} at (1,15845) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 933"
+    LayoutBlockFlow {OPTION} at (1,15862) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 934"
+    LayoutBlockFlow {OPTION} at (1,15879) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 935"
+    LayoutBlockFlow {OPTION} at (1,15896) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 936"
+    LayoutBlockFlow {OPTION} at (1,15913) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 937"
+    LayoutBlockFlow {OPTION} at (1,15930) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 938"
+    LayoutBlockFlow {OPTION} at (1,15947) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 939"
+    LayoutBlockFlow {OPTION} at (1,15964) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 940"
+    LayoutBlockFlow {OPTION} at (1,15981) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 941"
+    LayoutBlockFlow {OPTION} at (1,15998) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 942"
+    LayoutBlockFlow {OPTION} at (1,16015) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 943"
+    LayoutBlockFlow {OPTION} at (1,16032) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 944"
+    LayoutBlockFlow {OPTION} at (1,16049) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 945"
+    LayoutBlockFlow {OPTION} at (1,16066) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 946"
+    LayoutBlockFlow {OPTION} at (1,16083) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 947"
+    LayoutBlockFlow {OPTION} at (1,16100) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 948"
+    LayoutBlockFlow {OPTION} at (1,16117) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 949"
+    LayoutBlockFlow {OPTION} at (1,16134) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 950"
+    LayoutBlockFlow {OPTION} at (1,16151) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 951"
+    LayoutBlockFlow {OPTION} at (1,16168) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 952"
+    LayoutBlockFlow {OPTION} at (1,16185) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 953"
+    LayoutBlockFlow {OPTION} at (1,16202) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 954"
+    LayoutBlockFlow {OPTION} at (1,16219) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 955"
+    LayoutBlockFlow {OPTION} at (1,16236) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 956"
+    LayoutBlockFlow {OPTION} at (1,16253) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 957"
+    LayoutBlockFlow {OPTION} at (1,16270) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 958"
+    LayoutBlockFlow {OPTION} at (1,16287) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 959"
+    LayoutBlockFlow {OPTION} at (1,16304) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 960"
+    LayoutBlockFlow {OPTION} at (1,16321) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 961"
+    LayoutBlockFlow {OPTION} at (1,16338) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 962"
+    LayoutBlockFlow {OPTION} at (1,16355) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 963"
+    LayoutBlockFlow {OPTION} at (1,16372) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 964"
+    LayoutBlockFlow {OPTION} at (1,16389) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 965"
+    LayoutBlockFlow {OPTION} at (1,16406) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 966"
+    LayoutBlockFlow {OPTION} at (1,16423) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 967"
+    LayoutBlockFlow {OPTION} at (1,16440) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 968"
+    LayoutBlockFlow {OPTION} at (1,16457) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 969"
+    LayoutBlockFlow {OPTION} at (1,16474) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 970"
+    LayoutBlockFlow {OPTION} at (1,16491) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 971"
+    LayoutBlockFlow {OPTION} at (1,16508) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 972"
+    LayoutBlockFlow {OPTION} at (1,16525) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 973"
+    LayoutBlockFlow {OPTION} at (1,16542) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 974"
+    LayoutBlockFlow {OPTION} at (1,16559) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 975"
+    LayoutBlockFlow {OPTION} at (1,16576) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 976"
+    LayoutBlockFlow {OPTION} at (1,16593) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 977"
+    LayoutBlockFlow {OPTION} at (1,16610) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 978"
+    LayoutBlockFlow {OPTION} at (1,16627) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 979"
+    LayoutBlockFlow {OPTION} at (1,16644) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 980"
+    LayoutBlockFlow {OPTION} at (1,16661) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 981"
+    LayoutBlockFlow {OPTION} at (1,16678) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 982"
+    LayoutBlockFlow {OPTION} at (1,16695) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 983"
+    LayoutBlockFlow {OPTION} at (1,16712) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 984"
+    LayoutBlockFlow {OPTION} at (1,16729) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 985"
+    LayoutBlockFlow {OPTION} at (1,16746) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 986"
+    LayoutBlockFlow {OPTION} at (1,16763) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 987"
+    LayoutBlockFlow {OPTION} at (1,16780) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 988"
+    LayoutBlockFlow {OPTION} at (1,16797) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 989"
+    LayoutBlockFlow {OPTION} at (1,16814) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 990"
+    LayoutBlockFlow {OPTION} at (1,16831) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 991"
+    LayoutBlockFlow {OPTION} at (1,16848) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 992"
+    LayoutBlockFlow {OPTION} at (1,16865) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 993"
+    LayoutBlockFlow {OPTION} at (1,16882) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 994"
+    LayoutBlockFlow {OPTION} at (1,16899) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 995"
+    LayoutBlockFlow {OPTION} at (1,16916) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 996"
+    LayoutBlockFlow {OPTION} at (1,16933) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 997"
+    LayoutBlockFlow {OPTION} at (1,16950) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 998"
+    LayoutBlockFlow {OPTION} at (1,16967) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 51x16
+        text run at (2,0) width 51: "Item 999"
+    LayoutBlockFlow {OPTION} at (1,16984) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1000"
+    LayoutBlockFlow {OPTION} at (1,17001) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1001"
+    LayoutBlockFlow {OPTION} at (1,17018) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1002"
+    LayoutBlockFlow {OPTION} at (1,17035) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1003"
+    LayoutBlockFlow {OPTION} at (1,17052) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1004"
+    LayoutBlockFlow {OPTION} at (1,17069) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1005"
+    LayoutBlockFlow {OPTION} at (1,17086) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1006"
+    LayoutBlockFlow {OPTION} at (1,17103) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1007"
+    LayoutBlockFlow {OPTION} at (1,17120) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1008"
+    LayoutBlockFlow {OPTION} at (1,17137) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1009"
+    LayoutBlockFlow {OPTION} at (1,17154) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1010"
+    LayoutBlockFlow {OPTION} at (1,17171) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1011"
+    LayoutBlockFlow {OPTION} at (1,17188) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1012"
+    LayoutBlockFlow {OPTION} at (1,17205) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1013"
+    LayoutBlockFlow {OPTION} at (1,17222) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1014"
+    LayoutBlockFlow {OPTION} at (1,17239) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1015"
+    LayoutBlockFlow {OPTION} at (1,17256) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1016"
+    LayoutBlockFlow {OPTION} at (1,17273) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1017"
+    LayoutBlockFlow {OPTION} at (1,17290) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1018"
+    LayoutBlockFlow {OPTION} at (1,17307) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1019"
+    LayoutBlockFlow {OPTION} at (1,17324) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1020"
+    LayoutBlockFlow {OPTION} at (1,17341) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1021"
+    LayoutBlockFlow {OPTION} at (1,17358) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1022"
+    LayoutBlockFlow {OPTION} at (1,17375) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1023"
+    LayoutBlockFlow {OPTION} at (1,17392) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1024"
+    LayoutBlockFlow {OPTION} at (1,17409) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1025"
+    LayoutBlockFlow {OPTION} at (1,17426) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1026"
+    LayoutBlockFlow {OPTION} at (1,17443) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1027"
+    LayoutBlockFlow {OPTION} at (1,17460) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1028"
+    LayoutBlockFlow {OPTION} at (1,17477) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1029"
+    LayoutBlockFlow {OPTION} at (1,17494) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1030"
+    LayoutBlockFlow {OPTION} at (1,17511) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1031"
+    LayoutBlockFlow {OPTION} at (1,17528) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1032"
+    LayoutBlockFlow {OPTION} at (1,17545) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1033"
+    LayoutBlockFlow {OPTION} at (1,17562) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1034"
+    LayoutBlockFlow {OPTION} at (1,17579) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1035"
+    LayoutBlockFlow {OPTION} at (1,17596) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1036"
+    LayoutBlockFlow {OPTION} at (1,17613) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1037"
+    LayoutBlockFlow {OPTION} at (1,17630) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1038"
+    LayoutBlockFlow {OPTION} at (1,17647) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1039"
+    LayoutBlockFlow {OPTION} at (1,17664) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1040"
+    LayoutBlockFlow {OPTION} at (1,17681) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1041"
+    LayoutBlockFlow {OPTION} at (1,17698) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1042"
+    LayoutBlockFlow {OPTION} at (1,17715) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1043"
+    LayoutBlockFlow {OPTION} at (1,17732) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1044"
+    LayoutBlockFlow {OPTION} at (1,17749) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1045"
+    LayoutBlockFlow {OPTION} at (1,17766) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1046"
+    LayoutBlockFlow {OPTION} at (1,17783) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1047"
+    LayoutBlockFlow {OPTION} at (1,17800) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1048"
+    LayoutBlockFlow {OPTION} at (1,17817) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1049"
+    LayoutBlockFlow {OPTION} at (1,17834) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1050"
+    LayoutBlockFlow {OPTION} at (1,17851) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1051"
+    LayoutBlockFlow {OPTION} at (1,17868) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1052"
+    LayoutBlockFlow {OPTION} at (1,17885) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1053"
+    LayoutBlockFlow {OPTION} at (1,17902) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1054"
+    LayoutBlockFlow {OPTION} at (1,17919) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1055"
+    LayoutBlockFlow {OPTION} at (1,17936) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1056"
+    LayoutBlockFlow {OPTION} at (1,17953) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1057"
+    LayoutBlockFlow {OPTION} at (1,17970) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1058"
+    LayoutBlockFlow {OPTION} at (1,17987) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1059"
+    LayoutBlockFlow {OPTION} at (1,18004) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1060"
+    LayoutBlockFlow {OPTION} at (1,18021) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1061"
+    LayoutBlockFlow {OPTION} at (1,18038) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1062"
+    LayoutBlockFlow {OPTION} at (1,18055) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1063"
+    LayoutBlockFlow {OPTION} at (1,18072) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1064"
+    LayoutBlockFlow {OPTION} at (1,18089) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1065"
+    LayoutBlockFlow {OPTION} at (1,18106) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1066"
+    LayoutBlockFlow {OPTION} at (1,18123) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1067"
+    LayoutBlockFlow {OPTION} at (1,18140) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1068"
+    LayoutBlockFlow {OPTION} at (1,18157) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1069"
+    LayoutBlockFlow {OPTION} at (1,18174) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1070"
+    LayoutBlockFlow {OPTION} at (1,18191) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1071"
+    LayoutBlockFlow {OPTION} at (1,18208) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1072"
+    LayoutBlockFlow {OPTION} at (1,18225) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1073"
+    LayoutBlockFlow {OPTION} at (1,18242) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1074"
+    LayoutBlockFlow {OPTION} at (1,18259) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1075"
+    LayoutBlockFlow {OPTION} at (1,18276) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1076"
+    LayoutBlockFlow {OPTION} at (1,18293) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1077"
+    LayoutBlockFlow {OPTION} at (1,18310) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1078"
+    LayoutBlockFlow {OPTION} at (1,18327) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1079"
+    LayoutBlockFlow {OPTION} at (1,18344) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1080"
+    LayoutBlockFlow {OPTION} at (1,18361) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1081"
+    LayoutBlockFlow {OPTION} at (1,18378) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1082"
+    LayoutBlockFlow {OPTION} at (1,18395) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1083"
+    LayoutBlockFlow {OPTION} at (1,18412) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1084"
+    LayoutBlockFlow {OPTION} at (1,18429) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1085"
+    LayoutBlockFlow {OPTION} at (1,18446) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1086"
+    LayoutBlockFlow {OPTION} at (1,18463) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1087"
+    LayoutBlockFlow {OPTION} at (1,18480) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1088"
+    LayoutBlockFlow {OPTION} at (1,18497) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1089"
+    LayoutBlockFlow {OPTION} at (1,18514) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1090"
+    LayoutBlockFlow {OPTION} at (1,18531) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1091"
+    LayoutBlockFlow {OPTION} at (1,18548) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1092"
+    LayoutBlockFlow {OPTION} at (1,18565) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1093"
+    LayoutBlockFlow {OPTION} at (1,18582) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1094"
+    LayoutBlockFlow {OPTION} at (1,18599) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1095"
+    LayoutBlockFlow {OPTION} at (1,18616) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1096"
+    LayoutBlockFlow {OPTION} at (1,18633) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1097"
+    LayoutBlockFlow {OPTION} at (1,18650) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1098"
+    LayoutBlockFlow {OPTION} at (1,18667) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1099"
+    LayoutBlockFlow {OPTION} at (1,18684) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1100"
+    LayoutBlockFlow {OPTION} at (1,18701) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1101"
+    LayoutBlockFlow {OPTION} at (1,18718) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1102"
+    LayoutBlockFlow {OPTION} at (1,18735) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1103"
+    LayoutBlockFlow {OPTION} at (1,18752) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1104"
+    LayoutBlockFlow {OPTION} at (1,18769) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1105"
+    LayoutBlockFlow {OPTION} at (1,18786) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1106"
+    LayoutBlockFlow {OPTION} at (1,18803) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1107"
+    LayoutBlockFlow {OPTION} at (1,18820) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1108"
+    LayoutBlockFlow {OPTION} at (1,18837) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1109"
+    LayoutBlockFlow {OPTION} at (1,18854) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1110"
+    LayoutBlockFlow {OPTION} at (1,18871) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 56x16
+        text run at (2,0) width 56: "Item 1111"
+    LayoutBlockFlow {OPTION} at (1,18888) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1112"
+    LayoutBlockFlow {OPTION} at (1,18905) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1113"
+    LayoutBlockFlow {OPTION} at (1,18922) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1114"
+    LayoutBlockFlow {OPTION} at (1,18939) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1115"
+    LayoutBlockFlow {OPTION} at (1,18956) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1116"
+    LayoutBlockFlow {OPTION} at (1,18973) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1117"
+    LayoutBlockFlow {OPTION} at (1,18990) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1118"
+    LayoutBlockFlow {OPTION} at (1,19007) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1119"
+    LayoutBlockFlow {OPTION} at (1,19024) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1120"
+    LayoutBlockFlow {OPTION} at (1,19041) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1121"
+    LayoutBlockFlow {OPTION} at (1,19058) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1122"
+    LayoutBlockFlow {OPTION} at (1,19075) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1123"
+    LayoutBlockFlow {OPTION} at (1,19092) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1124"
+    LayoutBlockFlow {OPTION} at (1,19109) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1125"
+    LayoutBlockFlow {OPTION} at (1,19126) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1126"
+    LayoutBlockFlow {OPTION} at (1,19143) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1127"
+    LayoutBlockFlow {OPTION} at (1,19160) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1128"
+    LayoutBlockFlow {OPTION} at (1,19177) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1129"
+    LayoutBlockFlow {OPTION} at (1,19194) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1130"
+    LayoutBlockFlow {OPTION} at (1,19211) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1131"
+    LayoutBlockFlow {OPTION} at (1,19228) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1132"
+    LayoutBlockFlow {OPTION} at (1,19245) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1133"
+    LayoutBlockFlow {OPTION} at (1,19262) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1134"
+    LayoutBlockFlow {OPTION} at (1,19279) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1135"
+    LayoutBlockFlow {OPTION} at (1,19296) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1136"
+    LayoutBlockFlow {OPTION} at (1,19313) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1137"
+    LayoutBlockFlow {OPTION} at (1,19330) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1138"
+    LayoutBlockFlow {OPTION} at (1,19347) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1139"
+    LayoutBlockFlow {OPTION} at (1,19364) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1140"
+    LayoutBlockFlow {OPTION} at (1,19381) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1141"
+    LayoutBlockFlow {OPTION} at (1,19398) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1142"
+    LayoutBlockFlow {OPTION} at (1,19415) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1143"
+    LayoutBlockFlow {OPTION} at (1,19432) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1144"
+    LayoutBlockFlow {OPTION} at (1,19449) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1145"
+    LayoutBlockFlow {OPTION} at (1,19466) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1146"
+    LayoutBlockFlow {OPTION} at (1,19483) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1147"
+    LayoutBlockFlow {OPTION} at (1,19500) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1148"
+    LayoutBlockFlow {OPTION} at (1,19517) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1149"
+    LayoutBlockFlow {OPTION} at (1,19534) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1150"
+    LayoutBlockFlow {OPTION} at (1,19551) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1151"
+    LayoutBlockFlow {OPTION} at (1,19568) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1152"
+    LayoutBlockFlow {OPTION} at (1,19585) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1153"
+    LayoutBlockFlow {OPTION} at (1,19602) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1154"
+    LayoutBlockFlow {OPTION} at (1,19619) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1155"
+    LayoutBlockFlow {OPTION} at (1,19636) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1156"
+    LayoutBlockFlow {OPTION} at (1,19653) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1157"
+    LayoutBlockFlow {OPTION} at (1,19670) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1158"
+    LayoutBlockFlow {OPTION} at (1,19687) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1159"
+    LayoutBlockFlow {OPTION} at (1,19704) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1160"
+    LayoutBlockFlow {OPTION} at (1,19721) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1161"
+    LayoutBlockFlow {OPTION} at (1,19738) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1162"
+    LayoutBlockFlow {OPTION} at (1,19755) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1163"
+    LayoutBlockFlow {OPTION} at (1,19772) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1164"
+    LayoutBlockFlow {OPTION} at (1,19789) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1165"
+    LayoutBlockFlow {OPTION} at (1,19806) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1166"
+    LayoutBlockFlow {OPTION} at (1,19823) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1167"
+    LayoutBlockFlow {OPTION} at (1,19840) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1168"
+    LayoutBlockFlow {OPTION} at (1,19857) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1169"
+    LayoutBlockFlow {OPTION} at (1,19874) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1170"
+    LayoutBlockFlow {OPTION} at (1,19891) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1171"
+    LayoutBlockFlow {OPTION} at (1,19908) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1172"
+    LayoutBlockFlow {OPTION} at (1,19925) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1173"
+    LayoutBlockFlow {OPTION} at (1,19942) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1174"
+    LayoutBlockFlow {OPTION} at (1,19959) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1175"
+    LayoutBlockFlow {OPTION} at (1,19976) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1176"
+    LayoutBlockFlow {OPTION} at (1,19993) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1177"
+    LayoutBlockFlow {OPTION} at (1,20010) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1178"
+    LayoutBlockFlow {OPTION} at (1,20027) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1179"
+    LayoutBlockFlow {OPTION} at (1,20044) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1180"
+    LayoutBlockFlow {OPTION} at (1,20061) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1181"
+    LayoutBlockFlow {OPTION} at (1,20078) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1182"
+    LayoutBlockFlow {OPTION} at (1,20095) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1183"
+    LayoutBlockFlow {OPTION} at (1,20112) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1184"
+    LayoutBlockFlow {OPTION} at (1,20129) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1185"
+    LayoutBlockFlow {OPTION} at (1,20146) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1186"
+    LayoutBlockFlow {OPTION} at (1,20163) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1187"
+    LayoutBlockFlow {OPTION} at (1,20180) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1188"
+    LayoutBlockFlow {OPTION} at (1,20197) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1189"
+    LayoutBlockFlow {OPTION} at (1,20214) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1190"
+    LayoutBlockFlow {OPTION} at (1,20231) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1191"
+    LayoutBlockFlow {OPTION} at (1,20248) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1192"
+    LayoutBlockFlow {OPTION} at (1,20265) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1193"
+    LayoutBlockFlow {OPTION} at (1,20282) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1194"
+    LayoutBlockFlow {OPTION} at (1,20299) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1195"
+    LayoutBlockFlow {OPTION} at (1,20316) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1196"
+    LayoutBlockFlow {OPTION} at (1,20333) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1197"
+    LayoutBlockFlow {OPTION} at (1,20350) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1198"
+    LayoutBlockFlow {OPTION} at (1,20367) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1199"
+    LayoutBlockFlow {OPTION} at (1,20384) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1200"
+    LayoutBlockFlow {OPTION} at (1,20401) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1201"
+    LayoutBlockFlow {OPTION} at (1,20418) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1202"
+    LayoutBlockFlow {OPTION} at (1,20435) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1203"
+    LayoutBlockFlow {OPTION} at (1,20452) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1204"
+    LayoutBlockFlow {OPTION} at (1,20469) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1205"
+    LayoutBlockFlow {OPTION} at (1,20486) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1206"
+    LayoutBlockFlow {OPTION} at (1,20503) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1207"
+    LayoutBlockFlow {OPTION} at (1,20520) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1208"
+    LayoutBlockFlow {OPTION} at (1,20537) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1209"
+    LayoutBlockFlow {OPTION} at (1,20554) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1210"
+    LayoutBlockFlow {OPTION} at (1,20571) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 57x16
+        text run at (2,0) width 57: "Item 1211"
+    LayoutBlockFlow {OPTION} at (1,20588) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1212"
+    LayoutBlockFlow {OPTION} at (1,20605) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1213"
+    LayoutBlockFlow {OPTION} at (1,20622) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1214"
+    LayoutBlockFlow {OPTION} at (1,20639) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1215"
+    LayoutBlockFlow {OPTION} at (1,20656) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1216"
+    LayoutBlockFlow {OPTION} at (1,20673) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1217"
+    LayoutBlockFlow {OPTION} at (1,20690) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1218"
+    LayoutBlockFlow {OPTION} at (1,20707) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1219"
+    LayoutBlockFlow {OPTION} at (1,20724) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1220"
+    LayoutBlockFlow {OPTION} at (1,20741) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1221"
+    LayoutBlockFlow {OPTION} at (1,20758) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1222"
+    LayoutBlockFlow {OPTION} at (1,20775) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1223"
+    LayoutBlockFlow {OPTION} at (1,20792) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1224"
+    LayoutBlockFlow {OPTION} at (1,20809) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1225"
+    LayoutBlockFlow {OPTION} at (1,20826) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1226"
+    LayoutBlockFlow {OPTION} at (1,20843) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1227"
+    LayoutBlockFlow {OPTION} at (1,20860) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1228"
+    LayoutBlockFlow {OPTION} at (1,20877) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1229"
+    LayoutBlockFlow {OPTION} at (1,20894) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1230"
+    LayoutBlockFlow {OPTION} at (1,20911) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1231"
+    LayoutBlockFlow {OPTION} at (1,20928) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1232"
+    LayoutBlockFlow {OPTION} at (1,20945) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1233"
+    LayoutBlockFlow {OPTION} at (1,20962) size 183x17 [color=#323232] [bgcolor=#C8C8C8]
+      LayoutText {#text} at (2,0) size 58x16
+        text run at (2,0) width 58: "Item 1234"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-rtl-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-rtl-expected.txt
new file mode 100644
index 0000000..f3f6b42
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-appearance-rtl-expected.txt
@@ -0,0 +1,170 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x567
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x567
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x543
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 742x39
+          text run at (0,0) width 742: "This tests that bidirectional text is correctly rendered in popup controls. The order of the text below each popup button"
+          text run at (0,20) width 587: "should match the order of the select's option text, and the order of the text in the popup menu."
+      LayoutNGBlockFlow {DL} at (0,56) size 784x180
+        LayoutNGBlockFlow {DT} at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 275x19
+            text run at (0,0) width 275: "1) direction: rtl; -webkit-rtl-ordering: logical"
+        LayoutNGBlockFlow {DD} at (40,20) size 744x40
+          LayoutNGBlockFlow (anonymous) at (0,0) size 744x20
+            LayoutMenuList {SELECT} at (0,0) size 100x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+              LayoutNGBlockFlow (anonymous) at (1,1) size 98x18
+                LayoutText (anonymous) at (31,1) size 63x16
+                  text run at (31,1) width 42 RTL: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+                  text run at (73,1) width 21: "abc"
+            LayoutText {#text} at (0,0) size 0x0
+          LayoutNGBlockFlow {DIV} at (0,20) size 100x20
+            LayoutText {#text} at (31,0) size 69x19
+              text run at (31,0) width 47: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+              text run at (78,0) width 22: "abc"
+        LayoutNGBlockFlow {DT} at (0,60) size 784x20
+          LayoutText {#text} at (0,0) size 113x19
+            text run at (0,0) width 113: "2) text-align: right"
+        LayoutNGBlockFlow {DD} at (40,80) size 744x40
+          LayoutNGBlockFlow (anonymous) at (0,0) size 744x20
+            LayoutMenuList {SELECT} at (0,0) size 200x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+              LayoutNGBlockFlow (anonymous) at (1,1) size 198x18
+                LayoutText (anonymous) at (4,1) size 63x16
+                  text run at (4,1) width 21: "abc"
+                  text run at (25,1) width 42 RTL: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+            LayoutText {#text} at (0,0) size 0x0
+          LayoutNGBlockFlow {DIV} at (0,20) size 200x20
+            LayoutText {#text} at (0,0) size 69x19
+              text run at (0,0) width 22: "abc"
+              text run at (22,0) width 47: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+        LayoutNGBlockFlow {DT} at (0,120) size 784x20
+          LayoutText {#text} at (0,0) size 70x19
+            text run at (0,0) width 70: "3) No style"
+        LayoutNGBlockFlow {DD} at (40,140) size 744x40
+          LayoutNGBlockFlow (anonymous) at (0,0) size 744x20
+            LayoutMenuList {SELECT} at (0,0) size 100x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+              LayoutNGBlockFlow (anonymous) at (1,1) size 98x18
+                LayoutText (anonymous) at (4,1) size 63x16
+                  text run at (4,1) width 21: "abc"
+                  text run at (25,1) width 42 RTL: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+            LayoutText {#text} at (0,0) size 0x0
+          LayoutNGBlockFlow {DIV} at (0,20) size 100x20
+            LayoutText {#text} at (0,0) size 69x19
+              text run at (0,0) width 22: "abc"
+              text run at (22,0) width 47: "\x{5D0}\x{5E4}\x{5E8}\x{5E1}\x{5DE}\x{5D5}\x{5DF}"
+      LayoutNGBlockFlow {DIV} at (0,262) size 784x59
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 622x19
+            text run at (0,0) width 622: "The following line and the SELECT element should have same text, and no characters are lacking."
+        LayoutNGBlockFlow {DIV} at (0,20) size 784x19
+          LayoutText {#text} at (0,0) size 108x18
+            text run at (0,0) width 108: "\x{627}\x{644}\x{627}\x{642}\x{62A}\x{631}\x{627}\x{62D}\x{627}\x{62A} / \x{627}\x{644}\x{634}\x{643}\x{627}\x{648}\x{64A}"
+        LayoutNGBlockFlow (anonymous) at (0,39) size 784x20
+          LayoutMenuList {SELECT} at (0,0) size 113x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+            LayoutNGBlockFlow (anonymous) at (1,1) size 111x18
+              LayoutText (anonymous) at (4,1) size 91x16
+                text run at (4,1) width 91 RTL: "\x{627}\x{644}\x{627}\x{642}\x{62A}\x{631}\x{627}\x{62D}\x{627}\x{62A} / \x{627}\x{644}\x{634}\x{643}\x{627}\x{648}\x{64A}"
+          LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,347) size 784x20
+        LayoutText {#text} at (0,0) size 694x19
+          text run at (0,0) width 694: "Verify that the alignment and writing direction of each selected item matches the one below the pop-up button."
+layer at (8,268) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,252) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (8,345) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,329) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (8,399) size 784x160
+  LayoutNGBlockFlow {DIV} at (0,383) size 784x160
+    LayoutMultiColumnSet (anonymous) at (0,0) size 784x160
+layer at (8,399) size 384x320 backgroundClip at (0,0) size 400x559 clip at (0,0) size 400x559
+  LayoutMultiColumnFlowThread (anonymous) at (0,0) size 384x320
+    LayoutNGBlockFlow {DIV} at (0,0) size 384x160
+      LayoutMenuList {SELECT} at (0,0) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (4,1) size 174x18
+            text run at (4,1) width 35: "First "
+            text run at (39,1) width 52 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
+            text run at (91,1) width 18: "03"
+            text run at (109,1) width 40 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+            text run at (149,1) width 29: " fifth"
+      LayoutNGBlockFlow {DIV} at (0,22) size 352x18
+        LayoutText {#text} at (1,1) size 133x15
+          text run at (1,1) width 27: "First "
+          text run at (28,1) width 38: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
+          text run at (66,1) width 14: "03"
+          text run at (80,1) width 28: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+          text run at (108,1) width 26: " fifth"
+      LayoutMenuList {SELECT} at (0,40) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (4,1) size 174x18
+            text run at (4,1) width 25: "fifth"
+            text run at (29,1) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
+            text run at (85,1) width 18: "03"
+            text run at (103,1) width 44 RTL: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+            text run at (147,1) width 31: "First"
+      LayoutNGBlockFlow {DIV} at (0,62) size 352x18
+        LayoutText {#text} at (1,1) size 133x15
+          text run at (1,1) width 23: "fifth"
+          text run at (24,1) width 41: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
+          text run at (65,1) width 14: "03"
+          text run at (79,1) width 31: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+          text run at (110,1) width 24: "First"
+      LayoutMenuList {SELECT} at (0,80) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (4,1) size 174x18
+            text run at (4,1) width 174 LTR override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutNGBlockFlow {DIV} at (0,102) size 352x18
+        LayoutText {#text} at (1,1) size 133x15
+          text run at (1,1) width 133: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutMenuList {SELECT} at (0,120) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (4,1) size 174x18
+            text run at (4,1) width 174 RTL override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutNGBlockFlow {DIV} at (0,142) size 352x18
+        LayoutText {#text} at (1,1) size 133x15
+          text run at (1,1) width 133: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+    LayoutNGBlockFlow {DIV} at (0,160) size 384x160
+      LayoutMenuList {SELECT} at (0,0) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (170,1) size 174x18
+            text run at (170,1) width 35: "First "
+            text run at (205,1) width 52 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
+            text run at (257,1) width 18: "03"
+            text run at (275,1) width 40 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+            text run at (315,1) width 29: " fifth"
+      LayoutNGBlockFlow {DIV} at (0,22) size 352x18
+        LayoutText {#text} at (218,1) size 133x15
+          text run at (218,1) width 27: "First "
+          text run at (245,1) width 38: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
+          text run at (283,1) width 14: "03"
+          text run at (297,1) width 28: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+          text run at (325,1) width 26: " fifth"
+      LayoutMenuList {SELECT} at (0,40) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (170,1) size 174x18
+            text run at (170,1) width 25: "fifth"
+            text run at (195,1) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
+            text run at (251,1) width 18: "03"
+            text run at (269,1) width 44 RTL: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+            text run at (313,1) width 31: "First"
+      LayoutNGBlockFlow {DIV} at (0,62) size 352x18
+        LayoutText {#text} at (218,1) size 133x15
+          text run at (218,1) width 23: "fifth"
+          text run at (241,1) width 41: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
+          text run at (282,1) width 14: "03"
+          text run at (296,1) width 31: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
+          text run at (327,1) width 24: "First"
+      LayoutMenuList {SELECT} at (0,80) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (170,1) size 174x18
+            text run at (170,1) width 174 LTR override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutNGBlockFlow {DIV} at (0,102) size 352x18
+        LayoutText {#text} at (218,1) size 133x15
+          text run at (218,1) width 133: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutMenuList {SELECT} at (0,120) size 350x22 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 348x21
+          LayoutText (anonymous) at (170,1) size 174x18
+            text run at (170,1) width 174 RTL override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
+      LayoutNGBlockFlow {DIV} at (0,142) size 352x18
+        LayoutText {#text} at (218,1) size 133x15
+          text run at (218,1) width 133: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-deselect-update-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-deselect-update-expected.txt
new file mode 100644
index 0000000..4b56911
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-deselect-update-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 72x19
+        text run at (0,0) width 72: "Test result: "
+      LayoutMenuList {SELECT} at (71.89,0) size 58x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 56x18
+          LayoutText (anonymous) at (4,1) size 35x16
+            text run at (4,1) width 35: "PASS"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-narrow-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-narrow-width-expected.txt
new file mode 100644
index 0000000..5d070b1f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-narrow-width-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 498x19
+        text run at (0,0) width 498: "This tests that select elements with a narrow width (1px) are rendered correctly."
+      LayoutBR {BR} at (497,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 2x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 22x16
+            text run at (4,1) width 22: "test"
+      LayoutBR {BR} at (2,20) size 0x0
+      LayoutMenuList {SELECT} at (0,40) size 2x20 [bgcolor=#0000FF] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 22x16
+            text run at (4,1) width 22: "test"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-restrict-line-height-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-restrict-line-height-expected.txt
new file mode 100644
index 0000000..751daf1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-restrict-line-height-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 417x19
+        text run at (0,0) width 417: "This tests that we don't honor line-height for styled popup buttons."
+      LayoutBR {BR} at (417,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 204x20 [bgcolor=#ADD8E6] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 202x18
+          LayoutText (anonymous) at (4,1) size 182x16
+            text run at (4,1) width 182: "This text should not be clipped."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-width-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-width-change-expected.txt
new file mode 100644
index 0000000..f248a26
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-width-change-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x60
+        LayoutText {#text} at (0,0) size 663x19
+          text run at (0,0) width 663: "This tests that when an option is dynamically added to a menu list, and it is too long for the current width,"
+        LayoutBR {BR} at (663,0) size 0x0
+        LayoutText {#text} at (0,20) size 364x19
+          text run at (0,20) width 364: "that the select automatically recalculates the correct width."
+        LayoutBR {BR} at (364,20) size 0x0
+        LayoutMenuList {SELECT} at (0,40) size 135x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 133x18
+            LayoutText (anonymous) at (4,1) size 31x16
+              text run at (4,1) width 31: "Short"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,60) size 784x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/optgroup-rendering-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/optgroup-rendering-expected.txt
new file mode 100644
index 0000000..a9e43ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/optgroup-rendering-expected.txt
@@ -0,0 +1,99 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x379
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x379
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x363
+      LayoutNGBlockFlow {FORM} at (0,0) size 784x363
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (79,323) size 0x0
+        LayoutMenuList {SELECT} at (0,343) size 71x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 69x18
+            LayoutText (anonymous) at (4,1) size 33x16
+              text run at (4,1) width 33: "Three"
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 79x342 clip at (9,9) size 62x340
+  LayoutListBox {SELECT} at (0,0) size 79x342 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTGROUP} at (1,1) size 62x85 [color=#008000]
+      LayoutBlockFlow {DIV} at (0,0) size 62x17
+        LayoutText {#text} at (2,0) size 51x16
+          text run at (2,0) width 51: "Enabled"
+      LayoutBlockFlow {OPTION} at (0,17) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "One"
+      LayoutBlockFlow {OPTION} at (0,34) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "Two"
+      LayoutBlockFlow {OPTION} at (0,51) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 33x16
+          text run at (18,0) width 33: "Three"
+      LayoutBlockFlow {OPTION} at (0,68) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 26x16
+          text run at (18,0) width 26: "Four"
+    LayoutBlockFlow {OPTGROUP} at (1,86) size 62x85 [color=#FFC0CB]
+      LayoutBlockFlow {DIV} at (0,0) size 62x17
+        LayoutText {#text} at (2,0) size 54x16
+          text run at (2,0) width 54: "Disabled"
+      LayoutBlockFlow {OPTION} at (0,17) size 62x17 [color=#FF0000]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "One"
+      LayoutBlockFlow {OPTION} at (0,34) size 62x17 [color=#FF0000]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "Two"
+      LayoutBlockFlow {OPTION} at (0,51) size 62x17 [color=#FF0000]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 33x16
+          text run at (18,0) width 33: "Three"
+      LayoutBlockFlow {OPTION} at (0,68) size 62x17 [color=#FF0000]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 26x16
+          text run at (18,0) width 26: "Four"
+    LayoutBlockFlow {OPTGROUP} at (1,171) size 62x85 [color=#008000]
+      LayoutBlockFlow {DIV} at (0,0) size 62x17
+        LayoutText {#text} at (2,0) size 58x16
+          text run at (2,0) width 58: "Enabled2"
+      LayoutBlockFlow {OPTION} at (0,17) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "One"
+      LayoutBlockFlow {OPTION} at (0,34) size 62x17 [color=#FF0000]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 24x16
+          text run at (18,0) width 24: "Two"
+      LayoutBlockFlow {OPTION} at (0,51) size 62x17 [color=#FFFFFF] [bgcolor=#999999]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 33x16
+          text run at (18,0) width 33: "Three"
+      LayoutBlockFlow {OPTION} at (0,68) size 62x17 [color=#0000FF]
+        LayoutInline {<pseudo:before>} at (0,0) size 16x16
+          LayoutTextFragment (anonymous) at (2,0) size 16x16
+            text run at (2,0) width 16: "    "
+        LayoutText {#text} at (18,0) size 26x16
+          text run at (18,0) width 26: "Four"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-index-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-index-expected.txt
new file mode 100644
index 0000000..1722da4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-index-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 741x39
+          text run at (0,0) width 741: "This test makes sure we don't crash when trying to get the index of an option element that has no corresponding select"
+          text run at (0,20) width 53: "element."
+      LayoutNGBlockFlow {DIV} at (0,40) size 784x40
+        LayoutText {#text} at (0,0) size 77x19
+          text run at (0,0) width 77: "Test Passed."
+        LayoutBR {BR} at (76,0) size 0x0
+        LayoutText {#text} at (0,20) size 370x19
+          text run at (0,20) width 370: "Index for option element with no corresponding select is: 0"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-text-clip-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-text-clip-expected.txt
new file mode 100644
index 0000000..731c45f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/option-text-clip-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 697x19
+        text run at (0,0) width 697: "This tests that the option text is clipped properly, and doesn't spill over into the arrow part of the popup control."
+      LayoutBR {BR} at (696,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 150x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 148x18
+          LayoutText (anonymous) at (4,1) size 147x16
+            text run at (4,1) width 147: "12345 6789 ABCD EFGH"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-align-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-align-expected.txt
new file mode 100644
index 0000000..3dae9af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-align-expected.txt
@@ -0,0 +1,43 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 575x19
+          text run at (0,0) width 575: "The following select elements should all be rendered on the left, with their text left justified."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x100
+        LayoutMenuList {SELECT} at (0,0) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,15) size 0x0
+        LayoutMenuList {SELECT} at (0,20) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,35) size 0x0
+        LayoutMenuList {SELECT} at (0,40) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,55) size 0x0
+        LayoutMenuList {SELECT} at (0,60) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (300,75) size 0x0
+        LayoutMenuList {SELECT} at (0,80) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,136) size 784x20
+        LayoutMenuList {SELECT} at (0,0) size 300x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 298x18
+            LayoutText (anonymous) at (4,1) size 174x16
+              text run at (4,1) width 174: "This is should be left justified."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-baseline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-baseline-expected.txt
new file mode 100644
index 0000000..04fc14c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-baseline-expected.txt
@@ -0,0 +1,49 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 462x19
+        text run at (0,0) width 462: "This tests that empty select controls and buttons have the correct baseline."
+      LayoutBR {BR} at (462,0) size 0x0
+      LayoutMenuList {SELECT} at (0,21) size 22x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 4x16
+            text run at (4,1) width 4: " "
+      LayoutText {#text} at (22,21) size 29x19
+        text run at (22,21) width 29: " test "
+      LayoutMenuList {SELECT} at (51,21) size 44x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 42x18
+          LayoutText (anonymous) at (4,1) size 22x16
+            text run at (4,1) width 22: "test"
+      LayoutText {#text} at (95,21) size 4x19
+        text run at (95,21) width 4: " "
+      LayoutMenuList {SELECT} at (99,21) size 22x20 [color=#00008B] [bgcolor=#ADD8E6] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 20x18
+          LayoutText (anonymous) at (4,1) size 4x16
+            text run at (4,1) width 4: " "
+      LayoutText {#text} at (121,21) size 29x19
+        text run at (121,21) width 29: " test "
+      LayoutMenuList {SELECT} at (150,21) size 44x20 [color=#00008B] [bgcolor=#ADD8E6] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 42x18
+          LayoutText (anonymous) at (4,1) size 22x16
+            text run at (4,1) width 22: "test"
+      LayoutText {#text} at (194,21) size 4x19
+        text run at (194,21) width 4: " "
+      LayoutButton {BUTTON} at (198,33) size 16x6 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      LayoutText {#text} at (214,21) size 4x19
+        text run at (214,21) width 4: " "
+      LayoutButton {BUTTON} at (218,20) size 38x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 22x16
+          LayoutText {#text} at (0,0) size 22x16
+            text run at (0,0) width 22: "test"
+      LayoutText {#text} at (256,21) size 4x19
+        text run at (256,21) width 4: " "
+      LayoutButton {BUTTON} at (260,33) size 16x6 [color=#00008B] [bgcolor=#ADD8E6] [border: (2px outset #C0C0C0)]
+      LayoutText {#text} at (276,21) size 4x19
+        text run at (276,21) width 4: " "
+      LayoutButton {BUTTON} at (280,20) size 38x22 [color=#00008B] [bgcolor=#ADD8E6] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 22x16
+          LayoutText {#text} at (0,0) size 22x16
+            text run at (0,0) width 22: "test"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-block-background-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-block-background-expected.txt
new file mode 100644
index 0000000..7fb3065e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-block-background-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 539x19
+          text run at (0,0) width 539: "This tests that backgrounds for list box items draw correctly when a list box is a block"
+        LayoutBR {BR} at (539,0) size 0x0
+layer at (8,28) size 54x70 clip at (9,29) size 37x68
+  LayoutListBox {SELECT} at (0,20) size 54x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 37x17 [color=#FFFFFF] [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 33x16
+        text run at (2,0) width 33: "Item1"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-listbox-to-popup-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-listbox-to-popup-expected.txt
new file mode 100644
index 0000000..d43e567
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-listbox-to-popup-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 441x19
+        text run at (0,0) width 441: "This tests that you can dynamically change a list box to a popup menu"
+      LayoutBR {BR} at (441,0) size 0x0
+      LayoutMenuList {SELECT} at (0,20) size 226x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 224x18
+          LayoutText (anonymous) at (4,1) size 204x16
+            text run at (4,1) width 204: "This should turn into a popup menu"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-popup-to-listbox-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-popup-to-listbox-expected.txt
new file mode 100644
index 0000000..a869658
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-change-popup-to-listbox-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 445x19
+        text run at (0,0) width 445: "This tests that you can dynamically change a popup menu to a list box."
+      LayoutBR {BR} at (445,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 196x87 clip at (9,29) size 179x85
+  LayoutListBox {SELECT} at (0,20) size 196x87 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {OPTION} at (1,1) size 179x17 [color=#FFFFFF] [bgcolor=#999999]
+      LayoutText {#text} at (2,0) size 175x16
+        text run at (2,0) width 175: "This should turn into a list box"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-size-invalid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-size-invalid-expected.txt
new file mode 100644
index 0000000..ea1a0f93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-size-invalid-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 783x39
+        text run at (0,0) width 783: "This tests that a malformed size attribute will be parsed and corrected so that the right size attribute value is used to match the"
+        text run at (0,20) width 406: "style rule that determines whether to use a menu list or a list box."
+      LayoutBR {BR} at (406,20) size 0x0
+      LayoutMenuList {SELECT} at (0,40) size 44x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+        LayoutNGBlockFlow (anonymous) at (1,1) size 42x18
+          LayoutText (anonymous) at (4,1) size 22x16
+            text run at (4,1) width 22: "test"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-visual-hebrew-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-visual-hebrew-expected.txt
new file mode 100644
index 0000000..251f31a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-visual-hebrew-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 619x19
+          text run at (0,0) width 619: "This tests that native pop-ups are rendered in logical order even in visually-ordered Hebrew pages."
+      LayoutNGBlockFlow {P} at (0,54) size 784x20
+        LayoutText {#text} at (0,0) size 381x19
+          text run at (0,0) width 381: "Text on the pop-up and in the list should look like this: \x{5E8}\x{5D5}\x{5EA}\x{5E4}\x{5DB}"
+      LayoutNGBlockFlow (anonymous) at (0,90) size 784x20
+        LayoutMenuList {SELECT} at (0,0) size 53x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
+          LayoutNGBlockFlow (anonymous) at (1,1) size 51x18
+            LayoutText (anonymous) at (4,1) size 31x16
+              text run at (4,1) width 31 RTL: "\x{5DB}\x{5E4}\x{5EA}\x{5D5}\x{5E8}"
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,44) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,36) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/submit/submit-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/submit/submit-appearance-basic-expected.txt
new file mode 100644
index 0000000..ff21110
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/submit/submit-appearance-basic-expected.txt
@@ -0,0 +1,65 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x241
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x241
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x225
+      LayoutButton {INPUT} at (4,4) size 34x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 18x16
+          LayoutText {#text} at (0,0) size 18x16
+            text run at (0,0) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (42,5) size 0x0
+      LayoutButton {INPUT} at (4,34) size 36x24 [bgcolor=#C0C0C0] [border: (3px solid #00FF00)]
+        LayoutNGBlockFlow (anonymous) at (9,4) size 18x16
+          LayoutText {#text} at (0,0) size 18x16
+            text run at (0,0) width 18: "foo"
+      LayoutText {#text} at (44,36) size 4x19
+        text run at (44,36) width 4: " "
+      LayoutButton {INPUT} at (52,35) size 34x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 18x16
+          LayoutText {#text} at (0,0) size 18x16
+            text run at (0,0) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (90,36) size 0x0
+      LayoutButton {INPUT} at (4,66) size 34x22 [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 18x16
+          LayoutText {#text} at (0,0) size 18x16
+            text run at (0,0) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (42,67) size 0x0
+      LayoutButton {INPUT} at (4,96) size 34x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 18x16
+          LayoutText {#text} at (0,0) size 18x16
+            text run at (0,0) width 18: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (42,97) size 0x0
+      LayoutButton {INPUT} at (4,132) size 38x25 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 22x19
+          LayoutText {#text} at (0,0) size 22x18
+            text run at (0,0) width 22: "foo"
+      LayoutText {#text} at (46,135) size 4x19
+        text run at (46,135) width 4: " "
+      LayoutButton {INPUT} at (54,128) size 44x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 28x24
+          LayoutText {#text} at (0,0) size 28x23
+            text run at (0,0) width 28: "foo"
+      LayoutText {#text} at (102,135) size 4x19
+        text run at (102,135) width 4: " "
+      LayoutButton {INPUT} at (110,126) size 49x34 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (8,3) size 33x28
+          LayoutText {#text} at (0,0) size 33x27
+            text run at (0,0) width 33: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (163,135) size 0x0
+      LayoutButton {INPUT} at (6,180.50) size 52x33 [bgcolor=#C0C0C0] [border: (3px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (12,4.50) size 28x24
+          LayoutText {#text} at (0,0) size 28x23
+            text run at (0,0) width 28: "foo"
+      LayoutText {#text} at (64,189) size 4x19
+        text run at (64,189) width 4: " "
+      LayoutButton {INPUT} at (76,172) size 70x45 [bgcolor=#C0C0C0] [border: (4px outset #C0C0C0)]
+        LayoutNGBlockFlow (anonymous) at (16,6) size 38x33
+          LayoutText {#text} at (0,0) size 38x32
+            text run at (0,0) width 38: "foo"
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (154,189) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/tabbing-input-iframe-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/tabbing-input-iframe-expected.txt
new file mode 100644
index 0000000..1f5edb0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/tabbing-input-iframe-expected.txt
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 442x19
+        text run at (0,0) width 442: "This tests that you can tab out of a text field if an iframe comes after it."
+      LayoutBR {BR} at (442,0) size 0x0
+      LayoutTextControl {INPUT} at (0,156) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,157) size 4x19
+        text run at (154,157) width 4: " "
+      LayoutText {#text} at (460,157) size 4x19
+        text run at (460,157) width 4: " "
+      LayoutTextControl {INPUT} at (464,156) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,167) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (166,28) size 302x152
+  LayoutIFrame {IFRAME} at (158,20) size 302x152 [border: (1px solid #000000)]
+    layer at (0,0) size 300x150
+      LayoutView at (0,0) size 300x150
+    layer at (0,0) size 300x150
+      LayoutNGBlockFlow {HTML} at (0,0) size 300x150
+        LayoutNGBlockFlow {BODY} at (8,8) size 284x134
+layer at (474,167) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 135x16
+      text run at (0,0) width 135: "This should have focus"
+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 7 {INPUT} of body
+selection end:   position 22 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 7 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-bkcolor-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-bkcolor-expected.txt
new file mode 100644
index 0000000..43b145d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-bkcolor-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 564x19
+        text run at (0,0) width 564: "This tests that background color and background images can be set on the new text fields."
+      LayoutBR {BR} at (564,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFC0CB] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (154,21) size 0x0
+      LayoutTextControl {INPUT} at (0,42) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 117x16
+      text run at (0,0) width 117: "This should be pink."
+layer at (10,53) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-default-bkcolor-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-default-bkcolor-expected.txt
new file mode 100644
index 0000000..6428a33e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-default-bkcolor-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#800080]
+      LayoutText {#text} at (0,0) size 469x19
+        text run at (0,0) width 469: "This tests that the default background color for the new text fields is white."
+      LayoutBR {BR} at (469,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 123x16
+      text run at (0,0) width 123: "This should be white."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-disabled-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-disabled-expected.txt
new file mode 100644
index 0000000..99253ef8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-disabled-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 393x19
+        text run at (0,0) width 393: "This tests that text can not be inserted into a disabled text field."
+      LayoutBR {BR} at (393,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 73x16
+      text run at (0,0) width 73: "Test Passed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-readonly-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-readonly-expected.txt
new file mode 100644
index 0000000..d9c40e9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-readonly-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 396x19
+        text run at (0,0) width 396: "This tests that text can not be inserted into a readonly text field."
+      LayoutBR {BR} at (396,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 73x16
+      text run at (0,0) width 73: "Test Passed"
+caret: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 2 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-selection-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-selection-expected.txt
new file mode 100644
index 0000000..679aff4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-selection-expected.txt
@@ -0,0 +1,82 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 638
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x638 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x638
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x614
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 335x19
+          text run at (0,0) width 335: "This tests the selection methods on the new text field."
+      LayoutNGBlockFlow {P} at (0,36) size 769x22
+        LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,74) size 769x540
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutText {#text} at (0,20) size 196x19
+          text run at (0,20) width 196: "Test 1: setSelectionRange(0, 0)"
+        LayoutBR {BR} at (195,20) size 0x0
+        LayoutText {#text} at (0,40) size 47x19
+          text run at (0,40) width 47: "Passed."
+        LayoutBR {BR} at (47,40) size 0x0
+        LayoutBR {BR} at (0,60) size 0x0
+        LayoutText {#text} at (0,80) size 160x19
+          text run at (0,80) width 160: "Test 2: selectionEnd = 17"
+        LayoutBR {BR} at (159,80) size 0x0
+        LayoutText {#text} at (0,100) size 47x19
+          text run at (0,100) width 47: "Passed."
+        LayoutBR {BR} at (47,100) size 0x0
+        LayoutBR {BR} at (0,120) size 0x0
+        LayoutText {#text} at (0,140) size 155x19
+          text run at (0,140) width 155: "Test 3: selectionStart = 1"
+        LayoutBR {BR} at (154,140) size 0x0
+        LayoutText {#text} at (0,160) size 47x19
+          text run at (0,160) width 47: "Passed."
+        LayoutBR {BR} at (47,160) size 0x0
+        LayoutBR {BR} at (0,180) size 0x0
+        LayoutText {#text} at (0,200) size 204x19
+          text run at (0,200) width 204: "Test 4: setSelectionRange(10, 3)"
+        LayoutBR {BR} at (203,200) size 0x0
+        LayoutText {#text} at (0,220) size 47x19
+          text run at (0,220) width 47: "Passed."
+        LayoutBR {BR} at (47,220) size 0x0
+        LayoutBR {BR} at (0,240) size 0x0
+        LayoutText {#text} at (0,260) size 152x19
+          text run at (0,260) width 152: "Test 5: selectionEnd = 2"
+        LayoutBR {BR} at (151,260) size 0x0
+        LayoutText {#text} at (0,280) size 47x19
+          text run at (0,280) width 47: "Passed."
+        LayoutBR {BR} at (47,280) size 0x0
+        LayoutBR {BR} at (0,300) size 0x0
+        LayoutText {#text} at (0,320) size 196x19
+          text run at (0,320) width 196: "Test 6: setSelectionRange(5, 4)"
+        LayoutBR {BR} at (195,320) size 0x0
+        LayoutText {#text} at (0,340) size 47x19
+          text run at (0,340) width 47: "Passed."
+        LayoutBR {BR} at (47,340) size 0x0
+        LayoutBR {BR} at (0,360) size 0x0
+        LayoutText {#text} at (0,380) size 206x19
+          text run at (0,380) width 206: "Test 7: setSelectionRange(-5, -4)"
+        LayoutBR {BR} at (205,380) size 0x0
+        LayoutText {#text} at (0,400) size 47x19
+          text run at (0,400) width 47: "Passed."
+        LayoutBR {BR} at (47,400) size 0x0
+        LayoutBR {BR} at (0,420) size 0x0
+        LayoutText {#text} at (0,440) size 209x19
+          text run at (0,440) width 209: "Test 8: setSelectionRange(-5, 80)"
+        LayoutBR {BR} at (208,440) size 0x0
+        LayoutText {#text} at (0,460) size 47x19
+          text run at (0,460) width 47: "Passed."
+        LayoutBR {BR} at (47,460) size 0x0
+        LayoutBR {BR} at (0,480) size 0x0
+        LayoutText {#text} at (0,500) size 204x19
+          text run at (0,500) width 204: "Test 9: setSelectionRange(3, 12)"
+        LayoutBR {BR} at (203,500) size 0x0
+        LayoutText {#text} at (0,520) size 47x19
+          text run at (0,520) width 47: "Passed."
+        LayoutBR {BR} at (47,520) size 0x0
+      LayoutNGBlockFlow {P} at (0,630) size 769x0
+layer at (10,47) size 150x16 scrollWidth 151
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 150x16
+      text run at (0,0) width 150: "123456789 ABCDEFGHIJ"
+selection start: position 3 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 1 {P} of body
+selection end:   position 12 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 1 {P} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-width-expected.txt
new file mode 100644
index 0000000..3c702ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-width-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 344x19
+        text run at (0,0) width 344: "This tests that the new text fields use the correct width."
+      LayoutBR {BR} at (344,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (154,21) size 0x0
+      LayoutTextControl {INPUT} at (0,42) size 200x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (200,43) size 0x0
+      LayoutTextControl {INPUT} at (0,64) size 334x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (334,65) size 0x0
+      LayoutTextControl {INPUT} at (0,86) size 200x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (200,87) size 0x0
+      LayoutTextControl {INPUT} at (0,108) size 94x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (94,109) size 0x0
+layer at (10,31) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (10,53) size 196x16
+  LayoutBlockFlow {DIV} at (2,3) size 196x16
+    LayoutText {#text} at (0,0) size 108x16
+      text run at (0,0) width 108: "styled width 200px"
+layer at (10,75) size 330x16
+  LayoutBlockFlow {DIV} at (2,3) size 330x16
+    LayoutText {#text} at (0,0) size 42x16
+      text run at (0,0) width 42: "size 50"
+layer at (10,97) size 196x16
+  LayoutBlockFlow {DIV} at (2,3) size 196x16
+    LayoutText {#text} at (0,0) size 171x16
+      text run at (0,0) width 171: "styled width 200px & size=10"
+layer at (10,119) size 90x16
+  LayoutBlockFlow {DIV} at (2,3) size 90x16
+    LayoutText {#text} at (0,0) size 42x16
+      text run at (0,0) width 42: "size 10"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-baseline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-baseline-expected.txt
new file mode 100644
index 0000000..5f517c5c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-baseline-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 289x19
+        text run at (0,0) width 289: "This tests that text fields get the right baseline."
+      LayoutBR {BR} at (289,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutTextControl {INPUT} at (0,40) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,41) size 420x19
+        text run at (154,41) width 420: "This text should line up with the bottom of the text in the text field."
+      LayoutBR {BR} at (574,41) size 0x0
+      LayoutBR {BR} at (0,62) size 0x0
+      LayoutTextControl {INPUT} at (0,82) size 154x128 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,167) size 420x19
+        text run at (154,167) width 420: "This text should line up with the bottom of the text in the text field."
+layer at (10,51) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+layer at (10,93) size 150x122
+  LayoutBlockFlow {DIV} at (2,3) size 150x122
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-disabled-color-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-disabled-color-expected.txt
new file mode 100644
index 0000000..0a206ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-disabled-color-expected.txt
@@ -0,0 +1,177 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 509x19
+        text run at (0,0) width 509: "This tests that the text color changes appropriately when the text field is disabled."
+      LayoutBR {BR} at (509,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,21) size 4x19
+        text run at (154,21) width 4: " "
+      LayoutTextControl {INPUT} at (158,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,21) size 0x0
+      LayoutTextControl {INPUT} at (0,42) size 154x22 [color=#FF0000] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,43) size 4x19
+        text run at (154,43) width 4: " "
+      LayoutTextControl {INPUT} at (158,42) size 154x22 [color=#FF0000] [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,43) size 0x0
+      LayoutTextControl {INPUT} at (0,64) size 154x22 [color=#545454] [bgcolor=#0000FF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,65) size 4x19
+        text run at (154,65) width 4: " "
+      LayoutTextControl {INPUT} at (158,64) size 154x22 [bgcolor=#0000FF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,65) size 0x0
+      LayoutTextControl {INPUT} at (0,86) size 154x22 [color=#FF0000] [bgcolor=#0000FF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,87) size 4x19
+        text run at (154,87) width 4: " "
+      LayoutTextControl {INPUT} at (158,86) size 154x22 [color=#FF0000] [bgcolor=#0000FF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,87) size 0x0
+      LayoutTextControl {INPUT} at (0,108) size 154x22 [color=#545454] [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,109) size 4x19
+        text run at (154,109) width 4: " "
+      LayoutTextControl {INPUT} at (158,108) size 154x22 [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,109) size 0x0
+      LayoutTextControl {INPUT} at (0,130) size 154x22 [color=#FFFFFF] [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,131) size 4x19
+        text run at (154,131) width 4: " "
+      LayoutTextControl {INPUT} at (158,130) size 154x22 [color=#FFFFFF] [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,131) size 0x0
+      LayoutTextControl {INPUT} at (0,152) size 154x22 [color=#545454] [bgcolor=#808080] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,153) size 4x19
+        text run at (154,153) width 4: " "
+      LayoutTextControl {INPUT} at (158,152) size 154x22 [bgcolor=#808080] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,153) size 0x0
+      LayoutTextControl {INPUT} at (0,174) size 154x22 [color=#FFFFFF] [bgcolor=#A9A9A9] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,175) size 4x19
+        text run at (154,175) width 4: " "
+      LayoutTextControl {INPUT} at (158,174) size 154x22 [color=#FFFFFF] [bgcolor=#A9A9A9] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,175) size 0x0
+      LayoutTextControl {INPUT} at (0,196) size 154x22 [color=#808080] [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,197) size 4x19
+        text run at (154,197) width 4: " "
+      LayoutTextControl {INPUT} at (158,196) size 154x22 [color=#808080] [bgcolor=#000000] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,197) size 0x0
+      LayoutTextControl {INPUT} at (0,218) size 154x22 [color=#FF0000] [bgcolor=#808080] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,219) size 4x19
+        text run at (154,219) width 4: " "
+      LayoutTextControl {INPUT} at (158,218) size 154x22 [color=#FF0000] [bgcolor=#808080] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,219) size 0x0
+      LayoutTextControl {INPUT} at (0,240) size 154x22 [color=#808080] [bgcolor=#FF0000] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,241) size 4x19
+        text run at (154,241) width 4: " "
+      LayoutTextControl {INPUT} at (158,240) size 154x22 [color=#808080] [bgcolor=#FF0000] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,241) size 0x0
+      LayoutTextControl {INPUT} at (0,262) size 154x22 [color=#FF0000] [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,263) size 4x19
+        text run at (154,263) width 4: " "
+      LayoutTextControl {INPUT} at (158,262) size 154x22 [color=#FF0000] [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,263) size 0x0
+      LayoutTextControl {INPUT} at (0,284) size 154x22 [color=#FF0000] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (154,285) size 4x19
+        text run at (154,285) width 4: " "
+      LayoutTextControl {INPUT} at (158,284) size 154x22 [color=#FF0000] [border: (2px inset #EEEEEE)]
+      LayoutBR {BR} at (312,285) size 0x0
+layer at (10,31) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,31) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,53) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,53) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,75) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,75) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,97) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,97) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,119) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,119) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,141) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,141) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,163) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,163) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,185) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,185) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,207) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,207) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,229) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,229) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,251) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,251) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,273) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,273) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
+layer at (10,295) size 150x16 scrollWidth 380
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 380x16
+      text run at (0,0) width 380: "The text in this disabled field should displayed as dimmed or grey"
+layer at (168,295) size 150x16 scrollWidth 168
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 167x16
+      text run at (0,0) width 167: "This text field is not disabled"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-readonly-dimmed-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-readonly-dimmed-expected.txt
new file mode 100644
index 0000000..7398b65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-readonly-dimmed-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 451x19
+        text run at (0,0) width 451: "This tests that the border of a readonly text field should appear dimmed."
+      LayoutBR {BR} at (451,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,31) size 150x16 scrollWidth 175
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 175x16
+      text run at (0,0) width 175: "This border should be dimmed"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-spaces-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-spaces-expected.txt
new file mode 100644
index 0000000..85edbfe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-spaces-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 776x39
+        text run at (0,0) width 776: "This tests that leading and trailing spaces in a text field don't get lost. There should be 3 spaces before and 3 spaces after the"
+        text run at (0,20) width 98: "text in the field."
+      LayoutBR {BR} at (98,20) size 0x0
+      LayoutTextControl {INPUT} at (0,40) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,51) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 64x16
+      text run at (0,0) width 64: "   foo bar   "
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-table-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-table-expected.txt
new file mode 100644
index 0000000..64ecdd8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-table-expected.txt
@@ -0,0 +1,98 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 720
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x720 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x720
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x704
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 246x19
+          text run at (0,0) width 246: "This tests minMaxWidth for text fields."
+      LayoutNGBlockFlow {P} at (0,36) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 1"
+      LayoutTable {TABLE} at (0,72) size 118x40 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 112x34
+          LayoutTableRow {TR} at (0,2) size 112x30
+            LayoutNGTableCell {TD} at (2,2) size 108x30 [border: (3px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 100x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutNGBlockFlow {P} at (0,128) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 2"
+      LayoutTable {TABLE} at (0,164) size 166x72 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 160x66
+          LayoutTableRow {TR} at (0,2) size 160x30
+            LayoutNGTableCell {TD} at (2,6) size 46x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,5) size 24x19
+                text run at (1,5) width 24: "first"
+            LayoutNGTableCell {TD} at (50,2) size 108x30 [border: (3px solid #FF0000)] [r=0 c=1 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 100x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutTableRow {TR} at (0,34) size 160x30
+            LayoutNGTableCell {TD} at (2,38) size 46x22 [r=1 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,5) size 44x19
+                text run at (1,5) width 44: "second"
+            LayoutNGTableCell {TD} at (50,34) size 108x30 [border: (3px solid #FF0000)] [r=1 c=1 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 100x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutNGBlockFlow {P} at (0,252) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 3"
+      LayoutTable {TABLE} at (0,288) size 54x80 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 48x74
+          LayoutTableRow {TR} at (0,2) size 48x70
+            LayoutNGTableCell {TD} at (2,2) size 44x70 [border: (3px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (4,4) size 36x39
+                text run at (4,4) width 36: "width"
+                text run at (4,24) width 32: "30px"
+              LayoutTextControl {INPUT} at (4,44) size 30x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutNGBlockFlow {P} at (0,384) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 4"
+      LayoutTable {TABLE} at (0,420) size 218x70 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 212x64
+          LayoutTableRow {TR} at (0,2) size 212x30
+            LayoutNGTableCell {TD} at (2,2) size 208x30 [border: (3px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 200x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutTableRow {TR} at (0,34) size 212x28
+            LayoutNGTableCell {TD} at (2,34) size 208x28 [border: (3px solid #FF0000)] [r=1 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (4,4) size 200x20
+                LayoutText {#text} at (0,0) size 40x19
+                  text run at (0,0) width 40: "200px"
+      LayoutNGBlockFlow {P} at (0,506) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 5"
+      LayoutTable {TABLE} at (0,542) size 88x40 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 82x34
+          LayoutTableRow {TR} at (0,2) size 82x30
+            LayoutNGTableCell {TD} at (2,2) size 78x30 [border: (3px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 70x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutNGBlockFlow {P} at (0,598) size 769x20
+        LayoutText {#text} at (0,0) size 69x19
+          text run at (0,0) width 69: "Test case 6"
+      LayoutTable {TABLE} at (0,634) size 172x70 [border: (3px solid #0000FF)]
+        LayoutTableSection {TBODY} at (3,3) size 166x64
+          LayoutTableRow {TR} at (0,2) size 166x30
+            LayoutNGTableCell {TD} at (2,2) size 162x30 [border: (3px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+              LayoutTextControl {INPUT} at (4,4) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+          LayoutTableRow {TR} at (0,34) size 166x28
+            LayoutNGTableCell {TD} at (2,34) size 162x28 [border: (3px solid #FF0000)] [r=1 c=0 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (4,4) size 70x20
+                LayoutText {#text} at (0,0) size 32x19
+                  text run at (0,0) width 32: "70px"
+layer at (19,92) size 96x16
+  LayoutBlockFlow {DIV} at (2,3) size 96x16
+layer at (67,184) size 96x16
+  LayoutBlockFlow {DIV} at (2,3) size 96x16
+layer at (67,216) size 96x16
+  LayoutBlockFlow {DIV} at (2,3) size 96x16
+layer at (19,348) size 26x16
+  LayoutBlockFlow {DIV} at (2,3) size 26x16
+layer at (19,440) size 196x16
+  LayoutBlockFlow {DIV} at (2,3) size 196x16
+    LayoutText {#text} at (0,0) size 67x16
+      text run at (0,0) width 67: "width 100%"
+layer at (19,562) size 66x16
+  LayoutBlockFlow {DIV} at (2,3) size 66x16
+    LayoutText {#text} at (0,0) size 57x16
+      text run at (0,0) width 57: "max 70px"
+layer at (19,654) size 150x16 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 94x16
+      text run at (0,0) width 94: "min-width 100px"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-text-scroll-left-on-blur-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-text-scroll-left-on-blur-expected.txt
index c695e76..642553d 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-text-scroll-left-on-blur-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-text-scroll-left-on-blur-expected.txt
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   LayoutView at (0,0) size 800x600
-layer at (0,0) size 800x102
-  LayoutNGBlockFlow {HTML} at (0,0) size 800x102
-    LayoutNGBlockFlow {BODY} at (8,8) size 784x78
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
       LayoutNGBlockFlow (anonymous) at (0,0) size 784x22
         LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
         LayoutText {#text} at (154,1) size 4x19
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-basic-expected.txt
new file mode 100644
index 0000000..d0f5c5f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-basic-expected.txt
@@ -0,0 +1,75 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x241
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x241
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x225
+      LayoutTextControl {INPUT} at (4,4) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (162,5) size 0x0
+      LayoutTextControl {INPUT} at (4,34) size 156x24 [bgcolor=#FFFFFF] [border: (3px solid #00FF00)]
+      LayoutText {#text} at (164,36) size 4x19
+        text run at (164,36) width 4: " "
+      LayoutTextControl {INPUT} at (172,35) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (330,36) size 0x0
+      LayoutTextControl {INPUT} at (4,66) size 154x22 [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (162,67) size 0x0
+      LayoutTextControl {INPUT} at (4,96) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (162,97) size 0x0
+      LayoutTextControl {INPUT} at (4,132) size 180x25 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (188,135) size 4x19
+        text run at (188,135) width 4: " "
+      LayoutTextControl {INPUT} at (196,128) size 229x30 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (429,135) size 4x19
+        text run at (429,135) width 4: " "
+      LayoutTextControl {INPUT} at (437,126) size 278x34 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (719,135) size 0x0
+      LayoutTextControl {INPUT} at (6,180.50) size 231x33 [bgcolor=#FFFFFF] [border: (3px inset #EEEEEE)]
+      LayoutText {#text} at (243,189) size 4x19
+        text run at (243,189) width 4: " "
+      LayoutTextControl {INPUT} at (255,172) size 308x45 [bgcolor=#FFFFFF] [border: (4px inset #EEEEEE)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (571,189) size 0x0
+layer at (14,15) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (15,46) size 150x16
+  LayoutBlockFlow {DIV} at (3,4) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (182,46) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (14,77) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (14,107) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 18x16
+      text run at (0,0) width 18: "foo"
+layer at (14,143) size 176x19
+  LayoutBlockFlow {DIV} at (2,3) size 176x19
+    LayoutText {#text} at (0,0) size 22x18
+      text run at (0,0) width 22: "foo"
+layer at (206,139) size 225x24
+  LayoutBlockFlow {DIV} at (2,3) size 225x24
+    LayoutText {#text} at (0,0) size 28x23
+      text run at (0,0) width 28: "foo"
+layer at (447,137) size 274x28
+  LayoutBlockFlow {DIV} at (2,3) size 274x28
+    LayoutText {#text} at (0,0) size 33x27
+      text run at (0,0) width 33: "foo"
+layer at (17,193) size 225x24
+  LayoutBlockFlow {DIV} at (3,4.50) size 225x24
+    LayoutText {#text} at (0,0) size 28x23
+      text run at (0,0) width 28: "foo"
+layer at (267,186) size 300x33
+  LayoutBlockFlow {DIV} at (4,6) size 300x33
+    LayoutText {#text} at (0,0) size 38x32
+      text run at (0,0) width 38: "foo"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-datalist-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-datalist-expected.txt
new file mode 100644
index 0000000..47ed8ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/text-appearance-datalist-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x60
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x60
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x44
+      LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+          LayoutDetailsMarker {DIV} at (132.14,1.33) size 17.86x13.33: down
+      LayoutText {#text} at (154,1) size 4x19
+        text run at (154,1) width 4: " "
+      LayoutTextControl {INPUT} at (158,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+          LayoutDetailsMarker {DIV} at (132.14,1.33) size 17.86x13.33: down
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (312,1) size 0x0
+      LayoutTextControl {INPUT} at (0,22) size 154x22 [color=#545454] [bgcolor=#EBEBE4] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+      LayoutText {#text} at (154,23) size 4x19
+        text run at (154,23) width 4: " "
+      LayoutTextControl {INPUT} at (158,22) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutFlexibleBox {DIV} at (2,3) size 150x16
+          LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+      LayoutText {#text} at (0,0) size 0x0
+layer at (10,11) size 132x16
+  LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+layer at (168,11) size 132x16
+  LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+layer at (10,33) size 132x16
+  LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+layer at (168,33) size 132x16
+  LayoutBlockFlow {DIV} at (0,0) size 132.14x16
+hidden layer at (142,34) size 18x14 transparent
+  LayoutDetailsMarker {DIV} at (132.14,1.33) size 17.86x13.33: down
+hidden layer at (300,34) size 18x14 transparent
+  LayoutDetailsMarker {DIV} at (132.14,1.33) size 17.86x13.33: down
+caret: position 0 of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/textfield-outline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/textfield-outline-expected.txt
new file mode 100644
index 0000000..d4461c9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/textfield-outline-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 550x19
+        text run at (0,0) width 550: "This tests that a negative outline-offset won't get in the way of a cursor in a text control."
+      LayoutBR {BR} at (549,0) size 0x0
+      LayoutTextControl {INPUT} at (0,20) size 227x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+layer at (9,30) size 225x24 scrollWidth 547
+  LayoutBlockFlow {DIV} at (1,2) size 225x24
+    LayoutText {#text} at (0,0) size 546x23
+      text run at (0,0) width 546: "abcThis tests that typing doesn't cut holes in the focus outline"
+caret: position 3 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/reset-textarea-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/reset-textarea-expected.txt
new file mode 100644
index 0000000..8d1faae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/reset-textarea-expected.txt
@@ -0,0 +1,35 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {FORM} at (0,0) size 784x42
+        LayoutText {#text} at (179,21) size 4x19
+          text run at (179,21) width 4: " "
+        LayoutText {#text} at (362,21) size 4x19
+          text run at (362,21) width 4: " "
+        LayoutButton {INPUT} at (366,20) size 50x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          LayoutNGBlockFlow (anonymous) at (8,3) size 34x16
+            LayoutText {#text} at (0,0) size 34x16
+              text run at (0,0) width 34: "Reset"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,58) size 784x80
+        LayoutText {#text} at (0,0) size 354x19
+          text run at (0,0) width 354: "This test verifies that textarea controls are properly reset."
+        LayoutBR {BR} at (354,0) size 0x0
+        LayoutText {#text} at (0,20) size 469x19
+          text run at (0,20) width 469: "You should see two element IDs below, and the word \"SUCCESS\" twice:"
+        LayoutBR {BR} at (468,20) size 0x0
+        LayoutText {#text} at (0,40) size 170x19
+          text run at (0,40) width 170: "noDefaultText: SUCCESS"
+        LayoutBR {BR} at (169,40) size 0x0
+        LayoutText {#text} at (0,60) size 175x19
+          text run at (0,60) width 175: "hasDefaultText: SUCCESS"
+layer at (8,8) size 179x36 clip at (9,9) size 177x34
+  LayoutTextControl {TEXTAREA} at (0,0) size 179x36 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+layer at (191,8) size 179x36 clip at (192,9) size 177x34
+  LayoutTextControl {TEXTAREA} at (183,0) size 179x36 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+      LayoutText {#text} at (0,0) size 96x16
+        text run at (0,0) width 96: "Default Text"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textAreaLineHeight-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textAreaLineHeight-expected.txt
new file mode 100644
index 0000000..c0d716a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textAreaLineHeight-expected.txt
@@ -0,0 +1,77 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1241
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x1241 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x1241.33
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x1217.33
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 269x19
+          text run at (0,0) width 269: "line-height settings not reflected in textarea"
+        LayoutBR {BR} at (269,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,36) size 769x271
+        LayoutText {#text} at (0,0) size 86x19
+          text run at (0,0) width 86: "TEXTAREA"
+        LayoutBR {BR} at (85,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (406,211) size 0x0
+        LayoutBR {BR} at (0,231) size 0x0
+        LayoutText {#text} at (0,251) size 151x19
+          text run at (0,251) width 151: "PARAGRAPH - works"
+      LayoutNGBlockFlow {P} at (0,323) size 402x202 [border: (1px dotted #C0C0C0)]
+        LayoutText {#text} at (1,19) size 382x69
+          text run at (1,19) width 382: "Demo text here that wraps a bit and should demonstrate"
+          text run at (1,72) width 182: "the goodness of line-height"
+      LayoutNGBlockFlow (anonymous) at (0,538.33) size 769x40
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutText {#text} at (0,20) size 81x19
+          text run at (0,20) width 81: "DIV - works"
+        LayoutBR {BR} at (80,20) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,578.33) size 402x202 [border: (1px dotted #C0C0C0)]
+        LayoutText {#text} at (1,19) size 382x69
+          text run at (1,19) width 382: "Demo text here that wraps a bit and should demonstrate"
+          text run at (1,72) width 182: "the goodness of line-height"
+      LayoutNGBlockFlow (anonymous) at (0,780.33) size 769x437
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+        LayoutText {#text} at (0,40) size 123x19
+          text run at (0,40) width 123: "Un-Styled Textarea"
+        LayoutBR {BR} at (122,40) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (181,83) size 0x0
+        LayoutBR {BR} at (0,103) size 0x0
+        LayoutText {#text} at (0,123) size 213x19
+          text run at (0,123) width 213: "Totally Blank Un-Styled Textarea"
+        LayoutBR {BR} at (212,123) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (181,166) size 0x0
+        LayoutBR {BR} at (0,186) size 0x0
+        LayoutText {#text} at (0,206) size 211x19
+          text run at (0,206) width 211: "Totally Blank STYLED Textarea"
+        LayoutBR {BR} at (210,206) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,1233.33) size 769x0
+layer at (8,64) size 406x206 clip at (9,65) size 404x204
+  LayoutTextControl {TEXTAREA} at (0,20) size 406x206 [bgcolor=#FFFFFF] [border: (1px dotted #C0C0C0)]
+    LayoutBlockFlow {DIV} at (3,3) size 400x106
+      LayoutText {#text} at (0,18) size 387x69
+        text run at (0,18) width 382: "Demo text here that wraps a bit and should demonstrate"
+        text run at (382,18) width 5: " "
+        text run at (0,71) width 182: "the goodness of line-height"
+layer at (8,848) size 181x38 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 scrollHeight 84
+  LayoutTextControl {TEXTAREA} at (0,60) size 181x38 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 160x80
+      LayoutText {#text} at (0,0) size 160x80
+        text run at (0,0) width 152: "Demo text here that"
+        text run at (152,0) width 8: " "
+        text run at (0,16) width 120: "wraps a bit and"
+        text run at (120,16) width 8: " "
+        text run at (0,32) width 144: "should demonstrate"
+        text run at (144,32) width 8: " "
+        text run at (0,48) width 120: "the goodness of"
+        text run at (120,48) width 8: " "
+        text run at (0,64) width 88: "line-height"
+layer at (8,931) size 181x38 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutTextControl {TEXTAREA} at (0,143) size 181x38 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+layer at (8,1014) size 406x206 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutTextControl {TEXTAREA} at (0,226) size 406x206 [bgcolor=#FFFFFF] [border: (1px dotted #C0C0C0)]
+    LayoutBlockFlow {DIV} at (3,3) size 400x53
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-appearance-basic-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-appearance-basic-expected.txt
new file mode 100644
index 0000000..d24ff56
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-appearance-basic-expected.txt
@@ -0,0 +1,74 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x453
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x453
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x437
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (189,31) size 0x0
+      LayoutText {#text} at (193,86) size 4x19
+        text run at (193,86) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (386,86) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (189,137) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (189,188) size 0x0
+      LayoutText {#text} at (229,251) size 4x19
+        text run at (229,251) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (309,324) size 0x0
+      LayoutText {#text} at (276,417) size 4x19
+        text run at (276,417) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (643,417) size 0x0
+layer at (12,12) size 181x38 clip at (13,13) size 179x36
+  LayoutTextControl {TEXTAREA} at (4,4) size 181x38 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+      LayoutText {#text} at (0,0) size 24x16
+        text run at (0,0) width 24: "foo"
+layer at (12,63) size 185x42 clip at (15,66) size 179x36
+  LayoutTextControl {TEXTAREA} at (4,55) size 185x42 [bgcolor=#FFFFFF] [border: (3px solid #00FF00)]
+    LayoutBlockFlow {DIV} at (5,5) size 175x16
+      LayoutText {#text} at (0,0) size 24x16
+        text run at (0,0) width 24: "foo"
+layer at (209,67) size 181x38 clip at (210,68) size 179x36
+  LayoutTextControl {TEXTAREA} at (201,59) size 181x38 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+      LayoutText {#text} at (0,0) size 24x16
+        text run at (0,0) width 24: "foo"
+layer at (12,118) size 181x38 clip at (13,119) size 179x36
+  LayoutTextControl {TEXTAREA} at (4,110) size 181x38 [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+      LayoutText {#text} at (0,0) size 24x16
+        text run at (0,0) width 24: "foo"
+layer at (12,169) size 181x38 clip at (13,170) size 179x36
+  LayoutTextControl {TEXTAREA} at (4,161) size 181x38 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 175x16
+      LayoutText {#text} at (0,0) size 24x16
+        text run at (0,0) width 24: "foo"
+layer at (12,228) size 221x42 clip at (13,229) size 219x40
+  LayoutTextControl {TEXTAREA} at (4,220) size 221x42 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 215x18
+      LayoutText {#text} at (0,0) size 30x18
+        text run at (0,0) width 30: "foo"
+layer at (245,220) size 261x50 clip at (246,221) size 259x48
+  LayoutTextControl {TEXTAREA} at (237,212) size 261x50 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 255x22
+      LayoutText {#text} at (0,0) size 36x22
+        text run at (0,0) width 36: "foo"
+layer at (12,283) size 301x60 clip at (13,284) size 299x58
+  LayoutTextControl {TEXTAREA} at (4,275) size 301x60 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 295x27
+      LayoutText {#text} at (0,0) size 42x27
+        text run at (0,0) width 42: "foo"
+layer at (14,381) size 264x53 clip at (16,383) size 261x50
+  LayoutTextControl {TEXTAREA} at (6,373) size 264x53 [bgcolor=#FFFFFF] [border: (1.50px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (4.50,4.50) size 255x22
+      LayoutText {#text} at (0,0) size 36x22
+        text run at (0,0) width 36: "foo"
+layer at (296,360) size 347x72 clip at (298,362) size 343x68
+  LayoutTextControl {TEXTAREA} at (288,352) size 347x72 [bgcolor=#FFFFFF] [border: (2px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (6,6) size 335x30
+      LayoutText {#text} at (0,0) size 48x30
+        text run at (0,0) width 48: "foo"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrollbar-expected.txt
new file mode 100644
index 0000000..11014b6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrollbar-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 438x19
+        text run at (0,0) width 438: "This tests that a scrollbar will appear when text overflows the textarea"
+      LayoutBR {BR} at (438,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 179x100 clip at (9,29) size 162x98 scrollHeight 146
+  LayoutTextControl {TEXTAREA} at (0,20) size 179x100 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 160x144
+      LayoutText {#text} at (0,0) size 8x64
+        text run at (0,0) width 8: "1"
+        text run at (8,0) width 0: " "
+        text run at (0,16) width 8: "2"
+        text run at (8,16) width 0: " "
+        text run at (0,32) width 8: "3"
+        text run at (8,32) width 0: " "
+        text run at (0,48) width 8: "4"
+        text run at (8,48) width 0: " "
+      LayoutText {#text} at (0,64) size 8x16
+        text run at (0,64) width 8: "5"
+      LayoutText {#text} at (8,64) size 0x16
+        text run at (8,64) width 0: " "
+      LayoutText {#text} at (0,80) size 8x16
+        text run at (0,80) width 8: "6"
+      LayoutText {#text} at (8,80) size 0x16
+        text run at (8,80) width 0: " "
+      LayoutText {#text} at (0,96) size 8x16
+        text run at (0,96) width 8: "7"
+      LayoutText {#text} at (8,96) size 0x16
+        text run at (8,96) width 0: " "
+      LayoutText {#text} at (0,112) size 8x16
+        text run at (0,112) width 8: "8"
+      LayoutText {#text} at (8,112) size 0x16
+        text run at (8,112) width 0: " "
+      LayoutBR {BR} at (0,128) size 0x16
+caret: position 0 of child 9 {BR} of child 0 {DIV} of {#document-fragment} of child 3 {TEXTAREA} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrolled-type-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrolled-type-expected.txt
new file mode 100644
index 0000000..74c6b31b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrolled-type-expected.txt
@@ -0,0 +1,58 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x136
+        LayoutText {#text} at (0,0) size 502x19
+          text run at (0,0) width 502: "This tests that typing in a scrolled textarea does not cause unnecessary scrolling."
+        LayoutBR {BR} at (502,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (179,121) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,136) size 784x0
+layer at (8,28) size 179x116 clip at (9,29) size 162x114 scrollY 224.00 scrollHeight 338
+  LayoutTextControl {TEXTAREA} at (0,20) size 179x116 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
+    LayoutBlockFlow {DIV} at (3,3) size 160x336
+      LayoutText {#text} at (0,0) size 56x320
+        text run at (0,0) width 8: "1"
+        text run at (8,0) width 0: " "
+        text run at (0,16) width 8: "2"
+        text run at (8,16) width 0: " "
+        text run at (0,32) width 8: "3"
+        text run at (8,32) width 0: " "
+        text run at (0,48) width 8: "4"
+        text run at (8,48) width 0: " "
+        text run at (0,64) width 8: "5"
+        text run at (8,64) width 0: " "
+        text run at (0,80) width 8: "6"
+        text run at (8,80) width 0: " "
+        text run at (0,96) width 8: "7"
+        text run at (8,96) width 0: " "
+        text run at (0,112) width 8: "8"
+        text run at (8,112) width 0: " "
+        text run at (0,128) width 8: "9"
+        text run at (8,128) width 0: " "
+        text run at (0,144) width 16: "10"
+        text run at (16,144) width 0: " "
+        text run at (0,160) width 16: "11"
+        text run at (16,160) width 0: " "
+        text run at (0,176) width 16: "12"
+        text run at (16,176) width 0: " "
+        text run at (0,192) width 16: "13"
+        text run at (16,192) width 0: " "
+        text run at (0,208) width 16: "14"
+        text run at (16,208) width 0: " "
+        text run at (0,224) width 16: "15"
+        text run at (16,224) width 0: " "
+        text run at (0,240) width 16: "16"
+        text run at (16,240) width 0: " "
+        text run at (0,256) width 16: "17"
+        text run at (16,256) width 0: " "
+        text run at (0,272) width 56: "18 Pass"
+        text run at (56,272) width 0: " "
+        text run at (0,288) width 16: "19"
+        text run at (16,288) width 0: " "
+        text run at (0,304) width 16: "20"
+        text run at (16,304) width 0: " "
+      LayoutBR {BR} at (0,320) size 0x16
+caret: position 49 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {TEXTAREA} of body
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/visual-hebrew-text-field-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/visual-hebrew-text-field-expected.txt
new file mode 100644
index 0000000..21a50bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/visual-hebrew-text-field-expected.txt
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 212x19
+          text run at (0,0) width 212: "This tests for a regression against "
+        LayoutInline {I} at (0,0) size 770x39
+          LayoutInline {A} at (0,0) size 348x19 [color=#0000EE]
+            LayoutText {#text} at (212,0) size 348x19
+              text run at (212,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=8076"
+          LayoutText {#text} at (559,0) size 770x39
+            text run at (559,0) width 211: " REGRESSION: native text fields"
+            text run at (0,20) width 249: "are reversed on \"visual Hebrew\" pages"
+        LayoutText {#text} at (248,20) size 5x19
+          text run at (248,20) width 5: "."
+      LayoutNGBlockFlow {P} at (0,74) size 784x20
+        LayoutText {#text} at (0,0) size 272x19
+          text run at (0,0) width 272: "Text in the field should look like this: \x{5E8}\x{5D5}\x{5EA}\x{5E4}\x{5DB}"
+      LayoutNGBlockFlow (anonymous) at (0,110) size 784x22
+        LayoutTextControl {INPUT} at (0,0) size 154x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,64) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,56) size 784x2 [border: (1px inset #EEEEEE)]
+layer at (10,121) size 150x16
+  LayoutBlockFlow {DIV} at (2,3) size 150x16
+    LayoutText {#text} at (0,0) size 31x16
+      text run at (0,0) width 31 RTL: "\x{5DB}\x{5E4}\x{5EA}\x{5D5}\x{5E8}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/001-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/001-expected.txt
new file mode 100644
index 0000000..21ac4258
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/001-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584 [color=#FFFFFF] [bgcolor=#000000]
+      LayoutText {#text} at (0,0) size 522x19
+        text run at (0,0) width 522: "The three red squares below should all look the same and be filled only with black."
+      LayoutBR {BR} at (522,0) size 0x0
+      LayoutText {#text} at (170,175) size 4x19
+        text run at (170,175) width 4: " "
+      LayoutText {#text} at (344,175) size 4x19
+        text run at (344,175) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 170x170
+  LayoutIFrame {IFRAME} at (0,20) size 170x170 [border: (10px solid #FF0000)]
+    layer at (0,0) size 100x100
+      LayoutView at (0,0) size 100x100
+    layer at (0,0) size 100x100
+      LayoutNGBlockFlow {HTML} at (0,0) size 100x100
+        LayoutNGBlockFlow {BODY} at (8,8) size 84x84
+layer at (182,28) size 170x170
+  LayoutEmbeddedObject {OBJECT} at (174,20) size 170x170 [border: (10px solid #FF0000)]
+    layer at (0,0) size 100x100
+      LayoutView at (0,0) size 100x100
+    layer at (0,0) size 100x100
+      LayoutNGBlockFlow {HTML} at (0,0) size 100x100
+        LayoutNGBlockFlow {BODY} at (8,8) size 84x84
+layer at (356,28) size 170x170
+  LayoutEmbeddedObject {OBJECT} at (348,20) size 170x170 [border: (10px solid #FF0000)]
+    layer at (0,0) size 100x100
+      LayoutView at (0,0) size 100x100
+    layer at (0,0) size 100x100
+      LayoutNGBlockFlow {HTML} at (0,0) size 100x100
+        LayoutNGBlockFlow {BODY} at (8,8) size 84x84
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/iframe-scrolling-attribute-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/iframe-scrolling-attribute-expected.txt
new file mode 100644
index 0000000..5dcbc022
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/iframe-scrolling-attribute-expected.txt
@@ -0,0 +1,137 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 699
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x699 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x699
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x683
+      LayoutNGBlockFlow {P} at (0,0) size 769x40
+        LayoutText {#text} at (0,0) size 219x19
+          text run at (0,0) width 219: "This page tests the behavior of the "
+        LayoutInline {TT} at (0,0) size 72x16
+          LayoutText {#text} at (219,3) size 72x16
+            text run at (219,3) width 72: "scrolling"
+        LayoutText {#text} at (291,0) size 79x19
+          text run at (291,0) width 79: " attribute on "
+        LayoutInline {TT} at (0,0) size 64x16
+          LayoutText {#text} at (370,3) size 64x16
+            text run at (370,3) width 64: "<iframe>"
+        LayoutText {#text} at (434,0) size 767x39
+          text run at (434,0) width 333: " elements which contain a page large enough to need"
+          text run at (0,20) width 88: "to be scrolled."
+      LayoutNGBlockFlow (anonymous) at (0,56) size 769x627
+        LayoutText {#text} at (204,189) size 4x19
+          text run at (204,189) width 4: " "
+        LayoutText {#text} at (412,189) size 4x19
+          text run at (412,189) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (204,398) size 4x19
+          text run at (204,398) width 4: " "
+        LayoutText {#text} at (412,398) size 4x19
+          text run at (412,398) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (204,607) size 4x19
+          text run at (204,607) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,64) size 204x204
+  LayoutIFrame {IFRAME} at (0,0) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (216,64) size 204x204
+  LayoutIFrame {IFRAME} at (208,0) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (424,64) size 204x204
+  LayoutIFrame {IFRAME} at (416,0) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (8,273) size 204x204
+  LayoutIFrame {IFRAME} at (0,209) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (216,273) size 204x204
+  LayoutIFrame {IFRAME} at (208,209) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (424,273) size 204x204
+  LayoutIFrame {IFRAME} at (416,209) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 200x492 backgroundClip at (0,0) size 200x200 clip at (0,0) size 200x200
+      LayoutNGBlockFlow {HTML} at (0,0) size 200x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 184x476
+          LayoutNGBlockFlow {P} at (0,0) size 184x60
+            LayoutText {#text} at (0,0) size 178x59
+              text run at (0,0) width 178: "This page is large enough to"
+              text run at (0,20) width 145: "need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (8,482) size 204x204 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutIFrame {IFRAME} at (0,418) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
+layer at (216,482) size 204x204 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutIFrame {IFRAME} at (208,418) size 204x204 [border: (2px inset #EEEEEE)]
+    layer at (0,0) size 200x200 clip at (0,0) size 185x185 scrollWidth 408 scrollHeight 492
+      LayoutView at (0,0) size 200x200
+    layer at (0,0) size 185x492 backgroundClip at (0,0) size 185x185 clip at (0,0) size 185x185
+      LayoutNGBlockFlow {HTML} at (0,0) size 185x492
+        LayoutNGBlockFlow {BODY} at (8,8) size 169x476
+          LayoutNGBlockFlow {P} at (0,0) size 169x60
+            LayoutText {#text} at (0,0) size 162x59
+              text run at (0,0) width 162: "This page is large enough"
+              text run at (0,20) width 161: "to need to be scrolled in a"
+              text run at (0,40) width 100: "200x200 frame."
+          LayoutNGBlockFlow {DIV} at (0,76) size 400x400 [bgcolor=#0000FF]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-expected.txt
new file mode 100644
index 0000000..f74cc93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x510
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x510
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x494
+      LayoutNGBlockFlow {DIV} at (20,20) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (242,227) size 4x19
+        text run at (242,227) width 4: " "
+      LayoutNGBlockFlow {DIV} at (266,20) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (488,227) size 4x19
+        text run at (488,227) width 4: " "
+      LayoutNGBlockFlow {DIV} at (512,20) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (734,227) size 0x0
+      LayoutNGBlockFlow {DIV} at (20,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (242,474) size 4x19
+        text run at (242,474) width 4: " "
+      LayoutNGBlockFlow {DIV} at (266,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (488,474) size 4x19
+        text run at (488,474) width 4: " "
+      LayoutNGBlockFlow {DIV} at (512,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-out-of-range-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-out-of-range-expected.txt
new file mode 100644
index 0000000..54c65da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/conic-gradient-out-of-range-expected.txt
@@ -0,0 +1,56 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 290x19
+          text run at (0,0) width 290: "All gradients in a row should render the same."
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x194
+        LayoutNGBlockFlow {DIV} at (5,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (92,77) size 4x19
+          text run at (92,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (101,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (188,77) size 4x19
+          text run at (188,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (197,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (284,77) size 4x19
+          text run at (284,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (293,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (380,77) size 4x19
+          text run at (380,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (389,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (476,77) size 4x19
+          text run at (476,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (485,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (572,77) size 4x19
+          text run at (572,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (581,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (668,77) size 4x19
+          text run at (668,77) width 4: " "
+        LayoutNGBlockFlow {DIV} at (677,5) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (764,77) size 0x0
+        LayoutNGBlockFlow {DIV} at (5,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (92,174) size 4x19
+          text run at (92,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (101,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (188,174) size 4x19
+          text run at (188,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (197,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (284,174) size 4x19
+          text run at (284,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (293,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (380,174) size 4x19
+          text run at (380,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (389,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (476,174) size 4x19
+          text run at (476,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (485,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (572,174) size 4x19
+          text run at (572,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (581,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (668,174) size 4x19
+          text run at (668,174) width 4: " "
+        LayoutNGBlockFlow {DIV} at (677,102) size 82x82 [border: (1px solid #808080)]
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/css3-radial-gradients4-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/css3-radial-gradients4-expected.txt
new file mode 100644
index 0000000..1c278c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/css3-radial-gradients4-expected.txt
@@ -0,0 +1,197 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x504
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x504
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x488
+      LayoutNGBlockFlow {DIV} at (2,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,41) size 4x19
+        text run at (86,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,41) size 4x19
+        text run at (176,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,41) size 4x19
+        text run at (266,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,41) size 4x19
+        text run at (356,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,41) size 4x19
+        text run at (446,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,41) size 4x19
+        text run at (536,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,41) size 4x19
+        text run at (626,41) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,2) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,41) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,102) size 4x19
+        text run at (86,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,102) size 4x19
+        text run at (176,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,102) size 4x19
+        text run at (266,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,102) size 4x19
+        text run at (356,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,102) size 4x19
+        text run at (446,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,102) size 4x19
+        text run at (536,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,102) size 4x19
+        text run at (626,102) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,63) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,102) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,163) size 4x19
+        text run at (86,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,163) size 4x19
+        text run at (176,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,163) size 4x19
+        text run at (266,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,163) size 4x19
+        text run at (356,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,163) size 4x19
+        text run at (446,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,163) size 4x19
+        text run at (536,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,163) size 4x19
+        text run at (626,163) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,124) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,163) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,224) size 4x19
+        text run at (86,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,224) size 4x19
+        text run at (176,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,224) size 4x19
+        text run at (266,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,224) size 4x19
+        text run at (356,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,224) size 4x19
+        text run at (446,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,224) size 4x19
+        text run at (536,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,224) size 4x19
+        text run at (626,224) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,185) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,224) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,285) size 4x19
+        text run at (86,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,285) size 4x19
+        text run at (176,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,285) size 4x19
+        text run at (266,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,285) size 4x19
+        text run at (356,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,285) size 4x19
+        text run at (446,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,285) size 4x19
+        text run at (536,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,285) size 4x19
+        text run at (626,285) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,246) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,285) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,346) size 4x19
+        text run at (86,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,346) size 4x19
+        text run at (176,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,346) size 4x19
+        text run at (266,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,346) size 4x19
+        text run at (356,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,346) size 4x19
+        text run at (446,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,346) size 4x19
+        text run at (536,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,346) size 4x19
+        text run at (626,346) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,307) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,346) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,407) size 4x19
+        text run at (86,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,407) size 4x19
+        text run at (176,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,407) size 4x19
+        text run at (266,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,407) size 4x19
+        text run at (356,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,407) size 4x19
+        text run at (446,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,407) size 4x19
+        text run at (536,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,407) size 4x19
+        text run at (626,407) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,368) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,407) size 0x0
+      LayoutNGBlockFlow {DIV} at (2,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (86,468) size 4x19
+        text run at (86,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (92,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (176,468) size 4x19
+        text run at (176,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (182,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (266,468) size 4x19
+        text run at (266,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (272,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (356,468) size 4x19
+        text run at (356,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (362,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (446,468) size 4x19
+        text run at (446,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (452,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (536,468) size 4x19
+        text run at (536,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (542,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (626,468) size 4x19
+        text run at (626,468) width 4: " "
+      LayoutNGBlockFlow {DIV} at (632,429) size 82x52 [border: (1px solid #000000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,468) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/repeating-conic-gradient-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/repeating-conic-gradient-expected.txt
new file mode 100644
index 0000000..4652d18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/gradients/repeating-conic-gradient-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x510
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x510
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x494
+      LayoutNGBlockFlow {DIV} at (20,20) size 202x202 [bgcolor=#00AACC] [border: (1px solid #808080)]
+      LayoutText {#text} at (242,227) size 4x19
+        text run at (242,227) width 4: " "
+      LayoutNGBlockFlow {DIV} at (266,20) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (488,227) size 4x19
+        text run at (488,227) width 4: " "
+      LayoutNGBlockFlow {DIV} at (512,20) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (734,227) size 0x0
+      LayoutNGBlockFlow {DIV} at (20,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (242,474) size 4x19
+        text run at (242,474) width 4: " "
+      LayoutNGBlockFlow {DIV} at (266,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (488,474) size 4x19
+        text run at (488,474) width 4: " "
+      LayoutNGBlockFlow {DIV} at (512,267) size 202x202 [border: (1px solid #808080)]
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/003-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/003-expected.txt
new file mode 100644
index 0000000..737518f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/003-expected.txt
@@ -0,0 +1,58 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutInline {FONT} at (0,0) size 89x19 [color=#FF0000]
+          LayoutInline {I} at (0,0) size 89x19
+            LayoutText {#text} at (0,0) size 89x19
+              text run at (0,0) width 89: "Italic and Red"
+        LayoutInline {I} at (0,0) size 0x0
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x20
+        LayoutNGBlockFlow {P} at (0,0) size 784x20
+          LayoutInline {FONT} at (0,0) size 93x19 [color=#FF0000]
+            LayoutText {#text} at (0,0) size 93x19
+              text run at (0,0) width 93: "Italic and Red "
+          LayoutText {#text} at (93,0) size 64x19
+            text run at (93,0) width 64: "Just italic."
+      LayoutNGBlockFlow (anonymous) at (0,72) size 784x20
+        LayoutInline {I} at (0,0) size 67x19
+          LayoutText {#text} at (0,0) size 67x19
+            text run at (0,0) width 67: "Italic only."
+        LayoutText {#text} at (66,0) size 37x19
+          text run at (66,0) width 37: " Plain"
+      LayoutNGBlockFlow {P} at (0,108) size 784x20
+        LayoutText {#text} at (0,0) size 126x19
+          text run at (0,0) width 126: "I should not be red. "
+        LayoutInline {FONT} at (0,0) size 123x19 [color=#FF0000]
+          LayoutText {#text} at (126,0) size 34x19
+            text run at (126,0) width 34: "Red. "
+          LayoutInline {I} at (0,0) size 89x19
+            LayoutText {#text} at (160,0) size 89x19
+              text run at (160,0) width 89: "Italic and red."
+      LayoutNGBlockFlow (anonymous) at (0,144) size 784x0
+        LayoutInline {FONT} at (0,0) size 0x0 [color=#FF0000]
+          LayoutInline {I} at (0,0) size 0x0
+            LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow {P} at (0,144) size 784x20
+        LayoutInline {FONT} at (0,0) size 123x19 [color=#FF0000]
+          LayoutInline {I} at (0,0) size 93x19
+            LayoutText {#text} at (0,0) size 93x19
+              text run at (0,0) width 93: "Italic and red. "
+          LayoutText {#text} at (92,0) size 31x19
+            text run at (92,0) width 31: "Red."
+        LayoutText {#text} at (122,0) size 127x19
+          text run at (122,0) width 127: " I should not be red."
+      LayoutNGBlockFlow (anonymous) at (0,180) size 784x20
+        LayoutInline {B} at (0,0) size 131x19
+          LayoutText {#text} at (0,0) size 36x19
+            text run at (0,0) width 36: "Bold "
+          LayoutInline {I} at (0,0) size 95x19
+            LayoutText {#text} at (36,0) size 95x19
+              text run at (36,0) width 95: "Bold and italic"
+        LayoutInline {I} at (0,0) size 75x19
+          LayoutText {#text} at (131,0) size 75x19
+            text run at (131,0) width 75: " Only Italic "
+        LayoutText {#text} at (206,0) size 32x19
+          text run at (206,0) width 32: "Plain"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/012-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/012-expected.txt
new file mode 100644
index 0000000..2ac257044
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/012-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {CENTER} at (0,0) size 784x20
+        LayoutInline {FONT} at (0,0) size 296x19
+          LayoutText {#text} at (244,0) size 296x19
+            text run at (244,0) width 296: "You should see a 100x100 green Image below."
+      LayoutNGBlockFlow (anonymous) at (0,20) size 784x100
+        LayoutInline {FONT} at (0,0) size 100x100
+          LayoutNGBlockFlow {IMG} at (0,0) size 100x100 [bgcolor=#008000]
+          LayoutText {#text} at (0,0) size 0x0
+      LayoutTable {TABLE} at (0,120) size 6x6
+        LayoutTableSection {TBODY} at (0,0) size 6x6
+          LayoutTableRow {TR} at (0,2) size 6x2
+            LayoutNGTableCell {TD} at (2,2) size 2x2 [r=0 c=0 rs=1 cs=1]
+      LayoutNGBlockFlow (anonymous) at (0,126) size 784x0
+        LayoutInline {FONT} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+layer at (8,28) size 100x100 clip at (9,29) size 98x98
+  LayoutNGBlockFlow {SPAN} at (0,0) size 100x100 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 96x20
+      LayoutInline {SPAN} at (0,0) size 39x19
+        LayoutText {#text} at (16,0) size 39x19
+          text run at (16,0) width 39: "Image"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/016-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/016-expected.txt
new file mode 100644
index 0000000..1731da2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/016-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 732x19
+          text run at (0,0) width 732: "You should see two 100x100 green squares with black borders below. If you see only one square, the test has failed."
+      LayoutNGBlockFlow {P} at (0,36) size 784x104
+        LayoutNGBlockFlow {IMG} at (0,0) size 104x104 [bgcolor=#008000] [border: (2px solid #000000)]
+layer at (10,46) size 100x100 clip at (11,47) size 98x98
+  LayoutNGBlockFlow {SPAN} at (2,2) size 100x100 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 96x0
+      LayoutInline {SPAN} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/019-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/019-expected.txt
new file mode 100644
index 0000000..3878637
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/019-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x579
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutInline {B} at (0,0) size 0x0
+          LayoutInline {NOBR} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x69
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+          LayoutInline {B} at (0,0) size 761x39
+            LayoutInline {NOBR} at (0,0) size 219x19
+              LayoutText {#text} at (0,0) size 219x19
+                text run at (0,0) width 219: "This text is in a div inside a nobr"
+            LayoutText {#text} at (219,0) size 761x39
+              text run at (219,0) width 542: "More text that should not be in the nobr, i.e., the nobr should have closed the div"
+              text run at (0,20) width 122: "inside it implicitly."
+        LayoutNGBlockFlow {PRE} at (0,53) size 784x16
+          LayoutText {#text} at (0,0) size 272x16
+            text run at (0,0) width 272: "A pre tag outside everything else."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/table-residual-style-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/table-residual-style-crash-expected.txt
new file mode 100644
index 0000000..596d6eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/table-residual-style-crash-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x576
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutInline {FONT} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutNGBlockFlow {FORM} at (0,0) size 784x0
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x0
+        LayoutInline {FONT} at (0,0) size 0x0
+      LayoutTable {TABLE} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/td-inside-object-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/td-inside-object-expected.txt
new file mode 100644
index 0000000..2876666
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/invalid/td-inside-object-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutTable {TABLE} at (0,0) size 703x105
+        LayoutTableSection {TBODY} at (0,0) size 703x105
+          LayoutTableRow {TR} at (0,2) size 703x101
+            LayoutNGTableCell {TD} at (2,41) size 293x22 [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (1,40) size 291x19
+                text run at (1,40) width 291: "This text should be to the left of the cat image."
+            LayoutNGTableCell {TD} at (297,2) size 100x101 [r=0 c=1 rs=1 cs=1]
+              LayoutImage {OBJECT} at (1,1) size 98x99
+            LayoutNGTableCell {TD} at (399,41) size 302x22 [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (1,40) size 300x19
+                text run at (1,40) width 300: "This text should be to the right of the cat image."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/layer-visibility-sublayer-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/layer-visibility-sublayer-expected.txt
new file mode 100644
index 0000000..6bd9ff3bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/layer-visibility-sublayer-expected.txt
@@ -0,0 +1,64 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBR {BR} at (0,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutBR {BR} at (0,40) size 0x0
+      LayoutBR {BR} at (0,60) size 0x0
+      LayoutText {#text} at (0,80) size 176x19
+        text run at (0,80) width 176: "24 green box with word ok:"
+      LayoutBR {BR} at (176,80) size 0x0
+      LayoutBR {BR} at (0,100) size 0x0
+      LayoutBR {BR} at (0,120) size 0x0
+      LayoutBR {BR} at (0,140) size 0x0
+      LayoutText {#text} at (0,160) size 176x19
+        text run at (0,160) width 176: "25 green box with word ok:"
+      LayoutBR {BR} at (176,160) size 0x0
+      LayoutBR {BR} at (0,180) size 0x0
+      LayoutBR {BR} at (0,200) size 0x0
+      LayoutBR {BR} at (0,220) size 0x0
+      LayoutText {#text} at (0,240) size 176x19
+        text run at (0,240) width 176: "26 green box with word ok:"
+      LayoutBR {BR} at (176,240) size 0x0
+      LayoutBR {BR} at (0,260) size 0x0
+      LayoutBR {BR} at (0,280) size 0x0
+      LayoutBR {BR} at (0,300) size 0x0
+hidden layer at (0,108) size 800x34
+  LayoutNGBlockFlow (positioned) {DIV} at (0,108) size 800x34 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,2) size 796x4 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,6) size 796x24 [border: (2px solid #008000)]
+      LayoutText {#text} at (2,2) size 16x19
+        text run at (2,2) width 16: "ok"
+hidden layer at (2,110) size 796x30
+  LayoutNGBlockFlow (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    LayoutInline {SPAN} at (0,0) size 27x19
+      LayoutText {#text} at (2,2) size 27x19
+        text run at (2,2) width 27: "blah"
+    LayoutText {#text} at (0,0) size 0x0
+hidden layer at (0,188) size 800x34
+  LayoutNGBlockFlow (positioned) {DIV} at (0,188) size 800x34 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,2) size 796x4 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,6) size 796x4 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,10) size 796x24 [border: (2px solid #008000)]
+      LayoutText {#text} at (2,2) size 16x19
+        text run at (2,2) width 16: "ok"
+hidden layer at (2,190) size 796x30
+  LayoutNGBlockFlow (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+hidden layer at (0,268) size 800x34
+  LayoutNGBlockFlow (positioned) {DIV} at (0,268) size 800x34 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,2) size 796x24 [border: (2px solid #FF0000)]
+      LayoutNGBlockFlow {DIV} at (2,2) size 792x20
+        LayoutText {#text} at (0,0) size 27x19
+          text run at (0,0) width 27: "blah"
+    LayoutNGBlockFlow {DIV} at (2,26) size 796x4 [border: (2px solid #FF0000)]
+    LayoutNGBlockFlow {DIV} at (2,30) size 796x24 [border: (2px solid #008000)]
+      LayoutText {#text} at (2,2) size 16x19
+        text run at (2,2) width 16: "ok"
+hidden layer at (2,270) size 796x30
+  LayoutNGBlockFlow (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    LayoutInline {SPAN} at (0,0) size 27x19
+      LayoutText {#text} at (2,2) size 27x19
+        text run at (2,2) width 27: "blah"
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/overflow-hidden-rounded-corners-occlusion-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/overflow-hidden-rounded-corners-occlusion-expected.txt
new file mode 100644
index 0000000..c28556b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/overflow-hidden-rounded-corners-occlusion-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x156
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x156
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x140
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 506x19
+          text run at (0,0) width 506: "Test that verifies that rounded corners with overflow:hidden composite correctly."
+        LayoutBR {BR} at (505,0) size 0x0
+        LayoutText {#text} at (0,20) size 640x19
+          text run at (0,20) width 640: "This page should show a green box with rounded corners on top of a yellow box with square corners."
+      LayoutNGBlockFlow {DIV} at (0,40) size 100x100 [bgcolor=#FFFF00]
+layer at (8,48) size 100x100
+  LayoutNGBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+    LayoutNGBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/perspective-inline-no-display-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/perspective-inline-no-display-expected.txt
new file mode 100644
index 0000000..a47f3d9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/layers/perspective-inline-no-display-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x155
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x155
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x131
+      LayoutNGBlockFlow {P} at (0,0) size 784x16
+        LayoutText {#text} at (0,0) size 496x16
+          text run at (0,0) width 496: "There should be an image below:"
+      LayoutNGBlockFlow (anonymous) at (0,32) size 784x99
+        LayoutInline {A} at (0,0) size 96x99
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,48) size 96x96
+  LayoutImage {IMG} at (0,0) size 96x96
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/media/mq-color-gamut-picture-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/media/mq-color-gamut-picture-expected.txt
new file mode 100644
index 0000000..433da40
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/media/mq-color-gamut-picture-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x501
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x501
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x485
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x485
+        LayoutInline {PICTURE} at (0,0) size 640x480
+          LayoutInline {SOURCE} at (0,0) size 0x0
+          LayoutImage {IMG} at (0,0) size 640x480
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/reflections/reflection-direction-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/reflections/reflection-direction-expected.txt
new file mode 100644
index 0000000..d87651d3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/reflections/reflection-direction-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600 scrollHeight 614
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x614 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x614
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x598
+      LayoutNGBlockFlow {DIV} at (0,1) size 671x592
+        LayoutBR {BR} at (335,296) size 0x0
+        LayoutBR {BR} at (671,592) size 0x0
+      LayoutText {#text} at (671,578) size 4x19
+        text run at (671,578) width 4: " "
+      LayoutNGBlockFlow {DIV} at (675,0) size 674x598
+        LayoutText {#text} at (335,578) size 4x19
+          text run at (335,578) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,9) size 335x296
+  LayoutImage {IMG} at (0,0) size 335x296
+layer at (344,305) size 335x296 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutImage {IMG} at (336,296) size 335x296
+layer at (683,305) size 335x296 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutImage {IMG} at (0,297) size 335x296
+layer at (1022,8) size 335x296 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutImage {IMG} at (339,0) size 335x296
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/floating-ruby-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/floating-ruby-text-expected.txt
new file mode 100644
index 0000000..fe80082
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/floating-ruby-text-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x36
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x36 [color=#FFFFFF]
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x20
+      LayoutRuby (inline) {RUBY} at (0,0) size 784x20
+        LayoutRubyRun (anonymous) at (0,0) size 784x20
+          LayoutRubyText {RT} at (0,-5) size 784x5
+            LayoutText {#text} at (372,0) size 40x5
+              text run at (372,0) width 40: "rubytext"
+          LayoutRubyBase (anonymous) at (0,0) size 784x20
+            LayoutText {#text} at (0,0) size 784x20
+              text run at (0,0) width 784: "Attempt to create a floating ruby text element. Float is not supported for"
+              text run at (0,10) width 784: "ruby text, which should be apparent from the resulting render tree."
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/positioned-ruby-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/positioned-ruby-text-expected.txt
new file mode 100644
index 0000000..8cbc458
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/positioned-ruby-text-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x46
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x46 [color=#FFFFFF]
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x30
+      LayoutRuby (inline) {RUBY} at (0,0) size 784x30
+        LayoutRubyRun (anonymous) at (0,0) size 784x30
+          LayoutRubyText {RT} at (0,-5) size 784x5
+            LayoutText {#text} at (372,0) size 40x5
+              text run at (372,0) width 40: "rubytext"
+          LayoutRubyBase (anonymous) at (0,0) size 784x30
+            LayoutText {#text} at (0,0) size 784x30
+              text run at (0,0) width 784: "Attempt to create a positioned ruby text element. Non-static position is not"
+              text run at (0,10) width 784: "supported for ruby text, which should be apparent from the resulting render"
+              text run at (0,20) width 50: "tree."
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-inline-table-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-inline-table-expected.txt
new file mode 100644
index 0000000..d01334c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-inline-table-expected.txt
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x60
+        LayoutText {#text} at (0,0) size 781x39
+          text run at (0,0) width 781: "Test that <ruby> rendered as inline-table (or somesuch) is not affected by ruby rendering. Both <div> below should look the"
+          text run at (0,20) width 36: "same."
+        LayoutBR {BR} at (36,20) size 0x0
+        LayoutBR {BR} at (0,40) size 0x0
+      LayoutNGBlockFlow {DIV} at (3.19,63.19) size 777.63x50 [bgcolor=#FFFFDD] [border: (1px solid #000000)]
+        LayoutText {#text} at (9,21) size 224x19
+          text run at (9,21) width 224: "This is some XHTML1.1 text with "
+        LayoutTable {SPAN} at (233,9) size 40x32
+          LayoutTableSection {SPAN} at (0,12) size 40x20
+            LayoutTableRow (anonymous) at (0,0) size 40x20
+              LayoutTableCell (anonymous) at (0,0) size 40x20 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (2,0) size 36x19
+                  text run at (2,0) width 36: "Ruby"
+          LayoutTableSection {SPAN} at (0,0) size 40x12
+            LayoutTableRow (anonymous) at (0,0) size 40x12
+              LayoutTableCell (anonymous) at (0,0) size 40x12 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (0,0) size 40x12
+                  text run at (0,0) width 40: "guide text"
+        LayoutText {#text} at (273,21) size 56x19
+          text run at (273,21) width 56: " markup."
+      LayoutNGBlockFlow (anonymous) at (0,116.38) size 784x20
+        LayoutBR {BR} at (0,0) size 0x0
+      LayoutNGBlockFlow {DIV} at (3.19,139.56) size 777.63x50 [bgcolor=#FFFFDD] [border: (1px solid #000000)]
+        LayoutText {#text} at (9,21) size 224x19
+          text run at (9,21) width 224: "This is some XHTML1.1 text with "
+        LayoutTable {RUBY} at (233,9) size 40x32
+          LayoutTableSection {RB} at (0,12) size 40x20
+            LayoutTableRow (anonymous) at (0,0) size 40x20
+              LayoutTableCell (anonymous) at (0,0) size 40x20 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (2,0) size 36x19
+                  text run at (2,0) width 36: "Ruby"
+          LayoutTableSection {RT} at (0,0) size 40x12
+            LayoutTableRow (anonymous) at (0,0) size 40x12
+              LayoutTableCell (anonymous) at (0,0) size 40x12 [r=0 c=0 rs=1 cs=1]
+                LayoutText {#text} at (0,0) size 40x12
+                  text run at (0,0) width 40: "guide text"
+        LayoutText {#text} at (273,21) size 56x19
+          text run at (273,21) width 56: " markup."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-text-before-child-split-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-text-before-child-split-expected.txt
new file mode 100644
index 0000000..ed51721
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/ruby-text-before-child-split-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x26
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x26 [color=#FFFFFF]
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x10
+      LayoutRuby (inline) {RUBY} at (0,0) size 20x10
+        LayoutRubyRun (anonymous) at (0,0) size 10x10
+          LayoutRubyText {RT} at (0,0) size 10x0
+          LayoutRubyBase (anonymous) at (0,0) size 10x10
+            LayoutNGBlockFlow (anonymous) at (0,0) size 10x10
+              LayoutText {#text} at (0,0) size 10x10
+                text run at (0,0) width 10: "A"
+              LayoutInline {I} at (0,0) size 0x0
+            LayoutNGBlockFlow (anonymous) at (0,10) size 10x0
+              LayoutNGBlockFlow {DIV} at (0,0) size 10x0
+            LayoutNGBlockFlow (anonymous) at (0,10) size 10x0
+              LayoutInline {I} at (0,0) size 0x0
+        LayoutRubyRun (anonymous) at (10,0) size 10x10
+          LayoutRubyBase (anonymous) at (0,0) size 10x10
+            LayoutNGBlockFlow (anonymous) at (0,0) size 10x10
+              LayoutText {#text} at (0,0) size 10x10
+                text run at (0,0) width 10: "B"
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/rubyDOM-remove-text2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/rubyDOM-remove-text2-expected.txt
new file mode 100644
index 0000000..cf6a395e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/ruby/rubyDOM-remove-text2-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 732x19
+          text run at (0,0) width 732: "The following is a test for DOM manipulation within <ruby>: Removing a ruby base object, leaving the base empty."
+      LayoutNGBlockFlow {P} at (0,36) size 784x20
+        LayoutText {#text} at (0,0) size 436x19
+          text run at (0,0) width 436: "Both lines should look identical (the first line is the one manipulated)."
+      LayoutNGBlockFlow (anonymous) at (0,72) size 784x40
+        LayoutBR {BR} at (0,0) size 0x0
+        LayoutBR {BR} at (0,20) size 0x0
+      LayoutNGBlockFlow {P} at (0,128) size 784x20
+        LayoutText {#text} at (0,0) size 155x19
+          text run at (0,0) width 155: "<ruby> is defined in the "
+        LayoutRuby (inline) {RUBY} at (0,0) size 9x20
+          LayoutRubyRun (anonymous) at (155,17) size 113.83x0
+            LayoutRubyText {RT} at (0,-12) size 113.83x12
+              LayoutText {#text} at (0,0) size 114x12
+                text run at (0,0) width 114: "Hyper-text Markup Language"
+          LayoutRubyRun (anonymous) at (268.83,0) size 8x20
+            LayoutRubyBase (anonymous) at (0,0) size 8x20
+              LayoutText {#text} at (0,0) size 8x19
+                text run at (0,0) width 8: "5"
+        LayoutText {#text} at (276,0) size 37x19
+          text run at (276,0) width 37: " spec."
+      LayoutNGBlockFlow {P} at (0,164) size 784x20
+        LayoutText {#text} at (0,0) size 155x19
+          text run at (0,0) width 155: "<ruby> is defined in the "
+        LayoutRuby (inline) {RUBY} at (0,0) size 9x20
+          LayoutRubyRun (anonymous) at (155,17) size 113.83x0
+            LayoutRubyText {RT} at (0,-12) size 113.83x12
+              LayoutText {#text} at (0,0) size 114x12
+                text run at (0,0) width 114: "Hyper-text Markup Language"
+          LayoutRubyRun (anonymous) at (268.83,0) size 8x20
+            LayoutRubyBase (anonymous) at (0,0) size 8x20
+              LayoutText {#text} at (0,0) size 8x19
+                text run at (0,0) width 8: "5"
+        LayoutText {#text} at (276,0) size 37x19
+          text run at (276,0) width 37: " spec."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/018b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/018b-expected.txt
new file mode 100644
index 0000000..e72282e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/018b-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x307
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x306.66
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x274.66
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x274.66
+        LayoutNGBlockFlow {P} at (0,0) size 784x40
+          LayoutText {#text} at (0,0) size 749x19
+            text run at (0,0) width 749: "The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:"
+          LayoutBR {BR} at (749,0) size 0x0
+          LayoutInline {STRONG} at (0,0) size 63x19
+            LayoutText {#text} at (0,20) size 63x19
+              text run at (0,20) width 63: "This text."
+        LayoutNGBlockFlow {P} at (0,56) size 784x20
+          LayoutText {#text} at (0,0) size 59x19
+            text run at (0,0) width 59: "This text."
+        LayoutTable {TABLE} at (0,92) size 111x108
+          LayoutTableSection {TBODY} at (0,0) size 111x108
+            LayoutTableRow {TR} at (0,2) size 111x80
+              LayoutNGTableCell {TD} at (2,2) size 107x80 [r=0 c=0 rs=1 cs=1]
+                LayoutTable {TABLE} at (1,1) size 105x78
+                  LayoutTableSection {TBODY} at (0,0) size 105x78
+                    LayoutTableRow {TR} at (0,2) size 105x74
+                      LayoutNGTableCell {TD} at (2,2) size 101x74 [r=0 c=0 rs=1 cs=1]
+                        LayoutNGBlockFlow {DL} at (1,17) size 99x40
+                          LayoutNGBlockFlow {DT} at (0,0) size 99x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+                          LayoutNGBlockFlow {DD} at (40,20) size 59x20
+                            LayoutText {#text} at (0,0) size 59x19
+                              text run at (0,0) width 59: "This text."
+            LayoutTableRow {TR} at (0,84) size 111x22
+              LayoutNGTableCell {TD} at (2,84) size 107x22 [r=1 c=0 rs=1 cs=1]
+                LayoutText {#text} at (1,1) size 59x19
+                  text run at (1,1) width 59: "This text."
+        LayoutNGBlockFlow {P} at (0,216) size 784x22.66
+          LayoutInline {SUB} at (0,0) size 51x16
+            LayoutText {#text} at (0,6) size 51x16
+              text run at (0,6) width 51: "This text."
+        LayoutNGBlockFlow {P} at (0,254.66) size 784x20
+          LayoutText {#text} at (0,0) size 573x19
+            text run at (0,0) width 573: "...and anything else between the top of the first paragraph and the bottom of this paragraph."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/034-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/034-expected.txt
new file mode 100644
index 0000000..80f42f8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/034-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x136
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x136
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x112
+      LayoutNGBlockFlow {DIV} at (0,0) size 784x112
+        LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+          LayoutText {#text} at (0,0) size 188x19
+            text run at (0,0) width 188: "This div contains 3 addresses:"
+        LayoutNGBlockFlow {ADDRESS} at (16,20) size 768x20 [bgcolor=#00FF00]
+          LayoutText {#text} at (0,0) size 329x19
+            text run at (0,0) width 329: "A first address that should have a green background"
+        LayoutNGBlockFlow {ADDRESS} at (16,56) size 768x20
+          LayoutText {#text} at (0,0) size 271x19
+            text run at (0,0) width 271: "A second address with normal background"
+        LayoutNGBlockFlow {ADDRESS} at (16,92) size 768x20
+          LayoutText {#text} at (0,0) size 256x19
+            text run at (0,0) width 256: "A third address with normal background"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-quirks-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-quirks-expected.txt
new file mode 100644
index 0000000..2c06adb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-quirks-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {H3} at (0,0) size 784x23
+        LayoutText {#text} at (0,0) size 466x22
+          text run at (0,0) width 466: "Test of unqualifed :hover selector in quirks parsing mode"
+      LayoutNGBlockFlow {P} at (0,41.72) size 784x20
+        LayoutText {#text} at (0,0) size 616x19
+          text run at (0,0) width 616: "Moving the mouse anywhere over the document should result no change to the background color."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-strict-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-strict-expected.txt
new file mode 100644
index 0000000..2b73ba90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/selectors/unqualified-hover-strict-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x96
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x96.44
+    LayoutNGBlockFlow {BODY} at (8,18.72) size 784x61.72
+      LayoutNGBlockFlow {H3} at (0,0) size 784x23
+        LayoutText {#text} at (0,0) size 453x22
+          text run at (0,0) width 453: "Test of unqualifed :hover selector in strict parsing mode"
+      LayoutNGBlockFlow {P} at (0,41.72) size 784x20
+        LayoutText {#text} at (0,0) size 690x19
+          text run at (0,0) width 690: "Moving the mouse anywhere over the document should result in the background color being changed to grey."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-cyr-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-cyr-expected.txt
new file mode 100644
index 0000000..0651f23
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-cyr-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 316x19
+        text run at (0,0) width 316: "CHARACTERS IN XSLT: \x{414}\x{43E}\x{431}\x{430}\x{432}\x{43B}\x{435}\x{43D}\x{43D}\x{44B}\x{439} \x{442}\x{435}\x{43A}\x{441}\x{442}"
+      LayoutBR {BR} at (315,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutText {#text} at (0,40) size 224x19
+        text run at (0,40) width 224: "SOURCE XML: \x{418}\x{441}\x{445}\x{43E}\x{434}\x{43D}\x{44B}\x{439} \x{442}\x{435}\x{43A}\x{441}\x{442}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-expected.txt
new file mode 100644
index 0000000..9299261
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 258x19
+        text run at (0,0) width 258: "CHARACTERS IN XSLT: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
+      LayoutBR {BR} at (257,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutText {#text} at (0,40) size 316x19
+        text run at (0,40) width 316: "SOURCE XML: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16-expected.txt
new file mode 100644
index 0000000..9299261
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 258x19
+        text run at (0,0) width 258: "CHARACTERS IN XSLT: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
+      LayoutBR {BR} at (257,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutText {#text} at (0,40) size 316x19
+        text run at (0,40) width 316: "SOURCE XML: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16to16-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16to16-expected.txt
new file mode 100644
index 0000000..9299261
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/xsl/xslt-enc16to16-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 258x19
+        text run at (0,0) width 258: "CHARACTERS IN XSLT: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
+      LayoutBR {BR} at (257,0) size 0x0
+      LayoutBR {BR} at (0,20) size 0x0
+      LayoutText {#text} at (0,40) size 316x19
+        text run at (0,40) width 316: "SOURCE XML: \x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}\x{E9}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-1-expected.txt
new file mode 100644
index 0000000..e535743e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-1-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {DETAILS} at (0,0) size 784x144 [border: (8px solid #555599)]
+        LayoutBlockFlow {SUMMARY} at (8,8) size 768x108 [border: (8px solid #9999CC)]
+          LayoutNGBlockFlow (anonymous) at (8,8) size 737x20
+            LayoutDetailsMarker {DIV} at (0,4.45) size 10.55x10.55: down
+            LayoutText {#text} at (16,0) size 63x19
+              text run at (16,0) width 5: " "
+              text run at (20,0) width 59: "summary"
+          LayoutBlockFlow {DETAILS} at (8,28) size 752x72 [border: (8px solid #995555)]
+            LayoutBlockFlow {SUMMARY} at (8,8) size 736x36 [border: (8px solid #CC9999)]
+              LayoutDetailsMarker {DIV} at (8,12.45) size 10.55x10.55: down
+              LayoutText {#text} at (24,8) size 283x19
+                text run at (24,8) width 5: " "
+                text run at (28,8) width 279: "nested summary (summary-deails-summary)"
+            LayoutBlockFlow {DIV} at (8,44) size 736x20
+              LayoutText {#text} at (0,0) size 197x19
+                text run at (0,0) width 197: "nested details (summary-deails)"
+        LayoutBlockFlow {DIV} at (8,116) size 768x20
+          LayoutText {#text} at (0,0) size 40x19
+            text run at (0,0) width 40: "details"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-2-expected.txt
new file mode 100644
index 0000000..14d6eb1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/details_summary/details-nested-2-expected.txt
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {DETAILS} at (0,0) size 784x144 [border: (8px solid #555599)]
+        LayoutBlockFlow {SUMMARY} at (8,8) size 768x36 [border: (8px solid #9999CC)]
+          LayoutDetailsMarker {DIV} at (8,12.45) size 10.55x10.55: down
+          LayoutText {#text} at (24,8) size 63x19
+            text run at (24,8) width 5: " "
+            text run at (28,8) width 59: "summary"
+        LayoutBlockFlow {DIV} at (8,44) size 768x92
+          LayoutBlockFlow {DETAILS} at (0,0) size 768x72 [border: (8px solid #995555)]
+            LayoutBlockFlow {SUMMARY} at (8,8) size 752x36 [border: (8px solid #CC9999)]
+              LayoutDetailsMarker {DIV} at (8,12.45) size 10.55x10.55: down
+              LayoutText {#text} at (24,8) size 265x19
+                text run at (24,8) width 5: " "
+                text run at (28,8) width 261: "nested summary (details-deails-summary)"
+            LayoutBlockFlow {DIV} at (8,44) size 752x20
+              LayoutText {#text} at (0,0) size 179x19
+                text run at (0,0) width 179: "nested details (details-deails)"
+          LayoutNGBlockFlow (anonymous) at (0,72) size 753x20
+            LayoutText {#text} at (0,0) size 40x19
+              text run at (0,0) width 40: "details"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/text_level_semantics/font-weight-bold-for-b-and-strong-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/text_level_semantics/font-weight-bold-for-b-and-strong-expected.txt
new file mode 100644
index 0000000..33ddc03
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/html/text_level_semantics/font-weight-bold-for-b-and-strong-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x216
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x216
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x184
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutInline {B} at (0,0) size 194x19
+          LayoutText {#text} at (0,0) size 194x19
+            text run at (0,0) width 194: "Should be bold per HTML5."
+      LayoutNGBlockFlow {P} at (0,36) size 784x20
+        LayoutInline {B} at (0,0) size 159x19
+          LayoutInline {B} at (0,0) size 159x19
+            LayoutText {#text} at (0,0) size 159x19
+              text run at (0,0) width 159: "Should be equally bold."
+      LayoutNGBlockFlow {P} at (0,72) size 784x20
+        LayoutInline {STRONG} at (0,0) size 194x19
+          LayoutText {#text} at (0,0) size 194x19
+            text run at (0,0) width 194: "Should be bold per HTML5."
+      LayoutNGBlockFlow {P} at (0,108) size 784x20
+        LayoutInline {STRONG} at (0,0) size 159x19
+          LayoutInline {STRONG} at (0,0) size 159x19
+            LayoutText {#text} at (0,0) size 159x19
+              text run at (0,0) width 159: "Should be equally bold."
+      LayoutNGBlockFlow {P} at (0,144) size 784x40
+        LayoutText {#text} at (0,0) size 775x39
+          text run at (0,0) width 775: "The HTML5 spec says that b and strong should render as font-weight: bold, not font-weight: bolder. The text above should"
+          text run at (0,20) width 213: "all render with the same boldness."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/frame-access-during-load-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/frame-access-during-load-expected.txt
new file mode 100644
index 0000000..25eb497
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/frame-access-during-load-expected.txt
@@ -0,0 +1,38 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x576
+      LayoutNGBlockFlow {P} at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 780x39
+          text run at (0,0) width 780: "This test verifies that accessing a frame's document while it is still loading does not prevent the load, but can access at least a"
+          text run at (0,20) width 177: "temporary empty document."
+      LayoutNGBlockFlow (anonymous) at (0,56) size 784x120
+        LayoutBR {BR} at (300,40) size 0x0
+        LayoutBR {BR} at (300,80) size 0x0
+        LayoutText {#text} at (0,80) size 164x19
+          text run at (0,80) width 164: "[object HTMLDocument]"
+        LayoutBR {BR} at (164,80) size 0x0
+        LayoutText {#text} at (0,100) size 164x19
+          text run at (0,100) width 164: "[object HTMLDocument]"
+      LayoutNGBlockFlow {P} at (0,192) size 784x20
+        LayoutText {#text} at (0,0) size 614x19
+          text run at (0,0) width 614: "If this test passes, you should see SUCCESS twice, followed by [object HTMLDocument] twice."
+layer at (8,64) size 300x40
+  LayoutIFrame {IFRAME} at (0,0) size 300x40
+    layer at (0,0) size 300x40
+      LayoutView at (0,0) size 300x40
+    layer at (0,0) size 300x40
+      LayoutNGBlockFlow {HTML} at (0,0) size 300x40
+        LayoutNGBlockFlow {BODY} at (8,8) size 284x24
+          LayoutText {#text} at (0,0) size 71x19
+            text run at (0,0) width 71: "SUCCESS"
+layer at (8,104) size 300x40
+  LayoutIFrame {IFRAME} at (0,40) size 300x40
+    layer at (0,0) size 300x40
+      LayoutView at (0,0) size 300x40
+    layer at (0,0) size 300x40
+      LayoutNGBlockFlow {HTML} at (0,0) size 300x40
+        LayoutNGBlockFlow {BODY} at (8,8) size 284x24
+          LayoutText {#text} at (0,0) size 71x19
+            text run at (0,0) width 71: "SUCCESS"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/slow-loading-image-in-pattern-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/slow-loading-image-in-pattern-expected.txt
new file mode 100644
index 0000000..a387bf37
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/http/tests/misc/slow-loading-image-in-pattern-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x56
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x56
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x40
+      LayoutText {#text} at (0,0) size 627x19
+        text run at (0,0) width 627: "This tests slow loading png images referenced from a image element inside a SVG pattern resource."
+      LayoutBR {BR} at (627,0) size 0x0
+      LayoutText {#text} at (0,20) size 561x19
+        text run at (0,20) width 561: "You should see a 400x300 rect containing a tiled rendering of the Acid3 reference image."
+layer at (10,50) size 406x306 clip at (13,53) size 400x300
+  LayoutSVGRoot (positioned) {svg} at (10,50) size 406x306
+    LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+      LayoutSVGResourcePattern {pattern} [id="pattern"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse]
+        LayoutSVGImage {image} at (0,0) size 800x600
+    LayoutSVGRect {rect} at (0,0) size 400x300 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=0.00] [width=400.00] [height=300.00]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt
new file mode 100644
index 0000000..d8aed85
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x438
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x438.39
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x414.39
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 302x19
+          text run at (0,0) width 302: "Test passes if there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (0,36) size 378.39x378.39 [border: (25px double #000000)]
+      LayoutNGBlockFlow {DIV} at (0,35.39) size 378.39x378.39 [border: (25px double #000000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt
new file mode 100644
index 0000000..4a6ed57
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x160
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x136
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 302x19
+          text run at (0,0) width 302: "Test passes if there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (0,36) size 100x100
+      LayoutNGBlockFlow {DIV} at (0,36) size 50x50 [bgcolor=#000000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt
new file mode 100644
index 0000000..f54a557
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x200
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x200
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x176
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 302x19
+          text run at (0,0) width 302: "Test passes if there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (0,36) size 140x140 [bgcolor=#FF0000] [border: (10px solid #000000)]
+      LayoutNGBlockFlow {DIV} at (20,56) size 100x100 [bgcolor=#000000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt
new file mode 100644
index 0000000..5bc4157
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x290
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x290.38
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x266.38
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 511x19
+          text run at (0,0) width 511: "Test passes if the box has rounded corners and there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (0,36) size 230.38x230.38 [border: (19.19px solid #FF0000)]
+      LayoutNGBlockFlow {DIV} at (0,35.98) size 230.38x230.38 [border: (19.19px solid #008000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt
new file mode 100644
index 0000000..5bc4157
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x290
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x290.38
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x266.38
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 511x19
+          text run at (0,0) width 511: "Test passes if the box has rounded corners and there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (0,36) size 230.38x230.38 [border: (19.19px solid #FF0000)]
+      LayoutNGBlockFlow {DIV} at (0,35.98) size 230.38x230.38 [border: (19.19px solid #008000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt
new file mode 100644
index 0000000..d05c705
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x180
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x180
+    LayoutNGBlockFlow {BODY} at (8,16) size 784x156
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 302x19
+          text run at (0,0) width 302: "Test passes if there is no red visible on the page."
+      LayoutNGBlockFlow {DIV} at (40,36) size 120x120 [bgcolor=#FF0000]
+      LayoutNGBlockFlow {DIV} at (0,36) size 100x100 [bgcolor=#000000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/alt-text-wrapping-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/alt-text-wrapping-expected.txt
new file mode 100644
index 0000000..c974b4d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/alt-text-wrapping-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {IMG} at (0,0) size 100x100
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 100x100 clip at (9,9) size 98x98 scrollHeight 101
+  LayoutNGBlockFlow {SPAN} at (0,0) size 100x100 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 96x100
+      LayoutInline {SPAN} at (0,0) size 78x99
+        LayoutText {#text} at (16,0) size 78x99
+          text run at (16,0) width 55: "This text"
+          text run at (0,20) width 78: "should wrap"
+          text run at (0,40) width 60: "inside the"
+          text run at (0,60) width 50: "fallback"
+          text run at (0,80) width 50: "content."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-in-map-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-in-map-expected.txt
new file mode 100644
index 0000000..640145f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-in-map-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutInline {MAP} at (0,0) size 564x294
+        LayoutNGBlockFlow {IMG} at (0,0) size 564x294
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 564x294 clip at (9,9) size 562x292
+  LayoutNGBlockFlow {SPAN} at (0,0) size 564x294 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 560x0
+      LayoutInline {SPAN} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-map-anchor-children-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-map-anchor-children-expected.txt
new file mode 100644
index 0000000..7e79045
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/image-map-anchor-children-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutImage {IMG} at (0,0) size 479x150
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutInline {MAP} at (0,0) size 224x19
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (479,135) size 0x0
+        LayoutInline {A} at (0,0) size 91x19 [color=#0000EE]
+          LayoutText {#text} at (0,155) size 91x19
+            text run at (0,155) width 91: "John Hancock"
+        LayoutText {#text} at (91,155) size 11x19
+          text run at (91,155) width 11: " | "
+        LayoutInline {A} at (0,0) size 39x19 [color=#0000EE]
+          LayoutText {#text} at (102,155) size 39x19
+            text run at (102,155) width 39: "Nokia"
+        LayoutText {#text} at (141,155) size 11x19
+          text run at (141,155) width 11: " | "
+        LayoutInline {A} at (0,0) size 72x19 [color=#0000EE]
+          LayoutText {#text} at (152,155) size 72x19
+            text run at (152,155) width 72: "Downtown"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
new file mode 100644
index 0000000..b12b951
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x60
+        LayoutText {#text} at (0,0) size 770x39
+          text run at (0,0) width 770: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that the focus ring color is not inherited"
+          text run at (0,20) width 207: "for an <area> (by default) as per "
+        LayoutInline {A} at (0,0) size 467x19 [color=#0000EE]
+          LayoutText {#text} at (207,20) size 467x19
+            text run at (207,20) width 467: "section 18.4 \"Dynamic outlines: the 'outline' property\" of the CSS2.1 spec"
+        LayoutText {#text} at (674,20) size 735x39
+          text run at (674,20) width 61: ". This test"
+          text run at (0,40) width 566: "FAILED if a red-colored focus ring is drawn around the <area> in the imagemap (below)."
+      LayoutNGBlockFlow (anonymous) at (0,76) size 784x133
+        LayoutInline {MAP} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+          LayoutInline {AREA} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutImage {IMG} at (0,0) size 128x128
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/controls/lazy-loaded-style-expected.txt
new file mode 100644
index 0000000..42f9377
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/controls/lazy-loaded-style-expected.txt
@@ -0,0 +1,51 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x321
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x321
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x305
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 400x300
+  LayoutVideo {VIDEO} at (0,0) size 400x300
+layer at (8,8) size 400x300
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300
+    LayoutNGBlockFlow {DIV} at (0,268) size 400x32
+layer at (8,8) size 400x258
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x258
+layer at (8,276) size 400x32 scrollHeight 40
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x32 [bgcolor=#FAFAFA]
+    LayoutButton {INPUT} at (0,0) size 32x32
+    LayoutFlexibleBox {DIV} at (32,0) size 24x32 [color=#5A5A5A]
+      LayoutNGBlockFlow (anonymous) at (0,0) size 24x32
+        LayoutText {#text} at (0,8) size 24x15
+          text run at (0,8) width 24: "0:00"
+    LayoutFlexibleBox {DIV} at (56,0) size 34x32 [color=#5A5A5A]
+      LayoutNGBlockFlow (anonymous) at (4,0) size 30x32
+        LayoutText {#text} at (0,8) size 30x15
+          text run at (0,8) width 30: "/ 0:06"
+    LayoutSlider {INPUT} at (108,1) size 116.69x30
+      LayoutFlexibleBox {DIV} at (0,14) size 116.69x2
+    LayoutButton {INPUT} at (242.69,0) size 32x32
+    LayoutSlider {INPUT} at (292.69,1) size 57.31x30
+      LayoutFlexibleBox {DIV} at (0,14) size 57.31x2
+layer at (376,276) size 32x32
+  LayoutButton {INPUT} at (368,0) size 32x32
+layer at (98,292) size 153x0
+  LayoutBlockFlow (relative positioned) {DIV} at (-18,1) size 152.69x0
+layer at (116,291) size 117x2
+  LayoutBlockFlow (positioned) {DIV} at (18,-1) size 116.69x2 [bgcolor=#DADADA]
+layer at (283,292) size 93x0
+  LayoutBlockFlow (relative positioned) {DIV} at (-18,1) size 93.31x0
+layer at (301,291) size 57x2
+  LayoutBlockFlow (positioned) {DIV} at (18,-1) size 57.31x2 [bgcolor=#DADADA]
+layer at (116,291) size 117x2
+  LayoutBlockFlow (positioned) zI: 1 {DIV} at (0,0) size 117x2 [bgcolor=#5A5A5A]
+layer at (116,291) size 0x2
+  LayoutBlockFlow (positioned) zI: 1 {DIV} at (0,0) size 0x2 [bgcolor=#4285F4]
+layer at (301,291) size 0x2
+  LayoutBlockFlow (positioned) zI: 1 {DIV} at (0,0) size 0x2 [bgcolor=#5A5A5A]
+layer at (301,291) size 57x2
+  LayoutBlockFlow (positioned) zI: 1 {DIV} at (0,0) size 57x2 [bgcolor=#4285F4]
+layer at (98,268) size 36x48 backgroundClip at (8,276) size 400x32 clip at (8,276) size 400x32
+  LayoutBlockFlow (positioned) zI: 2 {DIV} at (0,-24) size 36x48
+layer at (340,268) size 36x48 backgroundClip at (8,276) size 400x32 clip at (8,276) size 400x32
+  LayoutBlockFlow (positioned) zI: 2 {DIV} at (57.31,-24) size 36x48
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-layer-crash-expected.txt
new file mode 100644
index 0000000..b7686a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-layer-crash-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 359x19
+          text run at (0,0) width 359: "Test dynamic removal of transformed and reflected video"
+      LayoutNGBlockFlow (anonymous) at (0,36) size 784x342
+        LayoutText {#text} at (0,0) size 4x19
+          text run at (0,0) width 4: " "
+        LayoutBR {BR} at (4,0) size 0x0
+        LayoutText {#text} at (0,161) size 4x19
+          text run at (0,161) width 4: " "
+        LayoutBR {BR} at (210,161) size 0x0
+        LayoutText {#text} at (0,322) size 4x19
+          text run at (0,322) width 4: " "
+        LayoutBR {BR} at (210,322) size 0x0
+layer at (12,64) size 206x156
+  LayoutVideo {VIDEO} at (4,20) size 206x156 [border: (3px solid #FF0000)]
+layer at (15,67) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutNGBlockFlow {DIV} at (0,118) size 200x32
+layer at (15,67) size 200x108 backgroundClip at (65,105) size 100x155 clip at (65,105) size 100x70
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x108
+layer at (12,225) size 206x156
+  LayoutVideo {VIDEO} at (4,181) size 206x156 [border: (3px solid #FF0000)]
+layer at (15,228) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutNGBlockFlow {DIV} at (0,118) size 200x32
+layer at (15,228) size 200x108
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x108
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-poster-scale-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-poster-scale-expected.txt
new file mode 100644
index 0000000..797ea27
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-poster-scale-expected.txt
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 622
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x622 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x622
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x606
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (326,141) size 0x0
+      LayoutText {#text} at (82,255) size 4x19
+        text run at (82,255) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (168,255) size 0x0
+      LayoutText {#text} at (56,586) size 4x19
+        text run at (56,586) width 4: " "
+      LayoutText {#text} at (386,586) size 4x19
+        text run at (386,586) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (716,586) size 0x0
+layer at (8,8) size 326x156
+  LayoutVideo {VIDEO} at (0,0) size 326x156 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (8,169) size 82x109
+  LayoutVideo {VIDEO} at (0,161) size 82x109 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (94,169) size 82x109
+  LayoutVideo {VIDEO} at (86,161) size 82x109 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (8,283) size 56x326 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo {VIDEO} at (0,275) size 56x326 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (68,363) size 326x246 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo {VIDEO} at (60,355) size 326x246 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (398,553) size 326x56 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo {VIDEO} at (390,545) size 326x56 [bgcolor=#EE00EE] [border: (3px solid #FF0000)]
+layer at (11,11) size 320x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x150
+    LayoutNGBlockFlow {DIV} at (0,118) size 320x32
+layer at (11,11) size 320x108
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x108
+layer at (11,172) size 76x103
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103
+    LayoutNGBlockFlow {DIV} at (0,71) size 76x32
+layer at (11,172) size 76x61
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 76x61
+layer at (97,172) size 76x103
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103
+    LayoutNGBlockFlow {DIV} at (0,71) size 76x32
+layer at (97,172) size 76x61
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 76x61
+layer at (11,286) size 50x320 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 50x320
+    LayoutNGBlockFlow {DIV} at (0,288) size 50x32
+layer at (11,286) size 50x278
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 50x278
+layer at (71,366) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x240
+    LayoutNGBlockFlow {DIV} at (0,208) size 320x32
+layer at (71,366) size 320x198
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x198
+layer at (401,556) size 320x50 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x50
+    LayoutNGBlockFlow {DIV} at (0,18) size 320x32
+layer at (401,556) size 320x8
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x8
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-zoom-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-zoom-expected.txt
new file mode 100644
index 0000000..6de7778
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/video-zoom-expected.txt
@@ -0,0 +1,33 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 852
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x852 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x852
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x836
+      LayoutNGBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 283x19
+          text run at (0,0) width 283: "150% zoom, with width and height attributes"
+      LayoutNGBlockFlow (anonymous) at (0,36) size 769x374
+        LayoutText {#text} at (0,354) size 4x19
+          text run at (0,354) width 4: " "
+        LayoutBR {BR} at (493,354) size 0x0
+      LayoutNGBlockFlow {P} at (0,426) size 769x20
+        LayoutText {#text} at (0,0) size 303x19
+          text run at (0,0) width 303: "150% zoom, without width and height attributes"
+      LayoutNGBlockFlow (anonymous) at (0,462) size 769x374
+        LayoutText {#text} at (0,354) size 4x19
+          text run at (0,354) width 4: " "
+        LayoutBR {BR} at (493,354) size 0x0
+layer at (12,44) size 489x369
+  LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)]
+layer at (12,470) size 489x369 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)]
+layer at (17,49) size 480x360
+  LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360
+    LayoutNGBlockFlow {DIV} at (0,312) size 480x48
+layer at (17,49) size 480x297
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x297
+layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360
+    LayoutNGBlockFlow {DIV} at (0,312) size 480x48
+layer at (17,475) size 480x297 backgroundClip at (17,475) size 480x125 clip at (17,475) size 480x125
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x297
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/clipath/clip-path-with-background-and-box-behind-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/clipath/clip-path-with-background-and-box-behind-expected.txt
new file mode 100644
index 0000000..233e089
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/clipath/clip-path-with-background-and-box-behind-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x171
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x171
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x155
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x155
+        LayoutSVGRoot {svg} at (0,0) size 300x150
+          LayoutSVGResourceClipper {clipPath} [id="equitri"] [clipPathUnits=objectBoundingBox]
+            LayoutSVGPath {polygon} at (0,0) size 1x0.86 [fill={[type=SOLID] [color=#000000]}] [points="0.5 0 0 0.86 1 0.86 0.5 0"]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 100x100
+  LayoutNGBlockFlow (positioned) {DIV} at (8,8) size 100x100 [bgcolor=#008000]
+layer at (8,8) size 100x100 backgroundClip at (8,8) size 100x86 clip at (8,8) size 100x86
+  LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/filters/clip-filter-overflow-clip-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/filters/clip-filter-overflow-clip-expected.txt
new file mode 100644
index 0000000..dab687a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/filters/clip-filter-overflow-clip-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x96
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x96
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x80
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x80
+        LayoutText {#text} at (0,0) size 489x19
+          text run at (0,0) width 489: "This test verifies CSS clip, filter, and overflow clip are applied in the order of:"
+        LayoutBR {BR} at (488,0) size 0x0
+        LayoutText {#text} at (0,20) size 418x19
+          text run at (0,20) width 418: "output <-- clip <-- filter <-- overflow clip <-- normal-flow contents"
+        LayoutBR {BR} at (418,20) size 0x0
+        LayoutText {#text} at (0,40) size 777x39
+          text run at (0,40) width 777: "The test succeeds if the green box below has a crisp left edge, blurred top/bottom dashed border, and a crisp right edge with"
+          text run at (0,60) width 347: "blurred partial dashed border. No red should be visible."
+layer at (10,200) size 110x110 backgroundClip at (65,191) size 50x128 clip at (65,205) size 50x100 scrollWidth 105 scrollHeight 105
+  LayoutNGBlockFlow (positioned) {DIV} at (10,200) size 110x110 [bgcolor=#008000] [border: (5px dashed #000000)]
+    LayoutNGBlockFlow {DIV} at (0,0) size 110x110 [border: (5px solid #FF0000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/background/background-image-paint-invalidation-large-abspos-div-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/background/background-image-paint-invalidation-large-abspos-div-expected.txt
new file mode 100644
index 0000000..15bb2a76
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/background/background-image-paint-invalidation-large-abspos-div-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollY 3000.00 scrollHeight 4008
+  LayoutView at (0,0) size 800x600
+layer at (0,-3000) size 785x558 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x558
+    LayoutNGBlockFlow {BODY} at (8,8) size 769x542
+      LayoutNGBlockFlow (anonymous) at (0,0) size 769x542
+        LayoutImage {IMG} at (0,0) size 489x537
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,-2992) size 100x4000 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow (positioned) {DIV} at (8,8) size 100x4000
+scrolled to 0,3000
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/overflow/inline-block-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/overflow/inline-block-overflow-expected.txt
new file mode 100644
index 0000000..0ce27da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/overflow/inline-block-overflow-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 322x19
+          text run at (0,0) width 322: "This is a repaint test of inline blocks with overflow."
+      LayoutNGBlockFlow (anonymous) at (0,46) size 784x20
+        LayoutInline {SPAN} at (0,0) size 198x20
+          LayoutText {#text} at (0,0) size 98x19
+            text run at (0,0) width 98: "Here comes an "
+          LayoutNGBlockFlow {SPAN} at (98,0) size 100x20 [bgcolor=#C0C0C0]
+            LayoutText {#text} at (0,0) size 92x39
+              text run at (0,0) width 74: "inline block"
+              text run at (0,20) width 92: "with overflow."
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,44) size 784x2 clip at (0,0) size 0x0
+  LayoutNGBlockFlow {HR} at (0,36) size 784x2 [border: (1px inset #EEEEEE)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/printing/ellipsis-printing-style-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/printing/ellipsis-printing-style-expected.txt
new file mode 100644
index 0000000..d9e9377
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/printing/ellipsis-printing-style-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 1066x799
+layer at (0,0) size 1066x40 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 1066x40
+    LayoutNGBlockFlow {BODY} at (8,8) size 1050x24
+layer at (8,8) size 168x24
+  LayoutNGBlockFlow {DIV} at (0,0) size 168x24 [color=#FFFFFF] [bgcolor=#000000]
+    LayoutText {#text} at (0,0) size 160x16
+      text run at (0,0) width 144: "This text"
+      text run at (144,0) width 16: "\x{2026}"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt
new file mode 100644
index 0000000..69b32ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt
@@ -0,0 +1,94 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x514
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x514
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x498
+      LayoutTable {TABLE} at (0,0) size 670x498
+        LayoutTableSection {TBODY} at (0,0) size 670x498
+          LayoutTableRow {TR} at (0,2) size 670x22
+            LayoutNGTableCell {TH} at (2,2) size 93x22 [bgcolor=#DDDD99] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (9,1) size 75x19
+                text run at (9,1) width 75: "viewBox?"
+            LayoutNGTableCell {TH} at (97,2) size 163x22 [bgcolor=#DDDD99] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 161x19
+                text run at (1,1) width 161: "preserve\x{AD}Aspect\x{AD}Ratio"
+            LayoutNGTableCell {TH} at (262,2) size 202x22 [bgcolor=#DDDD99] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (78,1) size 46x19
+                text run at (78,1) width 46: "<img>"
+            LayoutNGTableCell {TH} at (466,2) size 202x22 [bgcolor=#DDDD99] [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (80,1) size 42x19
+                text run at (80,1) width 42: "<div>"
+          LayoutTableRow {TR} at (0,26) size 670x57
+            LayoutNGTableCell {TH} at (2,132) size 93x22 [bgcolor=#DDDD99] [r=1 c=0 rs=4 cs=1]
+              LayoutText {#text} at (1,107) size 91x19
+                text run at (1,107) width 91: "No viewBox"
+            LayoutNGTableCell {TH} at (97,53) size 163x2 [bgcolor=#DDDD99] [r=1 c=1 rs=1 cs=1]
+            LayoutNGTableCell {TD} at (262,26) size 202x57 [r=1 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,28) size 202x52 [r=1 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,85) size 670x57
+            LayoutNGTableCell {TH} at (97,102) size 163x22 [bgcolor=#DDDD99] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (62,18) size 39x19
+                text run at (62,18) width 39: "none"
+            LayoutNGTableCell {TD} at (262,85) size 202x57 [r=2 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,87) size 202x52 [r=2 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,144) size 670x57
+            LayoutNGTableCell {TH} at (97,161) size 163x22 [bgcolor=#DDDD99] [r=3 c=1 rs=1 cs=1]
+              LayoutText {#text} at (63,18) size 37x19
+                text run at (63,18) width 37: "meet"
+            LayoutNGTableCell {TD} at (262,144) size 202x57 [r=3 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,146) size 202x52 [r=3 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,203) size 670x57
+            LayoutNGTableCell {TH} at (97,220) size 163x22 [bgcolor=#DDDD99] [r=4 c=1 rs=1 cs=1]
+              LayoutText {#text} at (64,18) size 35x19
+                text run at (64,18) width 35: "slice"
+            LayoutNGTableCell {TD} at (262,203) size 202x57 [r=4 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,205) size 202x52 [r=4 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,262) size 670x57
+            LayoutNGTableCell {TH} at (2,368) size 93x22 [bgcolor=#DDDD99] [r=5 c=0 rs=4 cs=1]
+              LayoutText {#text} at (14,107) size 65x19
+                text run at (14,107) width 65: "viewBox"
+            LayoutNGTableCell {TH} at (97,289) size 163x2 [bgcolor=#DDDD99] [r=5 c=1 rs=1 cs=1]
+            LayoutNGTableCell {TD} at (262,262) size 202x57 [r=5 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,264) size 202x52 [r=5 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,321) size 670x57
+            LayoutNGTableCell {TH} at (97,338) size 163x22 [bgcolor=#DDDD99] [r=6 c=1 rs=1 cs=1]
+              LayoutText {#text} at (62,18) size 39x19
+                text run at (62,18) width 39: "none"
+            LayoutNGTableCell {TD} at (262,321) size 202x57 [r=6 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,323) size 202x52 [r=6 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,380) size 670x57
+            LayoutNGTableCell {TH} at (97,397) size 163x22 [bgcolor=#DDDD99] [r=7 c=1 rs=1 cs=1]
+              LayoutText {#text} at (63,18) size 37x19
+                text run at (63,18) width 37: "meet"
+            LayoutNGTableCell {TD} at (262,380) size 202x57 [r=7 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,382) size 202x52 [r=7 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
+          LayoutTableRow {TR} at (0,439) size 670x57
+            LayoutNGTableCell {TH} at (97,456) size 163x22 [bgcolor=#DDDD99] [r=8 c=1 rs=1 cs=1]
+              LayoutText {#text} at (64,18) size 35x19
+                text run at (64,18) width 35: "slice"
+            LayoutNGTableCell {TD} at (262,439) size 202x57 [r=8 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,441) size 202x52 [r=8 c=3 rs=1 cs=1]
+              LayoutNGBlockFlow {DIV} at (1,1) size 200x50 [border: (2px dashed #800000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-repeat-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-repeat-expected.txt
new file mode 100644
index 0000000..7bb1140
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-background-image/background-repeat-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x547
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x547
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x531
+      LayoutNGBlockFlow {DIV} at (10,10) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (222,157) size 4x19
+        text run at (222,157) width 4: " "
+      LayoutNGBlockFlow {DIV} at (236,10) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (448,157) size 4x19
+        text run at (448,157) width 4: " "
+      LayoutNGBlockFlow {DIV} at (462,10) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (674,157) size 0x0
+      LayoutNGBlockFlow {DIV} at (10,187) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (222,334) size 4x19
+        text run at (222,334) width 4: " "
+      LayoutNGBlockFlow {DIV} at (236,187) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (448,334) size 4x19
+        text run at (448,334) width 4: " "
+      LayoutNGBlockFlow {DIV} at (462,187) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (674,334) size 0x0
+      LayoutNGBlockFlow {DIV} at (10,364) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (222,511) size 4x19
+        text run at (222,511) width 4: " "
+      LayoutNGBlockFlow {DIV} at (236,364) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (448,511) size 4x19
+        text run at (448,511) width 4: " "
+      LayoutNGBlockFlow {DIV} at (462,364) size 202x152 [border: (1px solid #008000)]
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (674,511) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-image/img-preserveAspectRatio-support-1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-image/img-preserveAspectRatio-support-1-expected.txt
new file mode 100644
index 0000000..f72b0b29
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-image/img-preserveAspectRatio-support-1-expected.txt
@@ -0,0 +1,164 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x514
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x514
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x498
+      LayoutTable {TABLE} at (0,0) size 670x498
+        LayoutTableSection {TBODY} at (0,0) size 670x498
+          LayoutTableRow {TR} at (0,2) size 670x22
+            LayoutNGTableCell {TH} at (2,2) size 93x22 [bgcolor=#DDDD99] [r=0 c=0 rs=1 cs=1]
+              LayoutText {#text} at (9,1) size 75x19
+                text run at (9,1) width 75: "viewBox?"
+            LayoutNGTableCell {TH} at (97,2) size 163x22 [bgcolor=#DDDD99] [r=0 c=1 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 161x19
+                text run at (1,1) width 161: "preserve\x{AD}Aspect\x{AD}Ratio"
+            LayoutNGTableCell {TH} at (262,2) size 202x22 [bgcolor=#DDDD99] [r=0 c=2 rs=1 cs=1]
+              LayoutText {#text} at (78,1) size 46x19
+                text run at (78,1) width 46: "<img>"
+            LayoutNGTableCell {TH} at (466,2) size 202x22 [bgcolor=#DDDD99] [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (68,1) size 66x19
+                text run at (68,1) width 66: "<object>"
+          LayoutTableRow {TR} at (0,26) size 670x57
+            LayoutNGTableCell {TH} at (2,132) size 93x22 [bgcolor=#DDDD99] [r=1 c=0 rs=4 cs=1]
+              LayoutText {#text} at (1,107) size 91x19
+                text run at (1,107) width 91: "No viewBox"
+            LayoutNGTableCell {TH} at (97,53) size 163x2 [bgcolor=#DDDD99] [r=1 c=1 rs=1 cs=1]
+            LayoutNGTableCell {TD} at (262,26) size 202x57 [r=1 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,26) size 202x57 [r=1 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,85) size 670x57
+            LayoutNGTableCell {TH} at (97,102) size 163x22 [bgcolor=#DDDD99] [r=2 c=1 rs=1 cs=1]
+              LayoutText {#text} at (62,18) size 39x19
+                text run at (62,18) width 39: "none"
+            LayoutNGTableCell {TD} at (262,85) size 202x57 [r=2 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,85) size 202x57 [r=2 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,144) size 670x57
+            LayoutNGTableCell {TH} at (97,161) size 163x22 [bgcolor=#DDDD99] [r=3 c=1 rs=1 cs=1]
+              LayoutText {#text} at (63,18) size 37x19
+                text run at (63,18) width 37: "meet"
+            LayoutNGTableCell {TD} at (262,144) size 202x57 [r=3 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,144) size 202x57 [r=3 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,203) size 670x57
+            LayoutNGTableCell {TH} at (97,220) size 163x22 [bgcolor=#DDDD99] [r=4 c=1 rs=1 cs=1]
+              LayoutText {#text} at (64,18) size 35x19
+                text run at (64,18) width 35: "slice"
+            LayoutNGTableCell {TD} at (262,203) size 202x57 [r=4 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,203) size 202x57 [r=4 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,262) size 670x57
+            LayoutNGTableCell {TH} at (2,368) size 93x22 [bgcolor=#DDDD99] [r=5 c=0 rs=4 cs=1]
+              LayoutText {#text} at (14,107) size 65x19
+                text run at (14,107) width 65: "viewBox"
+            LayoutNGTableCell {TH} at (97,289) size 163x2 [bgcolor=#DDDD99] [r=5 c=1 rs=1 cs=1]
+            LayoutNGTableCell {TD} at (262,262) size 202x57 [r=5 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,262) size 202x57 [r=5 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,321) size 670x57
+            LayoutNGTableCell {TH} at (97,338) size 163x22 [bgcolor=#DDDD99] [r=6 c=1 rs=1 cs=1]
+              LayoutText {#text} at (62,18) size 39x19
+                text run at (62,18) width 39: "none"
+            LayoutNGTableCell {TD} at (262,321) size 202x57 [r=6 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,321) size 202x57 [r=6 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,380) size 670x57
+            LayoutNGTableCell {TH} at (97,397) size 163x22 [bgcolor=#DDDD99] [r=7 c=1 rs=1 cs=1]
+              LayoutText {#text} at (63,18) size 37x19
+                text run at (63,18) width 37: "meet"
+            LayoutNGTableCell {TD} at (262,380) size 202x57 [r=7 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,380) size 202x57 [r=7 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+          LayoutTableRow {TR} at (0,439) size 670x57
+            LayoutNGTableCell {TH} at (97,456) size 163x22 [bgcolor=#DDDD99] [r=8 c=1 rs=1 cs=1]
+              LayoutText {#text} at (64,18) size 35x19
+                text run at (64,18) width 35: "slice"
+            LayoutNGTableCell {TD} at (262,439) size 202x57 [r=8 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 200x50 [border: (2px dashed #800000)]
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutNGTableCell {TD} at (466,439) size 202x57 [r=8 c=3 rs=1 cs=1]
+              LayoutText {#text} at (0,0) size 0x0
+layer at (475,35) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
+layer at (475,94) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,153) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,212) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,271) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,330) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,389) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
+layer at (475,448) size 200x50
+  LayoutEmbeddedObject {OBJECT} at (1,1) size 200x50 [border: (1px dashed #008000)]
+    layer at (0,0) size 192x42
+      LayoutView at (0,0) size 192x42
+    layer at (0,0) size 192x42
+      LayoutSVGRoot {svg} at (0,0) size 192x42
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGContainer {g} at (162.86,403.79) size 362.86x362.86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-162.36,-403.29)}]
+          LayoutSVGPath {path} at (162.86,403.79) size 362.86x362.86 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [data="M 525.714 585.219 A 181.429 181.429 0 1 1 162.857 585.219 A 181.429 181.429 0 1 1 525.714 585.219 Z"]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-object/object-box-sizing-no-width-height-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-object/object-box-sizing-no-width-height-expected.txt
new file mode 100644
index 0000000..de1aa31
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/as-object/object-box-sizing-no-width-height-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x476
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x476
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x460
+      LayoutText {#text} at (230,215) size 4x19
+        text run at (230,215) width 4: " "
+      LayoutText {#text} at (464,215) size 4x19
+        text run at (464,215) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutBR {BR} at (698,215) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 230x230
+  LayoutEmbeddedObject {OBJECT} at (0,0) size 230x230 [border: (2px dashed #800000)]
+    layer at (0,0) size 220x220
+      LayoutView at (0,0) size 220x220
+    layer at (0,0) size 220x220
+      LayoutSVGRoot {svg} at (0,0) size 220x220
+        LayoutSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
+layer at (242,8) size 230x230
+  LayoutEmbeddedObject {OBJECT} at (234,0) size 230x230 [border: (2px dashed #800000)]
+    layer at (0,0) size 220x220
+      LayoutView at (0,0) size 220x220
+    layer at (0,0) size 220x220
+      LayoutSVGRoot {svg} at (0,0) size 220x220
+        LayoutSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
+layer at (476,8) size 230x230
+  LayoutEmbeddedObject {OBJECT} at (468,0) size 230x230 [border: (2px dashed #800000)]
+    layer at (0,0) size 220x220
+      LayoutView at (0,0) size 220x220
+    layer at (0,0) size 220x220
+      LayoutSVGRoot {svg} at (0,0) size 220x220
+        LayoutSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
+layer at (8,243) size 220x220
+  LayoutEmbeddedObject {OBJECT} at (0,235) size 220x220 [border: (2px dashed #800000)]
+    layer at (0,0) size 210x210
+      LayoutView at (0,0) size 210x210
+    layer at (0,0) size 210x210
+      LayoutSVGRoot {svg} at (0,0) size 210x210
+        LayoutSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/createImageElement2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/createImageElement2-expected.txt
new file mode 100644
index 0000000..d5be3820
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/createImageElement2-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x105
+  LayoutNGBlockFlow {html} at (0,0) size 800x105
+    LayoutInline {head} at (0,0) size 80x19
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutInline {title} at (0,0) size 76x19
+        LayoutText {#text} at (0,85) size 76x19
+          text run at (0,85) width 76: "SVG Image"
+      LayoutText {#text} at (76,85) size 4x19
+        text run at (76,85) width 4: " "
+    LayoutText {#text} at (0,0) size 0x0
+    LayoutInline {body} at (0,0) size 600x100
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutSVGRoot {svg} at (80,0) size 600x100
+        LayoutSVGImage {image} at (10,10) size 100x60
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/dominant-baseline-hanging-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/dominant-baseline-hanging-expected.txt
new file mode 100644
index 0000000..0855b55
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/dominant-baseline-hanging-expected.txt
@@ -0,0 +1,56 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 400x400
+  LayoutSVGRoot {svg} at (0,0) size 400x400
+    LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+      LayoutSVGResourceLinearGradient {linearGradient} [id="gradient"] [gradientUnits=objectBoundingBox] [stops=( #FF72B480@0.00 #FF007B@1.00 )] [start=(0,0)] [end=(0,1)]
+      LayoutSVGResourceLinearGradient {linearGradient} [id="h_stroke_gradient"] [gradientUnits=objectBoundingBox] [stops=( #000000@0.00 #00000000@1.00 )] [start=(0,0)] [end=(1,0)]
+      LayoutSVGResourceLinearGradient {linearGradient} [id="v_stroke_gradient"] [gradientUnits=objectBoundingBox] [stops=( #000000@0.00 #00000000@1.00 )] [start=(0,0)] [end=(0,1)]
+    LayoutSVGRect {rect} at (0,0) size 400x400 [fill={[type=LINEAR-GRADIENT] [id="gradient"]}] [x=0.00] [y=0.00] [width=400.00] [height=400.00]
+    LayoutSVGContainer {g} at (-0.50,-3.39) size 380.50x28.39 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,10.00)}]
+      LayoutSVGRect {rect} at (0,0) size 380x25 [opacity=0.50] [fill={[type=SOLID] [color=#FFFFFF]}] [x=0.00] [y=0.00] [width=380.00] [height=25.00]
+      LayoutSVGContainer {g} at (0,-0.50) size 380x25.50 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-0.50,-0.50)}]
+        LayoutSVGPath {line} at (0,0) size 380x0 [stroke={[type=LINEAR-GRADIENT] [id="h_stroke_gradient"]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=380.00] [y2=0.00]
+        LayoutSVGPath {line} at (0,-0.50) size 0x25.50 [stroke={[type=LINEAR-GRADIENT] [id="v_stroke_gradient"]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=-0.50] [x2=0.00] [y2=25.00]
+      LayoutSVGText {text} at (2,-3.39) size 323x22 contains 1 chunk(s)
+        LayoutSVGInlineText {#text} at (2,-3.39) size 323x22
+          chunk 1 text run 1 at (2.00,13.60) startOffset 0 endOffset 40 width 323.00: "This is hanging from the top-left corner"
+    LayoutSVGForeignObject {foreignObject} at (10,45) size 380x150
+      LayoutNGBlockFlow {html} at (0,0) size 380x168
+        LayoutNGBlockFlow {body} at (8,16) size 364x136
+          LayoutNGBlockFlow {p} at (0,0) size 364x100
+            LayoutText {#text} at (0,0) size 347x39
+              text run at (0,0) width 347: "The piece of text above should be aligned with the top-"
+              text run at (0,20) width 286: "left corner of the rectangle below it. Both the "
+            LayoutInline {code} at (0,0) size 48x16
+              LayoutText {#text} at (286,23) size 48x16
+                text run at (286,23) width 48: "<text>"
+            LayoutText {#text} at (334,20) size 361x39
+              text run at (334,20) width 27: " and"
+              text run at (0,40) width 23: "the "
+            LayoutInline {code} at (0,0) size 48x16
+              LayoutText {#text} at (23,43) size 48x16
+                text run at (23,43) width 48: "<rect>"
+            LayoutText {#text} at (71,40) size 272x19
+              text run at (71,40) width 272: " are located at the same coordinates and the"
+            LayoutInline {code} at (0,0) size 48x16
+              LayoutText {#text} at (0,63) size 48x16
+                text run at (0,63) width 48: "<text>"
+            LayoutText {#text} at (48,60) size 111x19
+              text run at (48,60) width 111: " element uses the "
+            LayoutInline {code} at (0,0) size 56x16
+              LayoutText {#text} at (159,63) size 56x16
+                text run at (159,63) width 56: "hanging"
+            LayoutText {#text} at (215,60) size 78x19
+              text run at (215,60) width 78: " value for its"
+            LayoutInline {code} at (0,0) size 136x16
+              LayoutText {#text} at (0,83) size 136x16
+                text run at (0,83) width 136: "dominant-baseline"
+            LayoutText {#text} at (136,80) size 59x19
+              text run at (136,80) width 59: " attribute."
+          LayoutNGBlockFlow {p} at (0,116) size 364x20
+            LayoutInline {a} at (0,0) size 91x19 [color=#800000]
+              LayoutText {#text} at (0,0) size 91x19
+                text run at (0,0) width 91: "Antoine Quint"
+            LayoutText {#text} at (91,0) size 89x19
+              text run at (91,0) width 89: ", January 27th"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/foreign-object-skew-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/foreign-object-skew-expected.txt
new file mode 100644
index 0000000..565820ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/foreign-object-skew-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutSVGRoot {svg} at (0,0) size 800x600
+    LayoutSVGForeignObject {foreignObject} at (10,10) size 580x380
+      LayoutNGBlockFlow {xhtml:div} at (0,0) size 580x20
+        LayoutText {#text} at (0,0) size 78x19
+          text run at (0,0) width 78: "This is a test"
+      LayoutNGBlockFlow (anonymous) at (0,20) size 580x44
+        LayoutInline {xhtml:a} at (0,0) size 66x19 [color=#0000EE]
+          LayoutText {#text} at (0,0) size 66x19
+            text run at (0,0) width 66: "and a link."
+        LayoutBR {xhtml:br} at (66,0) size 0x0
+        LayoutButton {xhtml:input} at (0,20) size 16x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        LayoutText {#text} at (0,0) size 0x0
+    LayoutSVGRect {rect} at (10,10) size 580x380 [stroke={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=580.00] [height=380.00]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/getscreenctm-in-mixed-content-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/getscreenctm-in-mixed-content-expected.txt
new file mode 100644
index 0000000..dba3a6d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/getscreenctm-in-mixed-content-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x56
+  LayoutNGBlockFlow {html} at (0,0) size 800x56
+    LayoutNGBlockFlow {body} at (8,8) size 784x40
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 170x19
+          text run at (0,0) width 170: "This tests the behaviour of "
+        LayoutInline {code} at (0,0) size 224x16
+          LayoutText {#text} at (170,3) size 224x16
+            text run at (170,3) width 224: "SVGLocatable::getScreenCTM()"
+        LayoutText {#text} at (394,0) size 109x19
+          text run at (394,0) width 109: " in mixed content"
+        LayoutBR {br} at (503,0) size 0x0
+        LayoutText {#text} at (0,20) size 315x19
+          text run at (0,20) width 315: "If the test passes you should see a green rectangle."
+layer at (30,100) size 400x200
+  LayoutNGBlockFlow (positioned) {div} at (30,100) size 400x200
+    LayoutSVGRoot {svg} at (0,0) size 400x200
+      LayoutSVGRect {rect} at (0,0) size 200x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=200.00] [height=100.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (30,330) size 0x0
+  LayoutNGBlockFlow (positioned) {div} at (30,330) size 0x0 [color=#FF0000]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/image-parent-translation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/image-parent-translation-expected.txt
new file mode 100644
index 0000000..6c70eaa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/image-parent-translation-expected.txt
@@ -0,0 +1,28 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x224
+  LayoutNGBlockFlow {html} at (0,0) size 800x223.88
+    LayoutNGBlockFlow {body} at (8,21.44) size 784x194.44
+      LayoutNGBlockFlow {h1} at (0,0) size 784x37
+        LayoutText {#text} at (0,0) size 495x36
+          text run at (0,0) width 495: "SVG Images in Inline CSS Elements"
+      LayoutNGBlockFlow {p} at (0,58.44) size 784x40
+        LayoutText {#text} at (0,0) size 756x39
+          text run at (0,0) width 756: "The two following blocks should display side-by-side a 75x75 pixels image with a 3 pixels border overlaid on top of the"
+          text run at (0,20) width 127: "image (Bug 14051)."
+      LayoutNGBlockFlow (anonymous) at (0,114.44) size 784x80
+        LayoutInline {div} at (0,0) size 79x79
+          LayoutText {#text} at (0,0) size 0x0
+          LayoutSVGRoot {svg} at (0,0) size 75x75
+            LayoutSVGImage {image} at (0,0) size 75x75
+            LayoutSVGRect {rect} at (0,0) size 75x75 [stroke={[type=SOLID] [color=#FF0000] [stroke width=6.00]}] [x=0.00] [y=0.00] [width=75.00] [height=75.00]
+          LayoutText {#text} at (75,60) size 4x19
+            text run at (75,60) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutInline {div} at (0,0) size 75x75
+          LayoutText {#text} at (0,0) size 0x0
+          LayoutSVGRoot {svg} at (79,0) size 75x75
+            LayoutSVGImage {image} at (0,0) size 75x75
+            LayoutSVGRect {rect} at (0,0) size 75x75 [stroke={[type=SOLID] [color=#FF0000] [stroke width=6.00]}] [x=0.00] [y=0.00] [width=75.00] [height=75.00]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt
new file mode 100644
index 0000000..77fafdf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x363
+  LayoutNGBlockFlow {html} at (0,0) size 800x363
+    LayoutNGBlockFlow {body} at (8,8) size 784x347
+      LayoutText {#text} at (0,0) size 762x19
+        text run at (0,0) width 762: "There should be no red displayed on the screen, and the patterns should not change when the browser window is resized."
+      LayoutBR {br} at (762,0) size 0x0
+      LayoutBR {br} at (0,20) size 0x0
+      LayoutSVGRoot {svg} at (0,40) size 202x302
+        LayoutSVGContainer {g} at (0,0) size 200x200
+          LayoutSVGRect {rect} at (0,100) size 100x50 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=100.00] [width=100.00] [height=50.00]
+          LayoutSVGRect {rect} at (100,0) size 100x50 [fill={[type=SOLID] [color=#FF0000]}] [x=100.00] [y=0.00] [width=100.00] [height=50.00]
+          LayoutSVGRect {rect} at (0,100) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=100.00] [width=100.00] [height=100.00]
+          LayoutSVGRect {rect} at (100,0) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=100.00] [y=0.00] [width=100.00] [height=100.00]
+      LayoutText {#text} at (202,327) size 4x19
+        text run at (202,327) width 4: " "
+      LayoutSVGRoot {svg} at (206,40) size 202x302
+        LayoutSVGText {text} at (5,265) size 80.44x19 contains 1 chunk(s)
+          LayoutSVGInlineText {#text} at (5,265) size 80.44x19
+            chunk 1 text run 1 at (5.00,280.00) startOffset 0 endOffset 11 width 80.44: "+Transforms"
+        LayoutSVGContainer {g} at (0,0) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,100.00)}]
+          LayoutSVGRect {rect} at (0,0) size 100x50 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+          LayoutSVGRect {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+        LayoutSVGContainer {g} at (0,0) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,0.00)}]
+          LayoutSVGRect {rect} at (0,0) size 100x50 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+          LayoutSVGRect {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+          LayoutSVGResourcePattern {pattern} [id="pattern"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse]
+            LayoutSVGRect {rect} at (0,0) size 100x25 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=25.00]
+            LayoutSVGRect {rect} at (0,25) size 100x25 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=25.00] [width=100.00] [height=25.00]
+      LayoutText {#text} at (408,327) size 4x19
+        text run at (408,327) width 4: " "
+      LayoutText {#text} at (0,0) size 0x0
+layer at (420,48) size 202x302 clip at (421,49) size 200x300
+  LayoutSVGRoot {svg} at (412,40) size 202x302
+    LayoutSVGText {text} at (5,265) size 169x19 contains 1 chunk(s)
+      LayoutSVGInlineText {#text} at (5,265) size 169x19
+        chunk 1 text run 1 at (5.00,280.00) startOffset 0 endOffset 24 width 169.00: "+Accelerated Compositing"
+    LayoutSVGContainer {g} at (0,0) size 200x200
+      LayoutSVGRect {rect} at (0,100) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=100.00] [width=100.00] [height=100.00]
+      LayoutSVGRect {rect} at (100,0) size 100x100 [fill={[type=PATTERN] [id="pattern"]}] [x=100.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/svg-fonts-word-spacing-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/svg-fonts-word-spacing-expected.txt
new file mode 100644
index 0000000..dea12f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/custom/svg-fonts-word-spacing-expected.txt
@@ -0,0 +1,77 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x574
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 72x19
+          text run at (0,0) width 72: "no spacing:"
+      LayoutNGBlockFlow {P} at (0,38) size 784x22
+        LayoutText {#text} at (0,0) size 97x21
+          text run at (0,0) width 97: "abc abc abc"
+      LayoutNGBlockFlow (anonymous) at (0,78) size 784x20
+        LayoutText {#text} at (0,0) size 294x19
+          text run at (0,0) width 294: "word-spacing: 100px, all should look the same"
+      LayoutNGBlockFlow {P} at (0,116) size 784x22
+        LayoutText {#text} at (0,0) size 297x21
+          text run at (0,0) width 297: "abc abc abc"
+      LayoutNGBlockFlow {P} at (0,156) size 784x22
+        LayoutText {#text} at (0,0) size 134x21
+          text run at (0,0) width 134: "abc "
+        LayoutInline {SPAN} at (0,0) size 20x21
+          LayoutText {#text} at (134,0) size 20x21
+            text run at (134,0) width 20: "ab"
+        LayoutText {#text} at (154,0) size 143x21
+          text run at (154,0) width 143: "c abc"
+      LayoutNGBlockFlow {P} at (0,196) size 784x22
+        LayoutText {#text} at (0,0) size 134x21
+          text run at (0,0) width 134: "abc "
+        LayoutInline {SPAN} at (0,0) size 10x21
+          LayoutText {#text} at (134,0) size 10x21
+            text run at (134,0) width 10: "a"
+        LayoutInline {SPAN} at (0,0) size 10x21
+          LayoutText {#text} at (144,0) size 10x21
+            text run at (144,0) width 10: "b"
+        LayoutText {#text} at (154,0) size 143x21
+          text run at (154,0) width 143: "c abc"
+      LayoutNGBlockFlow {P} at (0,236) size 784x22
+        LayoutText {#text} at (0,0) size 134x21
+          text run at (0,0) width 134: "abc "
+        LayoutInline {SPAN} at (0,0) size 10x21
+          LayoutText {#text} at (134,0) size 10x21
+            text run at (134,0) width 10: "a"
+        LayoutText {#text} at (144,0) size 10x21
+          text run at (144,0) width 10: "b"
+        LayoutInline {SPAN} at (0,0) size 9x21
+          LayoutText {#text} at (154,0) size 9x21
+            text run at (154,0) width 9: "c"
+        LayoutText {#text} at (163,0) size 134x21
+          text run at (163,0) width 134: " abc"
+      LayoutNGBlockFlow {P} at (0,276) size 784x22
+        LayoutText {#text} at (0,0) size 144x21
+          text run at (0,0) width 144: "abc a"
+        LayoutInline {SPAN} at (0,0) size 10x21
+          LayoutText {#text} at (144,0) size 10x21
+            text run at (144,0) width 10: "b"
+        LayoutInline {SPAN} at (0,0) size 9x21
+          LayoutText {#text} at (154,0) size 9x21
+            text run at (154,0) width 9: "c"
+        LayoutText {#text} at (163,0) size 134x21
+          text run at (163,0) width 134: " abc"
+      LayoutNGBlockFlow {P} at (0,316) size 784x22
+        LayoutText {#text} at (0,0) size 144x21
+          text run at (0,0) width 144: "abc a"
+        LayoutInline {SPAN} at (0,0) size 10x21
+          LayoutText {#text} at (144,0) size 10x21
+            text run at (144,0) width 10: "b"
+        LayoutText {#text} at (154,0) size 143x21
+          text run at (154,0) width 143: "c abc"
+      LayoutNGBlockFlow {P} at (0,356) size 784x22
+        LayoutText {#text} at (0,0) size 134x21
+          text run at (0,0) width 134: "abc "
+        LayoutInline {SPAN} at (0,0) size 0x0
+        LayoutText {#text} at (134,0) size 134x21
+          text run at (134,0) width 134: "abc "
+        LayoutInline {SPAN} at (0,0) size 0x0
+        LayoutText {#text} at (268,0) size 29x21
+          text run at (268,0) width 29: "abc"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/hixie/mixed/006-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/hixie/mixed/006-expected.txt
new file mode 100644
index 0000000..01a95cc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/hixie/mixed/006-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x421
+  LayoutNGBlockFlow {html} at (0,0) size 800x421
+    LayoutNGBlockFlow {body} at (8,8) size 784x405
+      LayoutNGBlockFlow (anonymous) at (0,0) size 784x405
+        LayoutSVGRoot {svg} at (0,200) size 200x200
+          LayoutSVGEllipse {circle} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [cx=100.00] [cy=100.00] [r=50.00]
+          LayoutSVGForeignObject {foreignObject} at (0,0) size 200x200
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 200x200
+  LayoutNGBlockFlow (positioned) {div} at (8,8) size 200x200 [bgcolor=#FFFFFF]
+    LayoutText {#text} at (0,0) size 199x39
+      text run at (0,0) width 190: "There should be a green circle"
+      text run at (0,20) width 199: "below with no red on this page."
+layer at (8,8) size 200x200 backgroundClip at (8,208) size 200x200 clip at (8,208) size 200x200
+  LayoutNGBlockFlow (positioned) {div} at (0,-200) size 200x200 [color=#FFFF00] [bgcolor=#FF0000]
+    LayoutText {#text} at (0,0) size 35x19
+      text run at (0,0) width 35: "FAIL"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt
new file mode 100644
index 0000000..5d10988
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x405
+  LayoutNGBlockFlow {html} at (0,0) size 800x405
+    LayoutInline {body} at (0,0) size 400x400
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutSVGRoot {svg} at (0,0) size 400x400
+        LayoutSVGRect {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=4000.00] [height=4000.00]
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt
new file mode 100644
index 0000000..5d10988
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x405
+  LayoutNGBlockFlow {html} at (0,0) size 800x405
+    LayoutInline {body} at (0,0) size 400x400
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutSVGRoot {svg} at (0,0) size 400x400
+        LayoutSVGRect {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=4000.00] [height=4000.00]
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt
new file mode 100644
index 0000000..5d10988
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x405
+  LayoutNGBlockFlow {html} at (0,0) size 800x405
+    LayoutInline {body} at (0,0) size 400x400
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutSVGRoot {svg} at (0,0) size 400x400
+        LayoutSVGRect {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=4000.00] [height=4000.00]
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt
new file mode 100644
index 0000000..5d10988
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x405
+  LayoutNGBlockFlow {html} at (0,0) size 800x405
+    LayoutInline {body} at (0,0) size 400x400
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutSVGRoot {svg} at (0,0) size 400x400
+        LayoutSVGRect {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=4000.00] [height=4000.00]
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-clip-path-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-clip-path-expected.txt
new file mode 100644
index 0000000..385d3d9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-clip-path-expected.txt
@@ -0,0 +1,66 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x580
+  LayoutNGBlockFlow {html} at (0,0) size 800x579.63
+    LayoutNGBlockFlow {body} at (8,8) size 784x563.63
+      LayoutNGBlockFlow {div} at (10,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 154x26
+            text run at (0,0) width 154: "SVG CSS scale"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 105x26
+            text run at (0,0) width 105: "SVG scale"
+      LayoutText {#text} at (240,0) size 4x19
+        text run at (240,0) width 4: " "
+      LayoutNGBlockFlow {div} at (254,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 211x26
+            text run at (0,0) width 211: "SVG CSS compound"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 162x26
+            text run at (0,0) width 162: "SVG compound"
+      LayoutText {#text} at (0,0) size 0x0
+layer at (28,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 198x198
+      LayoutSVGHiddenContainer {defs} at (-50,-50) size 200x200
+        LayoutSVGEllipse {circle} at (-10,-10) size 40x40 [transform={m=((5.00,0.00)(0.00,5.00)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [cx=10.00] [cy=10.00] [r=20.00]
+        LayoutSVGResourceClipper {clipPath} [id="clip-circle1"] [clipPathUnits=userSpaceOnUse]
+          LayoutSVGContainer {use} at (-50,-50) size 200x200
+            LayoutSVGEllipse {circle} at (-10,-10) size 40x40 [transform={m=((5.00,0.00)(0.00,5.00)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [cx=10.00] [cy=10.00] [r=20.00]
+      LayoutSVGRect {rect} at (10,10) size 200x200 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=200.00] [height=200.00]
+        [clipPath="clip-circle1"] LayoutSVGResourceClipper {clipPath} at (-50,-50) size 200x200
+    LayoutText {#text} at (0,0) size 0x0
+layer at (28,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 198x198
+      LayoutSVGHiddenContainer {defs} at (-50,-50) size 200x200
+        LayoutSVGEllipse {circle} at (-10,-10) size 40x40 [transform={m=((5.00,0.00)(0.00,5.00)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [cx=10.00] [cy=10.00] [r=20.00]
+        LayoutSVGResourceClipper {clipPath} [id="clip-circle2"] [clipPathUnits=userSpaceOnUse]
+          LayoutSVGContainer {use} at (-50,-50) size 200x200
+            LayoutSVGEllipse {circle} at (-10,-10) size 40x40 [transform={m=((5.00,0.00)(0.00,5.00)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [cx=10.00] [cy=10.00] [r=20.00]
+      LayoutSVGRect {rect} at (10,10) size 200x200 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=200.00] [height=200.00]
+        [clipPath="clip-circle2"] LayoutSVGResourceClipper {clipPath} at (-50,-50) size 200x200
+    LayoutText {#text} at (0,0) size 0x0
+layer at (272,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 198x198
+      LayoutSVGHiddenContainer {defs} at (-141.42,7.07) size 282.84x282.84
+        LayoutSVGRect {rect} at (1,1) size 40x40 [transform={m=((3.54,3.54)(-3.54,3.54)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=40.00] [height=40.00]
+        LayoutSVGResourceClipper {clipPath} [id="clip-rect1"] [clipPathUnits=userSpaceOnUse]
+          LayoutSVGContainer {use} at (-141.42,7.07) size 282.84x282.84
+            LayoutSVGRect {rect} at (1,1) size 40x40 [transform={m=((3.54,3.54)(-3.54,3.54)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=40.00] [height=40.00]
+      LayoutSVGRect {rect} at (10,10) size 200x200 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=200.00] [height=200.00]
+        [clipPath="clip-rect1"] LayoutSVGResourceClipper {clipPath} at (-141.42,7.07) size 282.84x282.84
+    LayoutText {#text} at (0,0) size 0x0
+layer at (272,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 198x198
+      LayoutSVGHiddenContainer {defs} at (-141.42,7.07) size 282.84x282.84
+        LayoutSVGRect {rect} at (1,1) size 40x40 [transform={m=((3.54,3.54)(-3.54,3.54)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=40.00] [height=40.00]
+        LayoutSVGResourceClipper {clipPath} [id="clip-rect2"] [clipPathUnits=userSpaceOnUse]
+          LayoutSVGContainer {use} at (-141.42,7.07) size 282.84x282.84
+            LayoutSVGRect {rect} at (1,1) size 40x40 [transform={m=((3.54,3.54)(-3.54,3.54)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=40.00] [height=40.00]
+      LayoutSVGRect {rect} at (10,10) size 200x200 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=200.00] [height=200.00]
+        [clipPath="clip-rect2"] LayoutSVGResourceClipper {clipPath} at (-141.42,7.07) size 282.84x282.84
+    LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-expected.txt
new file mode 100644
index 0000000..739e0c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/transforms/svg-css-transforms-expected.txt
@@ -0,0 +1,48 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x580
+  LayoutNGBlockFlow {html} at (0,0) size 800x579.63
+    LayoutNGBlockFlow {body} at (8,8) size 784x563.63
+      LayoutNGBlockFlow {div} at (10,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 120x26
+            text run at (0,0) width 120: "SVG nested"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 114x26
+            text run at (0,0) width 114: "CSS nested"
+      LayoutText {#text} at (240,0) size 4x19
+        text run at (240,0) width 4: " "
+      LayoutNGBlockFlow {div} at (254,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 162x26
+            text run at (0,0) width 162: "SVG compound"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 156x26
+            text run at (0,0) width 156: "CSS compound"
+      LayoutText {#text} at (0,0) size 0x0
+layer at (28,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 200x200
+      LayoutSVGContainer {g} at (-84.85,0) size 204.85x169.71 [transform={m=((1.00,0.00)(0.00,1.00)) t=(75.00,25.00)}]
+        LayoutSVGRect {rect} at (0,0) size 60x60 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+        LayoutSVGContainer {g} at (-42.43,0) size 102.43x84.85 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+          LayoutSVGRect {rect} at (0,0) size 60x60 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+          LayoutSVGRect {rect} at (0,0) size 60x60 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (28,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+layer at (29,353) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
+layer at (105,379) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
+layer at (31,355) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
+layer at (272,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 200x200
+      LayoutSVGRect {rect} at (0,0) size 60x60 [transform={m=((1.41,1.41)(-1.41,1.41)) t=(75.00,25.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (272,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+layer at (273,353) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-a-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-a-expected.txt
new file mode 100644
index 0000000..588f6b0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-a-expected.txt
@@ -0,0 +1,69 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x550
+  LayoutNGBlockFlow {html} at (0,0) size 800x549.86
+    LayoutNGBlockFlow {body} at (48,30.72) size 752x511.14
+      LayoutNGBlockFlow {div} at (0,0) size 752x511.14
+        LayoutNGBlockFlow {h1} at (0,0) size 691.83x31
+          LayoutText {#text} at (0,0) size 216x30
+            text run at (0,0) width 216: "rightsizing to box"
+        LayoutNGBlockFlow {h4} at (0,31) size 752x16
+          LayoutText {#text} at (0,0) size 138x16
+            text run at (0,0) width 138: "WICD Core 1.0 #20-1"
+        LayoutNGBlockFlow {div} at (0,66.14) size 176x62 [bgcolor=#FF0000]
+          LayoutImage {object} at (0,0) size 176x62
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (anonymous) at (0,128.14) size 752x19
+          LayoutBR {br} at (0,0) size 0x0
+        LayoutNGBlockFlow {div} at (0,147.14) size 176x62 [bgcolor=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow {p} at (0,212.02) size 691.83x34
+          LayoutText {#text} at (0,0) size 684x34
+            text run at (0,0) width 684: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (width:100%, no"
+            text run at (0,17) width 481: "defined height) and each nested into a div element (width:176px, height:62px)."
+        LayoutNGBlockFlow {div} at (0,251.77) size 176x62 [bgcolor=#FF0000]
+          LayoutImage {object} at (0,0) size 176x62
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow (anonymous) at (0,313.77) size 752x19
+          LayoutBR {br} at (0,0) size 0x0
+        LayoutNGBlockFlow {div} at (0,332.77) size 176x62 [bgcolor=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow {p} at (0,397.64) size 691.83x34
+          LayoutText {#text} at (0,0) size 653x34
+            text run at (0,0) width 653: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (no defined"
+            text run at (0,17) width 512: "width, height:100%) and each nested into a div element (width:176px, height:62px)."
+        LayoutNGBlockFlow {p} at (0,437.39) size 691.83x34
+          LayoutText {#text} at (0,0) size 668x34
+            text run at (0,0) width 668: "This tests have succeeded, if in both cases, the look (dimensions) of the SVG and the GIF are exactly the same"
+            text run at (0,17) width 411: "(except the text apparently) and no red background color is visible."
+        LayoutNGBlockFlow {p} at (0,477.14) size 691.83x34
+          LayoutBR {br} at (0,0) size 0x0
+          LayoutInline {a} at (0,0) size 30x17 [color=#000066]
+            LayoutText {#text} at (0,17) size 30x17
+              text run at (0,17) width 30: "Back"
+layer at (48,178) size 176x62
+  LayoutEmbeddedObject {object} at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutView at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutSVGRoot {svg} at (0,0) size 176x62
+        LayoutSVGRect {rect} at (0,0) size 176x62 [fill={[type=SOLID] [color=#CCCCCC]}] [x=0.00] [y=0.00] [width=176.00] [height=62.00]
+        LayoutSVGRect {rect} at (2,2) size 174x60 [fill={[type=SOLID] [color=#333333]}] [x=2.00] [y=2.00] [width=174.00] [height=60.00]
+        LayoutSVGRect {rect} at (2,2) size 172x58 [fill={[type=SOLID] [color=#FFFFFF]}] [x=2.00] [y=2.00] [width=172.00] [height=58.00]
+        LayoutSVGRect {rect} at (86,2) size 88x58 [fill={[type=SOLID] [color=#FFCC33]}] [x=86.00] [y=2.00] [width=88.00] [height=58.00]
+        LayoutSVGText {text} at (46,10) size 80x46 contains 1 chunk(s)
+          LayoutSVGInlineText {#text} at (46,10) size 80x46
+            chunk 1 (middle anchor) text run 1 at (46.00,46.00) startOffset 0 endOffset 3 width 80.00: "SVG"
+layer at (48,363) size 176x62
+  LayoutEmbeddedObject {object} at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutView at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutSVGRoot {svg} at (0,0) size 176x62
+        LayoutSVGRect {rect} at (0,0) size 176x62 [fill={[type=SOLID] [color=#CCCCCC]}] [x=0.00] [y=0.00] [width=176.00] [height=62.00]
+        LayoutSVGRect {rect} at (2,2) size 174x60 [fill={[type=SOLID] [color=#333333]}] [x=2.00] [y=2.00] [width=174.00] [height=60.00]
+        LayoutSVGRect {rect} at (2,2) size 172x58 [fill={[type=SOLID] [color=#FFFFFF]}] [x=2.00] [y=2.00] [width=172.00] [height=58.00]
+        LayoutSVGRect {rect} at (86,2) size 88x58 [fill={[type=SOLID] [color=#FFCC33]}] [x=86.00] [y=2.00] [width=88.00] [height=58.00]
+        LayoutSVGText {text} at (46,10) size 80x46 contains 1 chunk(s)
+          LayoutSVGInlineText {#text} at (46,10) size 80x46
+            chunk 1 (middle anchor) text run 1 at (46.00,46.00) startOffset 0 endOffset 3 width 80.00: "SVG"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-b-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-b-expected.txt
new file mode 100644
index 0000000..9b59177d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/wicd/test-rightsizing-b-expected.txt
@@ -0,0 +1,101 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 856
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x856 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow {html} at (0,0) size 785x856.42
+    LayoutNGBlockFlow {body} at (47.09,30.72) size 737.89x817.70
+      LayoutNGBlockFlow {div} at (0,0) size 737.89x817.70
+        LayoutNGBlockFlow {h1} at (0,0) size 678.86x31
+          LayoutText {#text} at (0,0) size 382x30
+            text run at (0,0) width 382: "rightsizing to percentage width"
+        LayoutNGBlockFlow {h4} at (0,31) size 737.89x16
+          LayoutText {#text} at (0,0) size 138x16
+            text run at (0,0) width 138: "WICD Core 1.0 #20-2"
+        LayoutNGBlockFlow (anonymous) at (0,66.14) size 737.89x299.16
+          LayoutText {#text} at (295,280) size 5x19
+            text run at (295,280) width 5: " "
+          LayoutText {#text} at (446,280) size 5x19
+            text run at (446,280) width 5: " "
+          LayoutText {#text} at (524,280) size 5x19
+            text run at (524,280) width 5: " "
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow {p} at (0,368.17) size 678.86x68
+          LayoutText {#text} at (0,0) size 672x34
+            text run at (0,0) width 672: "Above there must be four times the same, square SVG child visible, each referenced by an object element with"
+            text run at (0,17) width 374: "different widths (40%, 20%, 10%, 5%) and no height defined."
+          LayoutBR {br} at (374,17) size 0x0
+          LayoutBR {br} at (0,34) size 0x0
+          LayoutText {#text} at (0,51) size 395x17
+            text run at (0,51) width 395: "Beyond there is the same, only with PNG images instead of SVG."
+        LayoutNGBlockFlow (anonymous) at (0,441.92) size 737.89x299.16
+          LayoutImage {object} at (0,0) size 295.16x295.16 [bgcolor=#FF0000]
+          LayoutText {#text} at (295,280) size 5x19
+            text run at (295,280) width 5: " "
+          LayoutImage {object} at (299.16,147.58) size 147.58x147.58 [bgcolor=#FF0000]
+          LayoutText {#text} at (446,280) size 5x19
+            text run at (446,280) width 5: " "
+          LayoutImage {object} at (450.73,221.38) size 73.78x73.78 [bgcolor=#FF0000]
+          LayoutText {#text} at (524,280) size 5x19
+            text run at (524,280) width 5: " "
+          LayoutImage {object} at (528.52,258.27) size 36.89x36.89 [bgcolor=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutNGBlockFlow {p} at (0,743.95) size 678.86x34
+          LayoutText {#text} at (0,0) size 653x34
+            text run at (0,0) width 653: "This test has succeeded, if both rows look exactly the same (SVGs must be square!) and no red background"
+            text run at (0,17) width 92: "color is visible."
+        LayoutNGBlockFlow {p} at (0,783.70) size 678.86x34
+          LayoutBR {br} at (0,0) size 0x0
+          LayoutInline {a} at (0,0) size 30x17 [color=#000066]
+            LayoutText {#text} at (0,17) size 30x17
+              text run at (0,17) width 30: "Back"
+layer at (47,97) size 295x295
+  LayoutEmbeddedObject {object} at (0,0) size 295.16x295.16 [bgcolor=#FF0000]
+    layer at (0,0) size 295x295
+      LayoutView at (0,0) size 295x295
+    layer at (0,0) size 295x295
+      LayoutSVGRoot {svg} at (0,0) size 295x295
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGRect {rect} at (-3000,-1000) size 6200x2200 [fill={[type=SOLID] [color=#5588FF]}] [x=-3000.00] [y=-1000.00] [width=6200.00] [height=2200.00]
+        LayoutSVGEllipse {circle} at (0,0) size 200x200 [fill={[type=SOLID] [color=#0000FF]}] [cx=100.00] [cy=100.00] [r=100.00]
+        LayoutSVGContainer {g} at (30.50,62.63) size 138.97x79.31
+          LayoutSVGText {text} at (30.50,62.63) size 138.97x79.31 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (30.50,62.63) size 138.97x79.31
+              chunk 1 (middle anchor) text run 1 at (30.51,125.00) startOffset 0 endOffset 3 width 138.98: "SVG"
+layer at (346,244) size 148x147
+  LayoutEmbeddedObject {object} at (299.16,147.58) size 147.58x147.58 [bgcolor=#FF0000]
+    layer at (0,0) size 148x148
+      LayoutView at (0,0) size 148x148
+    layer at (0,0) size 148x148
+      LayoutSVGRoot {svg} at (0,0) size 148x148
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGRect {rect} at (-3000,-1000) size 6200x2200 [fill={[type=SOLID] [color=#5588FF]}] [x=-3000.00] [y=-1000.00] [width=6200.00] [height=2200.00]
+        LayoutSVGEllipse {circle} at (0,0) size 200x200 [fill={[type=SOLID] [color=#0000FF]}] [cx=100.00] [cy=100.00] [r=100.00]
+        LayoutSVGContainer {g} at (29.05,61.48) size 141.89x81.08
+          LayoutSVGText {text} at (29.05,61.48) size 141.89x81.08 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (29.05,61.48) size 141.89x81.08
+              chunk 1 (middle anchor) text run 1 at (29.05,125.00) startOffset 0 endOffset 3 width 141.89: "SVG"
+layer at (498,318) size 74x74
+  LayoutEmbeddedObject {object} at (450.73,221.38) size 73.78x73.78 [bgcolor=#FF0000]
+    layer at (0,0) size 74x74
+      LayoutView at (0,0) size 74x74
+    layer at (0,0) size 74x74
+      LayoutSVGRoot {svg} at (0,0) size 74x74
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGRect {rect} at (-3000,-1000) size 6200x2200 [fill={[type=SOLID] [color=#5588FF]}] [x=-3000.00] [y=-1000.00] [width=6200.00] [height=2200.00]
+        LayoutSVGEllipse {circle} at (0,0) size 200x200 [fill={[type=SOLID] [color=#0000FF]}] [cx=100.00] [cy=100.00] [r=100.00]
+        LayoutSVGContainer {g} at (29.72,62.83) size 140.53x78.38
+          LayoutSVGText {text} at (29.72,62.83) size 140.53x78.38 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (29.72,62.83) size 140.53x78.38
+              chunk 1 (middle anchor) text run 1 at (29.73,125.00) startOffset 0 endOffset 3 width 140.54: "SVG"
+layer at (576,355) size 36x37
+  LayoutEmbeddedObject {object} at (528.52,258.27) size 36.89x36.89 [bgcolor=#FF0000]
+    layer at (0,0) size 37x37
+      LayoutView at (0,0) size 37x37
+    layer at (0,0) size 37x37
+      LayoutSVGRoot {svg} at (0,0) size 37x37
+        LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
+        LayoutSVGRect {rect} at (-3000,-1000) size 6200x2200 [fill={[type=SOLID] [color=#5588FF]}] [x=-3000.00] [y=-1000.00] [width=6200.00] [height=2200.00]
+        LayoutSVGEllipse {circle} at (0,0) size 200x200 [fill={[type=SOLID] [color=#0000FF]}] [cx=100.00] [cy=100.00] [r=100.00]
+        LayoutSVGContainer {g} at (32.42,60.13) size 140.53x81.08
+          LayoutSVGText {text} at (32.42,60.13) size 140.53x81.08 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (32.42,60.13) size 140.53x81.08
+              chunk 1 (middle anchor) text run 1 at (32.43,125.00) startOffset 0 endOffset 3 width 135.14: "SVG"
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/zoom/page/zoom-foreignObject-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/zoom/page/zoom-foreignObject-expected.txt
new file mode 100644
index 0000000..102b0ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/svg/zoom/page/zoom-foreignObject-expected.txt
@@ -0,0 +1,33 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutSVGRoot {svg} at (0,0) size 800x600
+    LayoutSVGForeignObject {foreignObject} at (0,0) size 250x200
+      LayoutNGBlockFlow {xhtml:div} at (0,0) size 250x20
+        LayoutText {#text} at (0,0) size 80x19
+          text run at (0,0) width 80: "This is a text"
+      LayoutNGBlockFlow (anonymous) at (0,20) size 250x20
+        LayoutInline {xhtml:a} at (0,0) size 66x19 [color=#0000EE]
+          LayoutText {#text} at (0,0) size 66x19
+            text run at (0,0) width 66: "and a link."
+        LayoutBR {xhtml:br} at (66,0) size 0x0
+      LayoutNGBlockFlow {xhtml:div} at (0,40) size 250x20
+        LayoutText {#text} at (0,0) size 56x19
+          text run at (0,0) width 56: "[HTML]"
+    LayoutSVGRect {rect} at (0,0) size 250x200 [stroke={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=250.00] [height=200.00]
+    LayoutSVGForeignObject {foreignObject} at (260,0) size 250x200
+      LayoutSVGRoot {svg} at (0,0) size 250x200
+        LayoutSVGContainer {g} at (0,1.77) size 81.38x58.19 [transform={m=((3.00,0.26)(0.26,3.02)) t=(0.00,0.00)}]
+          LayoutSVGText {text} at (0,1.77) size 81.38x18.19 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (0,1.77) size 81.38x18.19
+              chunk 1 text run 1 at (0.00,16.00) startOffset 0 endOffset 14 width 81.05: "This is a text"
+          LayoutSVGContainer {a} at (0,20.77) size 66.16x18.19
+            LayoutSVGText {text} at (0,20.77) size 66.16x18.19 contains 1 chunk(s)
+              LayoutSVGInlineText {#text} at (0,20.77) size 66.16x18.19
+                chunk 1 text run 1 at (0.00,35.00) startOffset 0 endOffset 11 width 66.16: "and a link."
+          LayoutSVGText {text} at (0,41.77) size 42.67x18.19 contains 1 chunk(s)
+            LayoutSVGInlineText {#text} at (0,41.77) size 42.67x18.19
+              chunk 1 text run 1 at (0.00,56.00) startOffset 0 endOffset 5 width 42.67: "[SVG]"
+      LayoutText {#text} at (0,0) size 0x0
+    LayoutSVGRect {rect} at (260,0) size 250x200 [stroke={[type=SOLID] [color=#008000]}] [x=260.00] [y=0.00] [width=250.00] [height=200.00]
+    LayoutSVGHiddenContainer {defs} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-2-expected.txt
new file mode 100644
index 0000000..63ea9de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-2-expected.txt
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (0,0) size 800x600 [border: (1px solid #000000)]
+      LayoutNGBlockFlow (anonymous) at (1,1) size 798x247
+        LayoutNGBlockFlow {DIV} at (20,20) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (242,227) size 4x19
+          text run at (242,227) width 4: " "
+        LayoutNGBlockFlow {DIV} at (266,20) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (488,227) size 4x19
+          text run at (488,227) width 4: " "
+        LayoutNGBlockFlow {DIV} at (512,20) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (30,500) size 312x100
+  LayoutNGBlockFlow (positioned) {DIV} at (30,500) size 312.25x100
+    LayoutInline {SPAN} at (0,0) size 313x19 [color=#008000]
+      LayoutText {#text} at (0,0) size 313x19
+        text run at (0,0) width 313: "PASS: event at (120, 128) hit box4 at offset (1, 1)"
+    LayoutBR {BR} at (312,15) size 0x0
+    LayoutInline {SPAN} at (0,0) size 305x19 [color=#008000]
+      LayoutText {#text} at (0,20) size 305x19
+        text run at (0,20) width 305: "PASS: event at (336, 87) hit box7 at offset (1, 1)"
+    LayoutBR {BR} at (304,35) size 0x0
+    LayoutInline {SPAN} at (0,0) size 305x19 [color=#008000]
+      LayoutText {#text} at (0,40) size 305x19
+        text run at (0,40) width 305: "PASS: event at (348, 86) hit box8 at offset (1, 1)"
+    LayoutBR {BR} at (304,55) size 0x0
+    LayoutInline {SPAN} at (0,0) size 312x19 [color=#008000]
+      LayoutText {#text} at (0,60) size 312x19
+        text run at (0,60) width 312: "PASS: event at (582, 87) hit box11 at offset (1, 1)"
+    LayoutBR {BR} at (311,75) size 0x0
+    LayoutInline {SPAN} at (0,0) size 313x19 [color=#008000]
+      LayoutText {#text} at (0,80) size 313x19
+        text run at (0,80) width 313: "PASS: event at (594, 86) hit box12 at offset (1, 1)"
+    LayoutBR {BR} at (312,95) size 0x0
+layer at (42,42) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (63,63) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#81AA8A] [border: (1px solid #000000)]
+layer at (104,104) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (41,41) size 100x100 [border: (1px solid #000000)]
+layer at (125,125) size 90x90
+  LayoutNGBlockFlow {DIV} at (21,21) size 90x90 [bgcolor=#0000FF] [border: (1px solid #000000)]
+layer at (288,42) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (309,63) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#81AA8A] [border: (1px solid #000000)]
+layer at (330,84) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (351,85) size 90x90
+  LayoutNGBlockFlow {DIV} at (21,1) size 90x90 [bgcolor=#0000FF] [border: (1px solid #000000)]
+layer at (534,42) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (555,63) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#81AA8A] [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (21,21) size 100x100 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (597,85) size 90x90
+  LayoutNGBlockFlow {DIV} at (21,1) size 90x90 [bgcolor=#0000FF] [border: (1px solid #000000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-origins-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-origins-expected.txt
new file mode 100644
index 0000000..83e839c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/3d/point-mapping/3d-point-mapping-origins-expected.txt
@@ -0,0 +1,77 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 680
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 785x600
+    LayoutNGBlockFlow {BODY} at (0,0) size 785x600 [border: (1px solid #000000)]
+      LayoutNGBlockFlow (anonymous) at (1,1) size 783x494
+        LayoutNGBlockFlow {DIV} at (20,20) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (242,227) size 4x19
+          text run at (242,227) width 4: " "
+        LayoutNGBlockFlow {DIV} at (266,20) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (488,227) size 0x0
+        LayoutNGBlockFlow {DIV} at (20,267) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (242,474) size 4x19
+          text run at (242,474) width 4: " "
+        LayoutNGBlockFlow {DIV} at (266,267) size 202x202 [border: (1px solid #000000)]
+        LayoutText {#text} at (0,0) size 0x0
+layer at (30,500) size 496x180 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutNGBlockFlow (positioned) {DIV} at (30,500) size 495.81x180
+    LayoutInline {SPAN} at (0,0) size 297x19 [color=#008000]
+      LayoutText {#text} at (0,0) size 297x19
+        text run at (0,0) width 297: "PASS: event at (48, 48) hit box1 at offset (5, 5)"
+    LayoutBR {BR} at (296,15) size 0x0
+    LayoutInline {SPAN} at (0,0) size 297x19 [color=#008000]
+      LayoutText {#text} at (0,20) size 297x19
+        text run at (0,20) width 297: "PASS: event at (70, 41) hit box2 at offset (2, 2)"
+    LayoutBR {BR} at (296,35) size 0x0
+    LayoutInline {SPAN} at (0,0) size 329x19 [color=#008000]
+      LayoutText {#text} at (0,40) size 329x19
+        text run at (0,40) width 329: "PASS: event at (185, 164) hit box2 at offset (96, 96)"
+    LayoutBR {BR} at (328,55) size 0x0
+    LayoutInline {SPAN} at (0,0) size 305x19 [color=#008000]
+      LayoutText {#text} at (0,60) size 305x19
+        text run at (0,60) width 305: "PASS: event at (338, 64) hit box7 at offset (2, 2)"
+    LayoutBR {BR} at (304,75) size 0x0
+    LayoutInline {SPAN} at (0,0) size 488x19 [color=#FF0000]
+      LayoutText {#text} at (0,80) size 488x19
+        text run at (0,80) width 488: "FAIL: event at (92, 310) expected to hit box10 at (2, 2) but hit box10 at (2, 1)"
+    LayoutBR {BR} at (487,95) size 0x0
+    LayoutInline {SPAN} at (0,0) size 337x19 [color=#008000]
+      LayoutText {#text} at (0,100) size 337x19
+        text run at (0,100) width 337: "PASS: event at (217, 444) hit box10 at offset (95, 95)"
+    LayoutBR {BR} at (336,115) size 0x0
+    LayoutInline {SPAN} at (0,0) size 321x19 [color=#008000]
+      LayoutText {#text} at (0,120) size 321x19
+        text run at (0,120) width 321: "PASS: event at (337, 309) hit box13 at offset (1, 1)"
+    LayoutBR {BR} at (320,135) size 0x0
+    LayoutInline {SPAN} at (0,0) size 496x19 [color=#FF0000]
+      LayoutText {#text} at (0,140) size 496x19
+        text run at (0,140) width 496: "FAIL: event at (360, 334) expected to hit box14 at (1, 1) but hit box14 at (1, 0)"
+    LayoutBR {BR} at (495,155) size 0x0
+    LayoutInline {SPAN} at (0,0) size 337x19 [color=#008000]
+      LayoutText {#text} at (0,160) size 337x19
+        text run at (0,160) width 337: "PASS: event at (500, 484) hit box14 at offset (95, 95)"
+    LayoutBR {BR} at (336,175) size 0x0
+layer at (42,42) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (63,63) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#AAAAAA] [border: (1px solid #000000)]
+layer at (288,42) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (309,63) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#AAAAAA] [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (21,21) size 100x100 [bgcolor=#0000FF] [border: (1px solid #000000)]
+layer at (42,289) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (63,310) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#AAAAAA] [border: (1px solid #000000)]
+layer at (84,331) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#0000FF] [border: (1px solid #000000)]
+layer at (288,289) size 140x140
+  LayoutNGBlockFlow {DIV} at (21,21) size 140x140 [bgcolor=#DDDDDD] [border: (1px solid #000000)]
+layer at (309,310) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#AAAAAA] [border: (1px solid #000000)]
+    LayoutNGBlockFlow {DIV} at (21,21) size 100x100 [bgcolor=#C0D69E] [border: (1px solid #000000)]
+layer at (351,352) size 100x100
+  LayoutNGBlockFlow (relative positioned) {DIV} at (21,21) size 100x100 [bgcolor=#0000FF] [border: (1px solid #000000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/identity-matrix-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/identity-matrix-expected.txt
new file mode 100644
index 0000000..b5305e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/identity-matrix-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutText {#text} at (0,0) size 246x19
+        text run at (0,0) width 246: "The following divs should be identical:"
+      LayoutBR {BR} at (246,0) size 0x0
+      LayoutNGBlockFlow (floating) {DIV} at (5,25) size 110x110 [bgcolor=#87CEEB] [border: (5px solid #000000)]
+layer at (133,33) size 110x110
+  LayoutNGBlockFlow (floating) {DIV} at (125,25) size 110x110 [bgcolor=#87CEEB] [border: (5px solid #000000)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/svg-vs-css-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/svg-vs-css-expected.txt
new file mode 100644
index 0000000..4769d7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/transforms/svg-vs-css-expected.txt
@@ -0,0 +1,66 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x580
+  LayoutNGBlockFlow {html} at (0,0) size 800x579.63
+    LayoutNGBlockFlow {body} at (8,8) size 784x563.63
+      LayoutNGBlockFlow {div} at (10,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 120x26
+            text run at (0,0) width 120: "SVG nested"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 114x26
+            text run at (0,0) width 114: "CSS nested"
+      LayoutText {#text} at (240,0) size 4x19
+        text run at (240,0) width 4: " "
+      LayoutNGBlockFlow {div} at (254,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 162x26
+            text run at (0,0) width 162: "SVG compound"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 156x26
+            text run at (0,0) width 156: "CSS compound"
+      LayoutText {#text} at (484,0) size 4x19
+        text run at (484,0) width 4: " "
+      LayoutNGBlockFlow {div} at (498,10) size 220x543.63
+        LayoutNGBlockFlow {h2} at (0,19.91) size 220x27
+          LayoutText {#text} at (0,0) size 128x26
+            text run at (0,0) width 128: "SVG Matrix"
+        LayoutNGBlockFlow {h2} at (0,286.72) size 220x27
+          LayoutText {#text} at (0,0) size 116x26
+            text run at (0,0) width 116: "CSSMatrix"
+      LayoutText {#text} at (0,0) size 0x0
+layer at (28,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 200x200
+      LayoutSVGContainer {g} at (-84.85,0) size 204.85x169.71 [transform={m=((1.00,0.00)(0.00,1.00)) t=(75.00,25.00)}]
+        LayoutSVGRect {rect} at (0,0) size 60x60 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+        LayoutSVGContainer {g} at (-42.43,0) size 102.43x84.85 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+          LayoutSVGRect {rect} at (0,0) size 60x60 [stroke={[type=SOLID] [color=#000000] [dash array={1.00, 1.00}]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+          LayoutSVGRect {rect} at (0,0) size 60x60 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (28,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+layer at (29,353) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
+layer at (105,379) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px dotted #000000)]
+layer at (31,355) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
+layer at (272,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 200x200
+      LayoutSVGRect {rect} at (0,0) size 60x60 [transform={m=((1.41,1.41)(-1.41,1.41)) t=(75.00,25.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (272,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+layer at (273,353) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
+layer at (516,85) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,66.81) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+    LayoutSVGRoot {svg} at (1,1) size 200x200
+      LayoutSVGRect {rect} at (0,0) size 60x60 [transform={m=((1.41,1.41)(-1.41,1.41)) t=(75.00,25.00)}] [stroke={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=60.00] [height=60.00]
+    LayoutText {#text} at (0,0) size 0x0
+layer at (516,352) size 200x200
+  LayoutNGBlockFlow (relative positioned) {div} at (10,333.63) size 200x200 [bgcolor=#C0C0C0] [border: (1px solid #000000)]
+layer at (517,353) size 60x60
+  LayoutNGBlockFlow (positioned) {div} at (1,1) size 60x60 [border: (1px solid #0000FF)]
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/alt-text-wrapping-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/alt-text-wrapping-expected.txt
new file mode 100644
index 0000000..c974b4d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/alt-text-wrapping-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {IMG} at (0,0) size 100x100
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 100x100 clip at (9,9) size 98x98 scrollHeight 101
+  LayoutNGBlockFlow {SPAN} at (0,0) size 100x100 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 96x100
+      LayoutInline {SPAN} at (0,0) size 78x99
+        LayoutText {#text} at (16,0) size 78x99
+          text run at (16,0) width 55: "This text"
+          text run at (0,20) width 78: "should wrap"
+          text run at (0,40) width 60: "inside the"
+          text run at (0,60) width 50: "fallback"
+          text run at (0,80) width 50: "content."
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-in-map-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-in-map-expected.txt
new file mode 100644
index 0000000..640145f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-in-map-expected.txt
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutInline {MAP} at (0,0) size 564x294
+        LayoutNGBlockFlow {IMG} at (0,0) size 564x294
+      LayoutText {#text} at (0,0) size 0x0
+layer at (8,8) size 564x294 clip at (9,9) size 562x292
+  LayoutNGBlockFlow {SPAN} at (0,0) size 564x294 [border: (1px solid #C0C0C0)]
+    LayoutImage (floating) {IMG} at (2,2) size 16x16
+    LayoutNGBlockFlow (anonymous) at (2,2) size 560x0
+      LayoutInline {SPAN} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-map-anchor-children-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-map-anchor-children-expected.txt
new file mode 100644
index 0000000..7e79045
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/image-map-anchor-children-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutImage {IMG} at (0,0) size 479x150
+      LayoutText {#text} at (0,0) size 0x0
+      LayoutInline {MAP} at (0,0) size 224x19
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutBR {BR} at (479,135) size 0x0
+        LayoutInline {A} at (0,0) size 91x19 [color=#0000EE]
+          LayoutText {#text} at (0,155) size 91x19
+            text run at (0,155) width 91: "John Hancock"
+        LayoutText {#text} at (91,155) size 11x19
+          text run at (91,155) width 11: " | "
+        LayoutInline {A} at (0,0) size 39x19 [color=#0000EE]
+          LayoutText {#text} at (102,155) size 39x19
+            text run at (102,155) width 39: "Nokia"
+        LayoutText {#text} at (141,155) size 11x19
+          text run at (141,155) width 11: " | "
+        LayoutInline {A} at (0,0) size 72x19 [color=#0000EE]
+          LayoutText {#text} at (152,155) size 72x19
+            text run at (152,155) width 72: "Downtown"
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
new file mode 100644
index 0000000..b12b951
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutNGBlockFlow {HTML} at (0,0) size 800x600
+    LayoutNGBlockFlow {BODY} at (8,8) size 784x584
+      LayoutNGBlockFlow {P} at (0,0) size 784x60
+        LayoutText {#text} at (0,0) size 770x39
+          text run at (0,0) width 770: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that the focus ring color is not inherited"
+          text run at (0,20) width 207: "for an <area> (by default) as per "
+        LayoutInline {A} at (0,0) size 467x19 [color=#0000EE]
+          LayoutText {#text} at (207,20) size 467x19
+            text run at (207,20) width 467: "section 18.4 \"Dynamic outlines: the 'outline' property\" of the CSS2.1 spec"
+        LayoutText {#text} at (674,20) size 735x39
+          text run at (674,20) width 61: ". This test"
+          text run at (0,40) width 566: "FAILED if a red-colored focus ring is drawn around the <area> in the imagemap (below)."
+      LayoutNGBlockFlow (anonymous) at (0,76) size 784x133
+        LayoutInline {MAP} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+          LayoutInline {AREA} at (0,0) size 0x0
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutImage {IMG} at (0,0) size 128x128
+        LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/images/cross-fade-invalidation-expected.png
index 34665ed3..c649c5f 100644
--- a/third_party/WebKit/LayoutTests/images/cross-fade-invalidation-expected.png
+++ b/third_party/WebKit/LayoutTests/images/cross-fade-invalidation-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/images/cross-fade-overflow-position-expected.png b/third_party/WebKit/LayoutTests/images/cross-fade-overflow-position-expected.png
index 1ba6f8c..ec3586ea 100644
--- a/third_party/WebKit/LayoutTests/images/cross-fade-overflow-position-expected.png
+++ b/third_party/WebKit/LayoutTests/images/cross-fade-overflow-position-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-morphing-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-morphing-expected.png
index b980a5d3..ffaa713 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-morphing-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-morphing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-changes-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-changes-expected.png
index a9b035cd..9909f7a 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-changes-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-changes-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-removal-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-removal-expected.png
index 3026fff32..2b863aa 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-removal-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-polygon-removal-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.png
index 8d74f18..0c10bbf2 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.png
index 8d74f18..0c10bbf2 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png
index f9d2932..de2306b 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/repaint-paintorder-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/repaint-paintorder-expected.png
index 69b72c8..210194a 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/repaint-paintorder-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/repaint-paintorder-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/stroke-opacity-update-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/stroke-opacity-update-expected.png
index 325a4d0..595d8ef 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/stroke-opacity-update-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/stroke-opacity-update-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.png
index 242b051c..9467456 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-cell-vertical-overflow-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-cell-vertical-overflow-expected.png
index e49e50f..2163838d 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-cell-vertical-overflow-expected.png
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-cell-vertical-overflow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/variable-fonts/cff2-variations-expected.png
new file mode 100644
index 0000000..ed30fb0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/variable-fonts/cff2-variations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/variable-fonts/cff2-variations-expected.png
new file mode 100644
index 0000000..e5a52306
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/variable-fonts/cff2-variations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
deleted file mode 100644
index 9a24cff..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-above-composited-subframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-above-composited-subframe-expected.png
deleted file mode 100644
index 1a941fc1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-above-composited-subframe-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css1/box_properties/border_style-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css1/box_properties/border_style-expected.png
deleted file mode 100644
index 20a3c2b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css1/box_properties/border_style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t0805-c5517-brdr-s-00-c-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t0805-c5517-brdr-s-00-c-expected.png
deleted file mode 100644
index 89abc3d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t0805-c5517-brdr-s-00-c-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-14-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-14-d-expected.png
deleted file mode 100644
index 3d7d1b6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-14-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-24-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-24-d-expected.png
deleted file mode 100644
index d33c165..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-24-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-41-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-41-d-expected.png
deleted file mode 100644
index a034fb9e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-41-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-42-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-42-d-expected.png
deleted file mode 100644
index eb04210..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-42-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-43-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-43-d-expected.png
deleted file mode 100644
index 6381143..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-43-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-45-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-45-d-expected.png
deleted file mode 100644
index 4a08cde..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-45-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-46-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-46-d-expected.png
deleted file mode 100644
index 41edbb3..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-46-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-48-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-48-d-expected.png
deleted file mode 100644
index 5eeb56a4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-48-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-54-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-54-d-expected.png
deleted file mode 100644
index 5df2826..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-54-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-64-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-64-d-expected.png
deleted file mode 100644
index 603e50b7..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-64-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-74-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-74-d-expected.png
deleted file mode 100644
index 5f9e1b1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-74-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-84-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-84-d-expected.png
deleted file mode 100644
index 4ca146a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-84-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-94-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-94-d-expected.png
deleted file mode 100644
index 7797e76..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-94-d-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
deleted file mode 100644
index 3bbff4b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-data-uri-svg-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
deleted file mode 100644
index 30cf173..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-image-svg-expected.png
deleted file mode 100644
index fc4c482c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-image-svg-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-svg-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-svg-color-expected.png
deleted file mode 100644
index bdabcd6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-svg-color-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/mix-blend-mode-with-masking-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/mix-blend-mode-with-masking-expected.png
deleted file mode 100644
index 34cb18f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/mix-blend-mode-with-masking-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-014-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-014-expected.png
deleted file mode 100644
index e565d2d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-014-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-015-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-015-expected.png
deleted file mode 100644
index a3c58a1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-color-015-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/6476-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/6476-expected.png
deleted file mode 100644
index d8940a0e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/6476-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-left-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-left-expected.png
deleted file mode 100644
index 3c19eb25..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-left-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-right-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-right-expected.png
deleted file mode 100644
index f4ab4ab..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-right-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-expected.png
deleted file mode 100644
index 92b7c836..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-left-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-left-expected.png
deleted file mode 100644
index 6b1dc74..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-2-left-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-expected.png
deleted file mode 100644
index 445c46fc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-right-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-right-expected.png
deleted file mode 100644
index 41cc10b2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-rtl-right-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/click-start-of-line-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/click-start-of-line-expected.png
deleted file mode 100644
index ca1909e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/click-start-of-line-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/contenteditable-click-inside-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/contenteditable-click-inside-expected.png
deleted file mode 100644
index 8a18ef1e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/contenteditable-click-inside-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/move-past-trailing-space-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/move-past-trailing-space-expected.png
deleted file mode 100644
index 2b8f05c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/move-past-trailing-space-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
deleted file mode 100644
index 9612dd0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a testharness.js-based test.
-FAIL linebreak only assert_equals: expected 144 but got 151
-FAIL spaces linebreak assert_equals: expected 144 but got 151
-FAIL linebreak spaces assert_equals: expected 144 but got 151
-FAIL spaces linebreak spaces assert_equals: expected 144 but got 151
-FAIL multiple linebreaks assert_equals: expected 144 but got 151
-FAIL multiple linebreaks + spaces assert_equals: expected 144 but got 151
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
deleted file mode 100644
index 405bb8e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a testharness.js-based test.
-FAIL linebreak only assert_equals: expected 216 but got 223
-FAIL spaces linebreak assert_equals: expected 216 but got 223
-FAIL linebreak spaces assert_equals: expected 216 but got 223
-FAIL spaces linebreak spaces assert_equals: expected 216 but got 223
-FAIL multiple linebreaks assert_equals: expected 216 but got 223
-FAIL multiple linebreaks + spaces assert_equals: expected 216 but got 223
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
deleted file mode 100644
index 716b04b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a testharness.js-based test.
-FAIL linebreak only assert_equals: expected 48 but got 55
-FAIL spaces linebreak assert_equals: expected 48 but got 55
-FAIL linebreak spaces assert_equals: expected 48 but got 55
-FAIL spaces linebreak spaces assert_equals: expected 48 but got 55
-FAIL multiple linebreaks assert_equals: expected 48 but got 55
-FAIL multiple linebreaks + spaces assert_equals: expected 48 but got 55
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
deleted file mode 100644
index 283611a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a testharness.js-based test.
-FAIL linebreak only assert_equals: expected 120 but got 127
-FAIL spaces linebreak assert_equals: expected 120 but got 127
-FAIL linebreak spaces assert_equals: expected 120 but got 127
-FAIL spaces linebreak spaces assert_equals: expected 120 but got 127
-FAIL multiple linebreaks assert_equals: expected 120 but got 127
-FAIL multiple linebreaks + spaces assert_equals: expected 120 but got 127
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt
new file mode 100644
index 0000000..957e32b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL drm, temporary, mp4, playback with limited playduration, single key navigator.requestMediaKeySystemAccess is not a function
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt
new file mode 100644
index 0000000..148c250
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL drm, temporary, mp4, playback with limited playduration, check keystatus, single key navigator.requestMediaKeySystemAccess is not a function
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/infrastructure/assumptions/html-elements-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/infrastructure/assumptions/html-elements-expected.txt
deleted file mode 100644
index 5c6bf8b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/infrastructure/assumptions/html-elements-expected.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-This is a testharness.js-based test.
-PASS (pre-req for comparison tests) all CSS short-hand supported
-PASS (pre-req for comparison tests) initial CSS value supported
-FAIL Compare CSS div definitions (only valid if pre-reqs pass) assert_equals: Different value for unicode-bidi expected "isolate" but got "normal"
-PASS Compare CSS span definitions (only valid if pre-reqs pass)
-PASS p is display: block
-PASS ul > li is display: list-item
-PASS ol > li is display: list-item
-PASS table is display: table
-PASS tbody is display: table-row-group
-PASS tr is display: table-row
-PASS td is display: table-cell
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-instruments.https-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-instruments.https-expected.txt
deleted file mode 100644
index b011cd30..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-instruments.https-expected.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-This is a testharness.js-based test.
-FAIL Instrument keys are returned in the original insertion order promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Deleting an existing instrument returns true promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Deleting an existing instrument the second time returns false promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-PASS Deleting a non-existing instrument returns false
-FAIL Getting an existing instrument returns the instrument promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-PASS Getting a non-existing instrument returns undefined
-FAIL Resetting an existing instrument updates the instrument promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Clearing the instruments promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Cannot register instruments with invalid icon media type image/jif assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Don't crash when registering instruments with very long icon media type image/pngggggg... assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Don't crash when registering an instrument with a very long icon size 888...x888... promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Cannot register instruments with invalid icon size "256 256" (missing "x") assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Cannot register instruments with invalid icon URL (has a null character) assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Cannot register instruments with non-existing non-https icon URL assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Cannot register instruments with an existing non-https icon URL assert_throws: function "function() { throw e }" threw object "NotAllowedError: Not allowed to install this payment handler" ("NotAllowedError") expected object "TypeError" ("TypeError")
-FAIL Don't crash on very long key, name, method, and capability strings. promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-FAIL Don't crash on null characters in key, name, method, and capability strings. promise_test: Unhandled rejection with value: object "NotAllowedError: Not allowed to install this payment handler"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-request-event.https-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-request-event.https-expected.txt
deleted file mode 100644
index b76179f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-handler/payment-request-event.https-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a testharness.js-based test.
-FAIL Tests for PaymentRequestEvent Not allowed to install this payment handler
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt
new file mode 100644
index 0000000..4660a2de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt
@@ -0,0 +1,16 @@
+This is a testharness.js-based test.
+FAIL Must throw if it encounters an unknown currencySystem assert_throws: function "() => {
+    const invalidAmount = {
+      ...validAmount,
+      currencySystem: "this will cause the TypeError"
+    }
+    const invalidDetails = {
+      total: {
+        label: "",
+        amount: invalidAmount,
+      },
+    };
+    const request = new PaymentRequest(validMethods, invalidDetails);
+  }" did not throw
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/background-leakage-transforms-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/background-leakage-transforms-expected.png
deleted file mode 100644
index 1822aab5..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/background-leakage-transforms-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/gradient-background-leakage-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/gradient-background-leakage-expected.png
deleted file mode 100644
index 1728352..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/gradient-background-leakage-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
deleted file mode 100644
index a066426..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/svg-as-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/svg-as-mask-expected.png
deleted file mode 100644
index a766be8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/backgrounds/svg-as-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-circle-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-circle-expected.png
deleted file mode 100644
index 01c3b57..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-circle-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-double-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-double-expected.png
deleted file mode 100644
index 8d652b16..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-double-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-expected.png
deleted file mode 100644
index 1276165..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-constraints-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-different-width-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-different-width-001-expected.png
deleted file mode 100644
index 0066902..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-different-width-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusAllStylesAllCorners-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusAllStylesAllCorners-expected.png
deleted file mode 100644
index a2fa37c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusAllStylesAllCorners-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed02-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed02-expected.png
deleted file mode 100644
index 053d96d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed03-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed03-expected.png
deleted file mode 100644
index 5c0ac8e6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed04-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed04-expected.png
deleted file mode 100644
index dc21bc33..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed04-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed05-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed05-expected.png
deleted file mode 100644
index b632fb4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed05-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed06-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed06-expected.png
deleted file mode 100644
index 3301198..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed06-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted01-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted01-expected.png
deleted file mode 100644
index b0e39abd..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted01-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted02-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted02-expected.png
deleted file mode 100644
index 215b815..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted03-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted03-expected.png
deleted file mode 100644
index ccf5b82..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted04-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted04-expected.png
deleted file mode 100644
index 2e0d02b4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted04-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted06-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted06-expected.png
deleted file mode 100644
index 076ab0d0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDotted06-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble02-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble02-expected.png
deleted file mode 100644
index b00ce27da..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble03-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble03-expected.png
deleted file mode 100644
index e0c244ba2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDouble03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusInvalidColor-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusInvalidColor-expected.png
deleted file mode 100644
index 3aa1b49b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusInvalidColor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid01-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid01-expected.png
deleted file mode 100644
index 3f2af29..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid01-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid02-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid02-expected.png
deleted file mode 100644
index d46aa49..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid03-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid03-expected.png
deleted file mode 100644
index 2362d0e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusSolid03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dashed-1px-with-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dashed-1px-with-border-radius-expected.png
deleted file mode 100644
index 8db2782..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dashed-1px-with-border-radius-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dotted-border-ajoining-thick-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dotted-border-ajoining-thick-expected.png
deleted file mode 100644
index 636540c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/dotted-border-ajoining-thick-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/fieldsetBorderRadius-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/fieldsetBorderRadius-expected.png
deleted file mode 100644
index 889eb97..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/fieldsetBorderRadius-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/outline-alpha-block-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/outline-alpha-block-expected.png
deleted file mode 100644
index 758f927..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/outline-alpha-block-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/box-shadow-clipped-slices-expected.png
deleted file mode 100644
index f9284048e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/box-shadow-clipped-slices-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-subpixel-expected.png
deleted file mode 100644
index c49a41c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-subpixel-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
deleted file mode 100644
index 7482fd0e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-fill-expected.png
deleted file mode 100644
index b8fdf6c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-expected.png
deleted file mode 100644
index 25f6051..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-fill-expected.png
deleted file mode 100644
index 1fc5a0545..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-connecting-line-expected.png
deleted file mode 100644
index e9b38cf4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-ellipse-connecting-line-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-incremental-repaint-expected.png
deleted file mode 100644
index 8acf591..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-incremental-repaint-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
deleted file mode 100644
index 04be25950..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/downsample-quality-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/downsample-quality-expected.png
deleted file mode 100644
index 54c3794..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/downsample-quality-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/border-radius-non-negative-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/border-radius-non-negative-expected.png
deleted file mode 100644
index 9efe110e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/border-radius-non-negative-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-continuations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-continuations-expected.png
deleted file mode 100644
index 8261a8e59..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-continuations-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-detached-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-detached-expected.png
deleted file mode 100644
index 91a56cf..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-detached-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-expected.png
deleted file mode 100644
index 6a4c5d5..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-writingmode-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-writingmode-vertical-expected.png
deleted file mode 100644
index a3b0865..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-multiline-writingmode-vertical-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-color-expected.png
deleted file mode 100644
index 23fa48b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-color-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-offset-expected.png
deleted file mode 100644
index 8806712c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-offset-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/ignore-empty-focus-ring-rects-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/ignore-empty-focus-ring-rects-expected.png
deleted file mode 100644
index 2299fbe..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/ignore-empty-focus-ring-rects-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
deleted file mode 100644
index d9bfa81..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
deleted file mode 100644
index f2c7166d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png
deleted file mode 100644
index ce28b308..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png
deleted file mode 100644
index 1b2fda58..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png
deleted file mode 100644
index e0d3d038..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png
deleted file mode 100644
index c0d092d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/events/context-no-deselect-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/events/context-no-deselect-expected.png
deleted file mode 100644
index 00a6e5bfc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/events/context-no-deselect-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-expected.png
deleted file mode 100644
index 6e8f3b9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png
deleted file mode 100644
index e51549c3..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png
deleted file mode 100644
index fb9d7dd..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png
deleted file mode 100644
index 158d79fd..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-expected.png
deleted file mode 100644
index 26e8f98..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-step-expected.png
deleted file mode 100644
index b3c53ea3f3..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/month-picker-appearance-step-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-expected.png
deleted file mode 100644
index d4fa8b9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-expected.png
deleted file mode 100644
index 97d82d7..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
deleted file mode 100644
index e12ea66..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png
deleted file mode 100644
index 0f6feb1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png
deleted file mode 100644
index 80ac5f6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/input-appearance-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/input-appearance-color-expected.png
deleted file mode 100644
index 53c3f94f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/color/input-appearance-color-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/control-clip-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/control-clip-expected.png
deleted file mode 100644
index 69c947f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/control-clip-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
deleted file mode 100644
index dc5f977..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
deleted file mode 100644
index 657fc52..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png
deleted file mode 100644
index cc65b69..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/month/month-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/month/month-appearance-basic-expected.png
deleted file mode 100644
index 6bcea52..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/month/month-appearance-basic-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-datalist-expected.png
deleted file mode 100644
index 21e5e6d4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-datalist-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/input-appearance-range-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/input-appearance-range-expected.png
deleted file mode 100644
index 08f8183..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/input-appearance-range-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-appearance-basic-expected.png
deleted file mode 100644
index 74d4e9f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-appearance-basic-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-update-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-update-expected.png
deleted file mode 100644
index 00e39e3c5..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/range-update-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-thumb-shared-style-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-thumb-shared-style-expected.png
deleted file mode 100644
index 807eac08..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-thumb-shared-style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-cancel-button-style-sharing-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-cancel-button-style-sharing-expected.png
deleted file mode 100644
index 64ea9ff..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-cancel-button-style-sharing-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-rtl-expected.png
deleted file mode 100644
index f1689b0c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/search/search-rtl-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png
deleted file mode 100644
index adc1e90f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png
deleted file mode 100644
index f0ed297f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png
deleted file mode 100644
index 8557b8a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png
deleted file mode 100644
index 89f0518..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png
deleted file mode 100644
index e3ca8bd..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/tabbing-input-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/tabbing-input-iframe-expected.png
deleted file mode 100644
index 4a227a46..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/tabbing-input-iframe-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-appearance-selection-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-appearance-selection-expected.png
deleted file mode 100644
index 8a86530c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-appearance-selection-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-double-click-selection-gap-bug-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-double-click-selection-gap-bug-expected.png
deleted file mode 100644
index 8207f93..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-double-click-selection-gap-bug-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-1-expected.png
deleted file mode 100644
index d1e922e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-1-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-3-expected.png
deleted file mode 100644
index e4f355b0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-placeholder-visibility-3-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-tab-shows-caret-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-tab-shows-caret-expected.png
deleted file mode 100644
index c0bad69..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-tab-shows-caret-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-click-inside-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-click-inside-expected.png
deleted file mode 100644
index 19f1755f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-click-inside-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-double-click-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-double-click-expected.png
deleted file mode 100644
index c66343a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-double-click-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-option-delete-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-option-delete-expected.png
deleted file mode 100644
index ab57f903..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-option-delete-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-self-emptying-click-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-self-emptying-click-expected.png
deleted file mode 100644
index 7adf609..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-self-emptying-click-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/text-appearance-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/text-appearance-datalist-expected.png
deleted file mode 100644
index d1b7f7a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/text-appearance-datalist-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-focus-ring-expected.png
deleted file mode 100644
index f92df090..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-overflow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-overflow-expected.png
deleted file mode 100644
index 0e5e42c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/textfield-overflow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png
deleted file mode 100644
index ffe2d5f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png
deleted file mode 100644
index 65c51d0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/time/time-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/time/time-appearance-basic-expected.png
deleted file mode 100644
index bd4874a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/time/time-appearance-basic-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-2-expected.png
deleted file mode 100644
index e88e7fe..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-expected.png
deleted file mode 100644
index e88e7fe..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/25277-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-expected.png
deleted file mode 100644
index 7b8b229..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-2-expected.png
deleted file mode 100644
index 07a6f39..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/inline-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/inline-focus-ring-expected.png
deleted file mode 100644
index dd6cabc1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/inline-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/layers/opacity-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/layers/opacity-outline-expected.png
deleted file mode 100644
index 27a0a4a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/layers/opacity-outline-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/multicol/border-radius-clipped-layer-second-column-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/multicol/border-radius-clipped-layer-second-column-expected.png
deleted file mode 100644
index 1b60bfb..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/multicol/border-radius-clipped-layer-second-column-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/scrollRevealButton-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/scrollRevealButton-expected.png
deleted file mode 100644
index 449f063c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/scrollRevealButton-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/backgr_border-table-row-collapsed-border-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/backgr_border-table-row-collapsed-border-expected.png
deleted file mode 100644
index e27c67b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/backgr_border-table-row-collapsed-border-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-expected.png
deleted file mode 100644
index 585d1f1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-vertical-expected.png
deleted file mode 100644
index 4b7c86e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/001-vertical-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-vertical-expected.png
deleted file mode 100644
index 0f54b7b8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-vertical-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/table-row-focus-ring-paint-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/table-row-focus-ring-paint-expected.png
deleted file mode 100644
index b4fa19d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/table-row-focus-ring-paint-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
index 0e625ab..b82a785 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
index 44532598f..9a24cff 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/variable-fonts/cff2-variations-expected.png
new file mode 100644
index 0000000..257f37b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/variable-fonts/cff2-variations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/webfont-synthetic-bold-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/webfont-synthetic-bold-expected.png
deleted file mode 100644
index 82f3908..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/webfont-synthetic-bold-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/http/tests/misc/acid3-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/http/tests/misc/acid3-expected.png
new file mode 100644
index 0000000..f54a64f3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/http/tests/misc/acid3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png
deleted file mode 100644
index c83c278..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png
deleted file mode 100644
index e1e0829..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png
deleted file mode 100644
index d8890a0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png
deleted file mode 100644
index 23da72b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png
deleted file mode 100644
index 55dd643..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png
deleted file mode 100644
index 2f829d52..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png
deleted file mode 100644
index 3b6300b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png
deleted file mode 100644
index eabd253..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png
deleted file mode 100644
index b159e2a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png
deleted file mode 100644
index abf45b8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png
deleted file mode 100644
index bc483c20..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png
deleted file mode 100644
index 2fbad8c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png
deleted file mode 100644
index 2db6cd07..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-invalidation-expected.png
deleted file mode 100644
index c649c5f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-invalidation-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-overflow-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-overflow-position-expected.png
deleted file mode 100644
index ec3586ea..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/cross-fade-overflow-position-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-in-positioned-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-in-positioned-container-expected.png
deleted file mode 100644
index 917088bf..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-in-positioned-container-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-expected.png
deleted file mode 100644
index 7a5a6fa..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
deleted file mode 100644
index 6d706fb..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
deleted file mode 100644
index 6341a10..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-paint-root-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-paint-root-offset-expected.png
deleted file mode 100644
index 92a90adbb..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-paint-root-offset-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-scale-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-scale-transform-expected.png
deleted file mode 100644
index 8a06f086..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-with-scale-transform-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-circle-focus-ring-expected.png
deleted file mode 100644
index 9da7c0c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-circle-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-polygon-focus-ring-expected.png
deleted file mode 100644
index ead495f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-polygon-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png
deleted file mode 100644
index 43f125d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-drag-release-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-drag-release-expected.png
deleted file mode 100644
index 00e39e3c5..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-drag-release-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-float-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-float-expected.png
deleted file mode 100644
index a721445..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/slider-thumb-float-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt
deleted file mode 100644
index 888def38..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "layers": [
-    {
-      "name": "LayoutView #document",
-      "bounds": [800, 600],
-      "drawsContent": false,
-      "backgroundColor": "#FFFFFF"
-    },
-    {
-      "name": "Scrolling Layer",
-      "bounds": [800, 600],
-      "drawsContent": false
-    },
-    {
-      "name": "Scrolling Contents Layer",
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "backgroundColor": "#FFFFFF",
-      "paintInvalidations": [
-        {
-          "object": "LayoutButton INPUT",
-          "rect": [3, 4, 63, 29],
-          "reason": "subtree"
-        },
-        {
-          "object": "InlineTextBox 'Submit'",
-          "rect": [16, 11, 37, 14],
-          "reason": "subtree"
-        }
-      ]
-    }
-  ],
-  "objectPaintInvalidations": [
-    {
-      "object": "LayoutButton INPUT",
-      "reason": "subtree"
-    },
-    {
-      "object": "LayoutBlockFlow (anonymous)",
-      "reason": "subtree"
-    },
-    {
-      "object": "RootInlineBox",
-      "reason": "subtree"
-    },
-    {
-      "object": "LayoutText #text",
-      "reason": "subtree"
-    },
-    {
-      "object": "InlineTextBox 'Submit'",
-      "reason": "subtree"
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-enable-continuations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-enable-continuations-expected.png
deleted file mode 100644
index 5cb8d97..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-enable-continuations-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-layers-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-layers-expected.png
deleted file mode 100644
index 3c24af48..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-layers-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/inline-focus-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/inline-focus-expected.png
deleted file mode 100644
index 0f0551b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/inline-focus-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png
deleted file mode 100644
index c0bad69..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png
deleted file mode 100644
index 52eb251..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-with-composited-scroll-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-with-composited-scroll-expected.png
deleted file mode 100644
index 0c0638050..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/scroll/caret-with-composited-scroll-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png
deleted file mode 100644
index fc7c2a3d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png
deleted file mode 100644
index e5afb97c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-morphing-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-morphing-expected.png
deleted file mode 100644
index ffaa713..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-morphing-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/focus-element-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/focus-element-expected.png
deleted file mode 100644
index 8a2b489..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/focus-element-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-changes-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-changes-expected.png
deleted file mode 100644
index 9909f7a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-changes-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-removal-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-removal-expected.png
deleted file mode 100644
index 2b863aa..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-polygon-removal-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-addition-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-addition-expected.png
deleted file mode 100644
index 0c10bbf2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-addition-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-changes-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-changes-expected.png
deleted file mode 100644
index 0c10bbf2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-transform-changes-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/paintorder-filtered-expected.png
deleted file mode 100644
index de2306b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/paintorder-filtered-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/repaint-paintorder-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/repaint-paintorder-expected.png
deleted file mode 100644
index 210194a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/repaint-paintorder-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png
deleted file mode 100644
index 8125058..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/stroke-opacity-update-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/stroke-opacity-update-expected.png
deleted file mode 100644
index 595d8ef..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/stroke-opacity-update-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/svg-image-change-content-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/svg-image-change-content-size-expected.png
deleted file mode 100644
index d95666ca..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/svg-image-change-content-size-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-detach-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-detach-expected.png
deleted file mode 100644
index 755df1a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-detach-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-setAttribute-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-setAttribute-crash-expected.png
deleted file mode 100644
index 9467456..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/use-setAttribute-crash-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/table/table-cell-vertical-overflow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/table/table-cell-vertical-overflow-expected.png
deleted file mode 100644
index 2163838d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/table/table-cell-vertical-overflow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/plugins/webview-plugin-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/plugins/webview-plugin-border-radius-expected.png
deleted file mode 100644
index 98e010a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/plugins/webview-plugin-border-radius-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/scrollbars/border-box-rect-clips-scrollbars-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/scrollbars/border-box-rect-clips-scrollbars-expected.png
deleted file mode 100644
index 4f9b7d2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/scrollbars/border-box-rect-clips-scrollbars-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png
deleted file mode 100644
index d4ed447..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
deleted file mode 100644
index 8c9bc853..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png
deleted file mode 100644
index f6cb168..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
deleted file mode 100644
index 95896d4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
deleted file mode 100644
index 9fbebfe8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png
deleted file mode 100644
index 255e6550..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png
deleted file mode 100644
index ba7b01a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
deleted file mode 100644
index abb7587..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png
deleted file mode 100644
index 132216ec..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png
deleted file mode 100644
index 473af9a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/color-prop-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/color-prop-01-b-expected.png
deleted file mode 100644
index 3e0e01c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/color-prop-01-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
deleted file mode 100644
index 538f49b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
deleted file mode 100644
index 330fe5f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png
deleted file mode 100644
index 14d1554..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
deleted file mode 100644
index 9228976..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
deleted file mode 100644
index f0a4a0ca..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-04-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-04-t-expected.png
deleted file mode 100644
index efb450d1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-04-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-05-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
deleted file mode 100644
index 1a79710..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
deleted file mode 100644
index e060c762..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png
deleted file mode 100644
index 5f52e61..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-01-t-expected.png
deleted file mode 100644
index 416a43a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
deleted file mode 100644
index 2a152ef..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-03-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
deleted file mode 100644
index 51d988d9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-10-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-10-t-expected.png
deleted file mode 100644
index 40b1ab5..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-10-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-12-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-12-t-expected.png
deleted file mode 100644
index a2e112c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/paths-data-12-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-02-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-02-b-expected.png
deleted file mode 100644
index 1c97b9d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-02-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
deleted file mode 100644
index b27a7f07..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
deleted file mode 100644
index de6832bc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png
deleted file mode 100644
index 99502d58..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png
deleted file mode 100644
index 896f038..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png
deleted file mode 100644
index b4d7ce6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png
deleted file mode 100644
index 14698909..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png
deleted file mode 100644
index 82057d7..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png
deleted file mode 100644
index c667504..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-use-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-use-01-t-expected.png
deleted file mode 100644
index 8989246..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/struct-use-01-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/text-path-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/text-path-01-b-expected.png
deleted file mode 100644
index cbd288d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/text-path-01-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
deleted file mode 100644
index 03e50a0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
deleted file mode 100644
index c346fbc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1a-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1a-expected.png
deleted file mode 100644
index 0a9055e4c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1a-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1c-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1c-expected.png
deleted file mode 100644
index bcc3de2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-1c-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2a-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2a-expected.png
deleted file mode 100644
index dabade4a..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2a-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2b-expected.png
deleted file mode 100644
index 583efbc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/animations/animateMotion-accumulate-2b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
deleted file mode 100644
index 1fad25f33..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/same-image-two-instances-background-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/same-image-two-instances-background-image-expected.png
deleted file mode 100644
index 9210f9d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/same-image-two-instances-background-image-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/img-preserveAspectRatio-support-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/img-preserveAspectRatio-support-1-expected.png
deleted file mode 100644
index 407a741..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/img-preserveAspectRatio-support-1-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/same-image-two-instances-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/same-image-two-instances-expected.png
deleted file mode 100644
index 07ba2ff..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-image/same-image-two-instances-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/feTile-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/feTile-expected.png
deleted file mode 100644
index 8ae9a67..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/feTile-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/filterRegions-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/filterRegions-expected.png
deleted file mode 100644
index 386de5ed..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/filters/filterRegions-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/gradientLimit-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/gradientLimit-expected.png
deleted file mode 100644
index 04559851..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/gradientLimit-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternPreserveAspectRatioA-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternPreserveAspectRatioA-expected.png
deleted file mode 100644
index 418d6353..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternPreserveAspectRatioA-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternRegionA-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternRegionA-expected.png
deleted file mode 100644
index abc1d61a63..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/paints/patternRegionA-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/longTextOnPath-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/longTextOnPath-expected.png
deleted file mode 100644
index 70e0c66..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/longTextOnPath-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textFeatures-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textFeatures-expected.png
deleted file mode 100644
index f56620c9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textFeatures-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textGlyphOrientationHorizontal-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textGlyphOrientationHorizontal-expected.png
deleted file mode 100644
index c8f2bbdb..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textGlyphOrientationHorizontal-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textPosition-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textPosition-expected.png
deleted file mode 100644
index 5df77f83..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textPosition-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textProperties2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textProperties2-expected.png
deleted file mode 100644
index 0949b167..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textProperties2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/carto.net/button-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/carto.net/button-expected.png
deleted file mode 100644
index deccbb0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/carto.net/button-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-in-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-in-mask-expected.png
deleted file mode 100644
index c1a4266..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-in-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-child-clipped-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-child-clipped-expected.png
deleted file mode 100644
index ce43779..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-child-clipped-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
deleted file mode 100644
index 7532f38..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/css/text-shadow-multiple-expected.png
deleted file mode 100644
index 2fc528c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/css/text-shadow-multiple-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/circular-marker-reference-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/circular-marker-reference-2-expected.png
deleted file mode 100644
index 1dd1a4d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/circular-marker-reference-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/clone-element-with-animated-svg-properties-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/clone-element-with-animated-svg-properties-expected.png
deleted file mode 100644
index f4fc947..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/clone-element-with-animated-svg-properties-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/dasharrayOrigin-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/dasharrayOrigin-expected.png
deleted file mode 100644
index dd623da..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/dasharrayOrigin-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/gradient-stroke-width-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/gradient-stroke-width-expected.png
deleted file mode 100644
index bde8ad55..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/gradient-stroke-width-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/invalid-css-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/invalid-css-expected.png
deleted file mode 100644
index 55b1c442..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/invalid-css-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-expected.png
deleted file mode 100644
index 29a9e69..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-transform-expected.png
deleted file mode 100644
index bdd38fb..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/linking-a-03-b-viewBox-transform-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-opacity-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-opacity-expected.png
deleted file mode 100644
index ce19399..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-opacity-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-orient-auto-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-orient-auto-expected.png
deleted file mode 100644
index e795349..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/marker-orient-auto-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-circular-marker-reference-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-circular-marker-reference-expected.png
deleted file mode 100644
index 53ca8cd..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-circular-marker-reference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
deleted file mode 100644
index a3b502c0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/second-inline-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/second-inline-text-expected.png
deleted file mode 100644
index d6daa39..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/second-inline-text-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/shapes-supporting-markers-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/shapes-supporting-markers-expected.png
deleted file mode 100644
index c556f44..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/shapes-supporting-markers-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-css-no-effect-on-shadow-tree-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
deleted file mode 100644
index ad529ec8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-on-symbol-inside-pattern-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-on-symbol-inside-pattern-expected.png
deleted file mode 100644
index f0d3f05..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/use-on-symbol-inside-pattern-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/filters/feDropShadow-expected.png
deleted file mode 100644
index 712b4b2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/filters/feDropShadow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/hixie/error/017-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/hixie/error/017-expected.png
deleted file mode 100644
index 360b944..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/hixie/error/017-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
deleted file mode 100644
index a248a89..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/small-fonts-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/small-fonts-3-expected.png
deleted file mode 100644
index 149f7db..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/small-fonts-3-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/text-selection-path-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/text-selection-path-01-b-expected.png
deleted file mode 100644
index b04506b..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/text/text-selection-path-01-b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
deleted file mode 100644
index c425dc0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
deleted file mode 100644
index c425dc0..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png
deleted file mode 100644
index 18e5488..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
deleted file mode 100644
index ba89c3e9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/tables/mozilla/marvin/tables_style-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/tables/mozilla/marvin/tables_style-expected.png
deleted file mode 100644
index 6393592..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/tables/mozilla/marvin/tables_style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png
deleted file mode 100644
index 305253e..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png
deleted file mode 100644
index 70c7b2c9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
deleted file mode 100644
index 01483d8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
deleted file mode 100644
index 89cb1a9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png
deleted file mode 100644
index 9cbcbce6..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png
deleted file mode 100644
index 9b84304..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png
deleted file mode 100644
index 8fa8c43..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png
deleted file mode 100644
index 58f2c21..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png
deleted file mode 100644
index ff075a8..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
deleted file mode 100644
index c56423f2..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/downsample-quality-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/downsample-quality-expected.png
deleted file mode 100644
index a232d55..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/downsample-quality-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-2-expected.png
deleted file mode 100644
index e88e7fe..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-expected.png
deleted file mode 100644
index e88e7fe..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/layout_ng/fast/inline/25277-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/mouseevent_fractional/fast/events/context-no-deselect-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/mouseevent_fractional/fast/events/context-no-deselect-expected.png
deleted file mode 100644
index 00a6e5bfc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/mouseevent_fractional/fast/events/context-no-deselect-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-above-composited-subframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-above-composited-subframe-expected.png
deleted file mode 100644
index 1a941fc1..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-above-composited-subframe-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
deleted file mode 100644
index ec5efbc..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
deleted file mode 100644
index bd6875c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
deleted file mode 100644
index bd6875c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
deleted file mode 100644
index bd6875c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
deleted file mode 100644
index 4cfe02d..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
deleted file mode 100644
index 4cef308..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
index 0e625ab..b82a785 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
deleted file mode 100644
index 44532598f..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-above-composited-subframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-above-composited-subframe-expected.png
index 55024e3..1a941fc1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-above-composited-subframe-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-above-composited-subframe-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css1/box_properties/border_style-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css1/box_properties/border_style-expected.png
index af90f7e..20a3c2b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css1/box_properties/border_style-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css1/box_properties/border_style-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t0805-c5517-brdr-s-00-c-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t0805-c5517-brdr-s-00-c-expected.png
index 912184f..89abc3d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t0805-c5517-brdr-s-00-c-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t0805-c5517-brdr-s-00-c-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-14-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-14-d-expected.png
index ac7c68c0..3d7d1b6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-14-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-14-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-24-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-24-d-expected.png
index 75613ab..d33c165 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-24-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-24-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-41-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-41-d-expected.png
index 8c9216ffe..a034fb9e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-41-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-41-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-42-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-42-d-expected.png
index 3f26901..eb04210 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-42-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-42-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-43-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-43-d-expected.png
index b451f3ad..6381143 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-43-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-43-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-45-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-45-d-expected.png
index 159a3da0..4a08cde 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-45-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-45-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-46-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-46-d-expected.png
index 7297bdd..41edbb3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-46-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-46-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-48-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-48-d-expected.png
index 2f10843e..5eeb56a4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-48-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-48-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-54-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-54-d-expected.png
index 4e784cd..5df2826 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-54-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-54-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-64-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-64-d-expected.png
index 5303b08..603e50b7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-64-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-64-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-74-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-74-d-expected.png
index 7a2848a0..5f9e1b1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-74-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-74-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-84-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-84-d-expected.png
index 097c44a..4ca146a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-84-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-84-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-94-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-94-d-expected.png
index 55eb9d73..7797e76 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-94-d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-94-d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-014-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-014-expected.png
index 84a95e55..e565d2d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-014-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-014-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-015-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-015-expected.png
index c2957ffe..a3c58a1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-015-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-color-015-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png
index b32819b8..484e855c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/6476-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/6476-expected.png
index 4de1d84..d8940a0e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/6476-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/6476-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-left-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-left-expected.png
index c403a411..3c19eb25 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-left-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-left-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-right-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-right-expected.png
index d3f5adf..f4ab4ab 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-right-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-right-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-expected.png
index fc379a0..92b7c836 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-left-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-left-expected.png
index 3014c25..6b1dc74 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-left-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-2-left-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-expected.png
index 9966abce..445c46fc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-right-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-right-expected.png
index 587934b..41cc10b2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-right-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-rtl-right-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/click-start-of-line-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/click-start-of-line-expected.png
index fcb9917..ca1909e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/click-start-of-line-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/click-start-of-line-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/contenteditable-click-inside-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/contenteditable-click-inside-expected.png
index a5a0cb3..8a18ef1e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/contenteditable-click-inside-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/contenteditable-click-inside-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/move-past-trailing-space-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/move-past-trailing-space-expected.png
index 3cdc718..2b8f05c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/move-past-trailing-space-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/move-past-trailing-space-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-004-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-004-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-004-expected.txt
rename to third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-004-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-016-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-016-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-016-expected.txt
rename to third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-016-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-017-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-017-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-017-expected.txt
rename to third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/seg-break-transformation-017-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/white-space-collapse-002-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/white-space-collapse-002-expected.txt
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/white-space-collapse-002-expected.txt
rename to third_party/WebKit/LayoutTests/platform/mac/external/wpt/css/css-text/white-space/white-space-collapse-002-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.png
index f9f429e..1822aab5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
index 7d12fc42..a066426 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-double-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-double-expected.png
index d0cab82..8d652b16 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-double-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-double-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-expected.png
index 14a1db1..1276165 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-constraints-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png
index cfe6e8a..a2fa37c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusInvalidColor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusInvalidColor-expected.png
index 84af4dd2..3aa1b49b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusInvalidColor-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/borderRadiusInvalidColor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/dashed-1px-with-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/dashed-1px-with-border-radius-expected.png
index 617050db..8db2782 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/dashed-1px-with-border-radius-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/dashed-1px-with-border-radius-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/mixed-border-styles-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/mixed-border-styles-radius-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/mixed-border-styles-radius-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/fast/borders/mixed-border-styles-radius-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/outline-alpha-block-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/outline-alpha-block-expected.png
index 343efb75..758f927 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/outline-alpha-block-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/outline-alpha-block-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png
index ccfd5df..c49a41c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png
index 5d1cfde..8acf591 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-continuations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-continuations-expected.png
index e397bcf..8261a8e59 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-continuations-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-continuations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-detached-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-detached-expected.png
index 66b8f8a..91a56cf 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-detached-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-detached-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-expected.png
index cb91899..6a4c5d5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png
index 3b94a0d..a3b0865 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-color-expected.png
index db787573..23fa48b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-color-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-color-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-offset-expected.png
index 9fa8ce7..8806712c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-offset-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-offset-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/ignore-empty-focus-ring-rects-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/ignore-empty-focus-ring-rects-expected.png
index db7a5b96..2299fbe 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/ignore-empty-focus-ring-rects-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/ignore-empty-focus-ring-rects-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png
index 31ae64e..ce28b308 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png
index a1541b25a..1b2fda58 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-links-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png
index 107b043a..e0d3d038 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-not-propagated-by-out-of-flow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png
index db7b8f7..c0d092d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-style-inherit-simple-underlines-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/events/context-no-deselect-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/events/context-no-deselect-expected.png
index 67d4647..00a6e5bfc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/events/context-no-deselect-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/events/context-no-deselect-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png
index 4956005..6e8f3b9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png
index 773f2fdc..e51549c3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png
index 92b3279..fb9d7dd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png
index 9c0c8d0..158d79fd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png
index 082f070..26e8f98 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png
index ba68dc6..b3c53ea3f3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png
index f468c3c..d4fa8b9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png
index 7d5ffb61..97d82d7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
index 5ac3e247b8..e12ea66 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png
index 4d64e94d..0f6feb1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png
index 2130690a..80ac5f6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.png
index 3f28e49..53c3f94f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/control-clip-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/control-clip-expected.png
index 9406ca3..69c947f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/control-clip-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/control-clip-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
index 9918ed2..dc5f977 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
index d6832828..657fc52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png
index 965482f..cc65b69 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datetimelocal/datetimelocal-appearance-basic-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/month/month-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/month/month-appearance-basic-expected.png
index ded8426..6bcea52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/month/month-appearance-basic-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/month/month-appearance-basic-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-datalist-expected.png
index 2709ab5..21e5e6d4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-datalist-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-datalist-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png
index 5c5a1b5..08f8183 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png
index ffab4d2..74d4e9f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-update-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-update-expected.png
index a7766d1..00e39e3c5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-update-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-update-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png
index 5b95e0b..807eac08 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-cancel-button-style-sharing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-cancel-button-style-sharing-expected.png
index 318beb4..64ea9ff 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-cancel-button-style-sharing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-cancel-button-style-sharing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-rtl-expected.png
index 6bd1f27..f1689b0c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-rtl-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-rtl-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png
index 0dd5274..adc1e90f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png
index 2dbdc43..f0ed297f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png
index d4b35e60..8557b8a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png
index 3682cf3e..89f0518 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png
index 4e65779..e3ca8bd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.png
index 89d52cf5..4a227a46 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-appearance-selection-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-appearance-selection-expected.png
index 0fb1ba5..8a86530c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-appearance-selection-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-appearance-selection-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-double-click-selection-gap-bug-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-double-click-selection-gap-bug-expected.png
index ac811fd1..8207f93 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-double-click-selection-gap-bug-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-double-click-selection-gap-bug-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-1-expected.png
index 1572043..d1e922e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-1-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-1-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-3-expected.png
index 20754ca..e4f355b0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-placeholder-visibility-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-tab-shows-caret-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-tab-shows-caret-expected.png
index 2d855c9..c0bad69 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-tab-shows-caret-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-tab-shows-caret-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-click-inside-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-click-inside-expected.png
index 39c505ff..19f1755f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-click-inside-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-click-inside-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-double-click-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-double-click-expected.png
index 5dd3665..c66343a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-double-click-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-double-click-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-option-delete-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-option-delete-expected.png
index 5c811d8f..ab57f903 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-option-delete-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-option-delete-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-self-emptying-click-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-self-emptying-click-expected.png
index 0a0cfca..7adf609 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-self-emptying-click-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-self-emptying-click-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-datalist-expected.png
index 89a5247..d1b7f7a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-datalist-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-datalist-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-focus-ring-expected.png
index d376441..f92df090 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-overflow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-overflow-expected.png
index 1ee2b5d..0e5e42c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-overflow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/textfield-overflow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png
index a3ac00c..ffe2d5f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png
index 56dd5dd..65c51d0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/time/time-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/time/time-appearance-basic-expected.png
index 814b2c0a..bd4874a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/time/time-appearance-basic-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/time/time-appearance-basic-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-2-expected.png
index acf2f8a..e88e7fe 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-expected.png
index acf2f8a..e88e7fe 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/25277-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.png
index 0ae30bf..7b8b229 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-2-expected.png
index 43f2e00..07a6f39 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/inline-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/inline-focus-ring-expected.png
index 73c9e475..dd6cabc1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/inline-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/inline-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/layers/opacity-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/layers/opacity-outline-expected.png
index 4708c1d..27a0a4a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/layers/opacity-outline-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/layers/opacity-outline-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/border-radius-clipped-layer-second-column-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/border-radius-clipped-layer-second-column-expected.png
index 92a301a..1b60bfb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/border-radius-clipped-layer-second-column-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/border-radius-clipped-layer-second-column-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/scrollRevealButton-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/scrollRevealButton-expected.png
index 71013da..449f063c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/scrollRevealButton-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/scrollRevealButton-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/backgr_border-table-row-collapsed-border-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/backgr_border-table-row-collapsed-border-expected.png
index c3600c8..e27c67b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/backgr_border-table-row-collapsed-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/backgr_border-table-row-collapsed-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-expected.png
index 45823dc..585d1f1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-vertical-expected.png
index 4596775..4b7c86e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-vertical-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/001-vertical-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-vertical-expected.png
index f1e8b96..0f54b7b8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-vertical-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-vertical-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/table-row-focus-ring-paint-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/table-row-focus-ring-paint-expected.png
index 6dbd2d6..b4fa19d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/table-row-focus-ring-paint-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/table-row-focus-ring-paint-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/webfont-synthetic-bold-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/webfont-synthetic-bold-expected.png
index 24a7809..82f3908 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/webfont-synthetic-bold-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/webfont-synthetic-bold-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/http/tests/misc/acid3-expected.png b/third_party/WebKit/LayoutTests/platform/mac/http/tests/misc/acid3-expected.png
index f54a64f3..9c8da35b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/http/tests/misc/acid3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/http/tests/misc/acid3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png
index a5324ff..c83c278 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-004-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png
index a53ae312..e1e0829 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png
index baf80279..d8890a0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png
index b4a6f32..23da72b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png
index 1bb6fe6..55dd643 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png
index a86356a1..2f829d52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png
index bda37a1..3b6300b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png
index bf875b9..eabd253 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png
index 12a32fab..b159e2a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png
index 6814f01..abf45b8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png
index 6ce256a..bc483c20 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png
index 3a046b4..2fbad8c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png
index 625dc0e..2db6cd07 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-in-positioned-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-in-positioned-container-expected.png
index 8213251c..917088bf 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-in-positioned-container-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-in-positioned-container-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-expected.png
index c057593..7a5a6fa 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
index 2f971df3..6d706fb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
index d93d411..6341a10 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-paint-root-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-paint-root-offset-expected.png
index 9793e7c..92a90adbb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-paint-root-offset-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-paint-root-offset-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-scale-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-scale-transform-expected.png
index f8d61c8a..8a06f086 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-scale-transform-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-with-scale-transform-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-circle-focus-ring-expected.png
index 83f56ac0..9da7c0c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-circle-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-circle-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-polygon-focus-ring-expected.png
index 2600fb07..ead495f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-polygon-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-polygon-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png
index 368e9c74..43f125d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-drag-release-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-drag-release-expected.png
index a7766d1..00e39e3c5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-drag-release-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-drag-release-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-float-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-float-expected.png
index 42e74b8b..a721445 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-float-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/slider-thumb-float-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt
index b7ef6b8..888def38 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/submit-focus-by-mouse-then-keydown-expected.txt
@@ -23,14 +23,9 @@
           "reason": "subtree"
         },
         {
-          "object": "LayoutText #text",
+          "object": "InlineTextBox 'Submit'",
           "rect": [16, 11, 37, 14],
           "reason": "subtree"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [16, 11, 37, 13],
-          "reason": "subtree"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-enable-continuations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-enable-continuations-expected.png
index b6f677c..5cb8d97 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-enable-continuations-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-enable-continuations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-layers-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-layers-expected.png
index ee3447e6..3c24af48 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-layers-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-layers-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/inline-focus-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/inline-focus-expected.png
index 638fa78..0f0551b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/inline-focus-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/inline-focus-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png
index 2d855c9..c0bad69 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/renderer-destruction-by-invalidateSelection-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png
index 8fbbd80..52eb251 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-invalidation-in-overflow-scroll-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.png
index cacf24b..0c0638050 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png
index c6a9738..fc7c2a3d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-composited-scrolling-container-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png
index 80def35..e5afb97c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-in-non-composited-scrolling-container-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/focus-element-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/focus-element-expected.png
index 989cf79..8a2b489 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/focus-element-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/focus-element-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png
index 058d2fc..8125058 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/svg-image-change-content-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/svg-image-change-content-size-expected.png
index 50c3177..d95666ca 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/svg-image-change-content-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/svg-image-change-content-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-detach-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-detach-expected.png
index f7d9a59..755df1a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-detach-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-detach-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/plugins/webview-plugin-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/plugins/webview-plugin-border-radius-expected.png
index 93e66da..98e010a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/plugins/webview-plugin-border-radius-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/plugins/webview-plugin-border-radius-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/scrollbars/border-box-rect-clips-scrollbars-expected.png b/third_party/WebKit/LayoutTests/platform/mac/scrollbars/border-box-rect-clips-scrollbars-expected.png
index fa48bc9e..4f9b7d2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/scrollbars/border-box-rect-clips-scrollbars-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/scrollbars/border-box-rect-clips-scrollbars-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png
index 612adf7..d4ed447 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
index a5761a7..8c9bc853 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png
index bd49f81..f6cb168 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-28-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
index 6032533..95896d4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
index 7b14cb1..9fbebfe8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png
index 5c9940e..255e6550 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png
index 3f5650e5..ba7b01a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
index 2d09005e..abb7587 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png
index e8f114d..132216ec 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-52-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png
index cb7ddc2..473af9a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-81-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/color-prop-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/color-prop-01-b-expected.png
index 032f9ab..3e0e01c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/color-prop-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/color-prop-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
index 2efd86f..538f49b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
index 97858b9..330fe5f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png
index 3b600eb..14d1554 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
index df28cd8..9228976 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
index 5bc6abe..f0a4a0ca 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-04-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-04-t-expected.png
index 9fc5fff..efb450d1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-04-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-04-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
index 3cc8bbf..1a79710 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
index 5a7be6eb..e060c762 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png
index 92628e9..5f52e61 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-04-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-01-t-expected.png
index 1e11efe..416a43a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
index d78edffd..2a152ef 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
index 87a721c..51d988d9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-10-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-10-t-expected.png
index 66e04f7..40b1ab5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-10-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-10-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-12-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-12-t-expected.png
index f410238..a2e112c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-12-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-12-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-02-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-02-b-expected.png
index f9123aa..1c97b9d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-02-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-02-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
index 798b11c..b27a7f07 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
index 7a42023..de6832bc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png
index ea40247e..99502d58 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png
index 5f29256c71..896f038 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png
index 7cd41ad..b4d7ce6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png
index 252bd9a8..14698909 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png
index 08c7426..82057d7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png
index a0d02fd..c667504 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-06-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-use-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-use-01-t-expected.png
index 30b1e12..8989246 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-use-01-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-use-01-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png
index 833a66d..cbd288d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
index f223c4dc..03e50a0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
index 808024b..c346fbc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1a-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1a-expected.png
index 95afa31..0a9055e4c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1a-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1a-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1c-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1c-expected.png
index d331833..bcc3de2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1c-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/animations/animateMotion-accumulate-1c-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
index aa8a96f0..1fad25f33 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/background-repeat-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-repeat-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/background-repeat-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/background-repeat-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png
index 5d50e3b..407a741 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png
index cb260e92..8ae9a67 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/filterRegions-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/filterRegions-expected.png
index 37d676a5..386de5ed 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/filterRegions-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/filterRegions-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/gradientLimit-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/gradientLimit-expected.png
index 4a65068e..04559851 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/gradientLimit-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/gradientLimit-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternPreserveAspectRatioA-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternPreserveAspectRatioA-expected.png
index 74e1ae1..418d6353 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternPreserveAspectRatioA-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternPreserveAspectRatioA-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternRegionA-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternRegionA-expected.png
index 8fb86aa..abc1d61a63 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternRegionA-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/paints/patternRegionA-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/longTextOnPath-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/longTextOnPath-expected.png
index 5d3ee6d..70e0c66 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/longTextOnPath-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/longTextOnPath-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.png
index 6d9395a..f56620c9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textGlyphOrientationHorizontal-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textGlyphOrientationHorizontal-expected.png
index adabf4c..c8f2bbdb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textGlyphOrientationHorizontal-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textGlyphOrientationHorizontal-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textPosition-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textPosition-expected.png
index 488931c..5df77f83 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textPosition-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textPosition-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties2-expected.png
index 67c0a49..0949b167 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/button-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/button-expected.png
index 96027fa..deccbb0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/button-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/button-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png
index 6865883..2fc528c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clone-element-with-animated-svg-properties-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clone-element-with-animated-svg-properties-expected.png
index 600a59437..f4fc947 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clone-element-with-animated-svg-properties-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clone-element-with-animated-svg-properties-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/invalid-css-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/invalid-css-expected.png
index 35596f5..55b1c442 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/invalid-css-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/invalid-css-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-expected.png
index bac9628..29a9e69 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-transform-expected.png
index 4ada349..bdd38fb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-transform-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/linking-a-03-b-viewBox-transform-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/marker-orient-auto-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/marker-orient-auto-expected.png
index 7827b95..e795349 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/marker-orient-auto-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/marker-orient-auto-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/second-inline-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/second-inline-text-expected.png
index 30e1eb2..d6daa39 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/second-inline-text-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/second-inline-text-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/shapes-supporting-markers-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/shapes-supporting-markers-expected.png
index 28cb704..c556f44 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/shapes-supporting-markers-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/shapes-supporting-markers-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-on-symbol-inside-pattern-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-on-symbol-inside-pattern-expected.png
index ebaaca9..f0d3f05 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-on-symbol-inside-pattern-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-on-symbol-inside-pattern-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/hixie/error/017-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/hixie/error/017-expected.png
index ca91365..360b944 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/hixie/error/017-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/hixie/error/017-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/small-fonts-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/text/small-fonts-3-expected.png
index a456c101..149f7db 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/small-fonts-3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/small-fonts-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-path-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-path-01-b-expected.png
index c3544a4..b04506b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-path-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-path-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
index 3edf887..c425dc0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
index 3edf887..c425dc0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png
index 2842558..18e5488 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
index 9f1a7f4..ba89c3e9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/marvin/tables_style-expected.png b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/marvin/tables_style-expected.png
index d45bf2b..6393592 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/marvin/tables_style-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/marvin/tables_style-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png
index 0a95c70..305253e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png
index 1ff122a..70c7b2c9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
index 637abb9..01483d8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
index 0c6a756..89cb1a9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png
index ac9a85ed..9cbcbce6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png
index 2532844..9b84304 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png
index 7991c57..8fa8c43 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png
index 63d075e2..58f2c21 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png
index 2e2a62a..ff075a8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-polygon-focus-ring-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/downsample-quality-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/downsample-quality-expected.png
index 38523ea..a232d55 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/downsample-quality-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/downsample-quality-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-styles-with-composited-child-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-styles-with-composited-child-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-styles-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
similarity index 100%
rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
rename to third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
index c1689d29..4cef308 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
deleted file mode 100644
index 3bbff4b..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-data-uri-svg-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
deleted file mode 100644
index 30cf173..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-data-uri-svg-image-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-image-svg-expected.png
deleted file mode 100644
index fc4c482c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-image-svg-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-svg-color-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-svg-color-expected.png
deleted file mode 100644
index bdabcd6..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-svg-color-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/mix-blend-mode-with-masking-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/mix-blend-mode-with-masking-expected.png
deleted file mode 100644
index 34cb18f..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/mix-blend-mode-with-masking-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt
new file mode 100644
index 0000000..957e32b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL drm, temporary, mp4, playback with limited playduration, single key navigator.requestMediaKeySystemAccess is not a function
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt
new file mode 100644
index 0000000..148c250
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL drm, temporary, mp4, playback with limited playduration, check keystatus, single key navigator.requestMediaKeySystemAccess is not a function
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt
new file mode 100644
index 0000000..4660a2de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt
@@ -0,0 +1,16 @@
+This is a testharness.js-based test.
+FAIL Must throw if it encounters an unknown currencySystem assert_throws: function "() => {
+    const invalidAmount = {
+      ...validAmount,
+      currencySystem: "this will cause the TypeError"
+    }
+    const invalidDetails = {
+      total: {
+        label: "",
+        amount: invalidAmount,
+      },
+    };
+    const request = new PaymentRequest(validMethods, invalidDetails);
+  }" did not throw
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
deleted file mode 100644
index ff8f71c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a testharness.js-based test.
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise
-PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true
-PASS Errors must be propagated forward: shutdown must not occur until the final write completes
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort"
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/gradient-background-leakage-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/gradient-background-leakage-expected.png
deleted file mode 100644
index 1728352..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/gradient-background-leakage-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/svg-as-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/svg-as-mask-expected.png
deleted file mode 100644
index a766be8..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/svg-as-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-circle-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-circle-expected.png
deleted file mode 100644
index 01c3b57..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-circle-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-different-width-001-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-different-width-001-expected.png
deleted file mode 100644
index 0066902..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-different-width-001-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed02-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed02-expected.png
deleted file mode 100644
index 053d96d..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed03-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed03-expected.png
deleted file mode 100644
index 5c0ac8e6..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed04-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed04-expected.png
deleted file mode 100644
index dc21bc33..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed04-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed05-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed05-expected.png
deleted file mode 100644
index b632fb4..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed05-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed06-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed06-expected.png
deleted file mode 100644
index 3301198..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed06-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted01-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted01-expected.png
deleted file mode 100644
index b0e39abd..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted01-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted02-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted02-expected.png
deleted file mode 100644
index 215b815..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted03-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted03-expected.png
deleted file mode 100644
index ccf5b82..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted04-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted04-expected.png
deleted file mode 100644
index 2e0d02b4..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted04-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted06-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted06-expected.png
deleted file mode 100644
index 076ab0d0..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDotted06-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble02-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble02-expected.png
deleted file mode 100644
index b00ce27da..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble03-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble03-expected.png
deleted file mode 100644
index e0c244ba2..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDouble03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid01-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid01-expected.png
deleted file mode 100644
index 3f2af29..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid01-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid02-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid02-expected.png
deleted file mode 100644
index d46aa49..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid02-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid03-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid03-expected.png
deleted file mode 100644
index 2362d0e..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusSolid03-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/dotted-border-ajoining-thick-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/dotted-border-ajoining-thick-expected.png
deleted file mode 100644
index 636540c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/dotted-border-ajoining-thick-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/fieldsetBorderRadius-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/fieldsetBorderRadius-expected.png
deleted file mode 100644
index 889eb97..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/fieldsetBorderRadius-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png
deleted file mode 100644
index f9284048e..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
deleted file mode 100644
index 7482fd0e..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-fill-expected.png
deleted file mode 100644
index b8fdf6c..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-expected.png
deleted file mode 100644
index 25f6051..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-fill-expected.png
deleted file mode 100644
index 1fc5a0545..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-connecting-line-expected.png
deleted file mode 100644
index e9b38cf4..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-ellipse-connecting-line-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
deleted file mode 100644
index 04be25950..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/downsample-quality-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/downsample-quality-expected.png
deleted file mode 100644
index 54c3794..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/downsample-quality-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/border-radius-non-negative-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/border-radius-non-negative-expected.png
deleted file mode 100644
index 9efe110e..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/css/border-radius-non-negative-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
deleted file mode 100644
index d9bfa81..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-skip-ink-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
deleted file mode 100644
index f2c7166d..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/fast/css3-text/css3-text-decoration/text-decoration-style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/text/variable-fonts/cff2-variations-expected.png
new file mode 100644
index 0000000..01b762e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/text/variable-fonts/cff2-variations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-invalidation-expected.png
deleted file mode 100644
index c649c5f..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-invalidation-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-overflow-position-expected.png b/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-overflow-position-expected.png
deleted file mode 100644
index ec3586ea..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-overflow-position-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-morphing-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-morphing-expected.png
deleted file mode 100644
index ffaa713..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-morphing-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-changes-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-changes-expected.png
deleted file mode 100644
index 9909f7a..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-changes-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-removal-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-removal-expected.png
deleted file mode 100644
index 2b863aa..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-polygon-removal-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-addition-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-addition-expected.png
deleted file mode 100644
index 0c10bbf2..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-addition-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-changes-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-changes-expected.png
deleted file mode 100644
index 0c10bbf2..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-transform-changes-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png
deleted file mode 100644
index de2306b..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/repaint-paintorder-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/repaint-paintorder-expected.png
deleted file mode 100644
index 210194a..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/repaint-paintorder-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/stroke-opacity-update-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/stroke-opacity-update-expected.png
deleted file mode 100644
index 595d8ef..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/stroke-opacity-update-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-setAttribute-crash-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-setAttribute-crash-expected.png
deleted file mode 100644
index 9467456..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-setAttribute-crash-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-vertical-overflow-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-vertical-overflow-expected.png
deleted file mode 100644
index 2163838d..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-vertical-overflow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2a-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2a-expected.png
deleted file mode 100644
index dabade4a..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2a-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2b-expected.png
deleted file mode 100644
index 583efbc..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/animations/animateMotion-accumulate-2b-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/same-image-two-instances-background-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/same-image-two-instances-background-image-expected.png
deleted file mode 100644
index 9210f9d..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/same-image-two-instances-background-image-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/as-image/same-image-two-instances-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/as-image/same-image-two-instances-expected.png
deleted file mode 100644
index 07ba2ff..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/as-image/same-image-two-instances-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-in-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-in-mask-expected.png
deleted file mode 100644
index c1a4266..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-in-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-child-clipped-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-child-clipped-expected.png
deleted file mode 100644
index ce43779..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-child-clipped-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
deleted file mode 100644
index 7532f38..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/circular-marker-reference-2-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/circular-marker-reference-2-expected.png
deleted file mode 100644
index 1dd1a4d..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/circular-marker-reference-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/dasharrayOrigin-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/dasharrayOrigin-expected.png
deleted file mode 100644
index dd623da..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/dasharrayOrigin-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/gradient-stroke-width-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/gradient-stroke-width-expected.png
deleted file mode 100644
index bde8ad55..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/gradient-stroke-width-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/marker-opacity-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/marker-opacity-expected.png
deleted file mode 100644
index ce19399..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/marker-opacity-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-circular-marker-reference-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-circular-marker-reference-expected.png
deleted file mode 100644
index 53ca8cd..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-circular-marker-reference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
deleted file mode 100644
index a3b502c0..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-css-no-effect-on-shadow-tree-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
deleted file mode 100644
index ad529ec8..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png
deleted file mode 100644
index 712b4b2..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
deleted file mode 100644
index a248a89..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
deleted file mode 100644
index c56423f2..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/variable-fonts/cff2-variations-expected.png
new file mode 100644
index 0000000..5447a04
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/variable-fonts/cff2-variations-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.png b/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.png
index fb8d45e1..dabade4a 100644
--- a/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.png b/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.png
index 879babb..583efbc 100644
--- a/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/as-background-image/background-repeat-expected.png b/third_party/WebKit/LayoutTests/svg/as-background-image/background-repeat-expected.png
deleted file mode 100644
index 8d32840..0000000
--- a/third_party/WebKit/LayoutTests/svg/as-background-image/background-repeat-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/as-background-image/same-image-two-instances-background-image-expected.png b/third_party/WebKit/LayoutTests/svg/as-background-image/same-image-two-instances-background-image-expected.png
index acf16b7..9210f9d 100644
--- a/third_party/WebKit/LayoutTests/svg/as-background-image/same-image-two-instances-background-image-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/as-background-image/same-image-two-instances-background-image-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/as-image/same-image-two-instances-expected.png b/third_party/WebKit/LayoutTests/svg/as-image/same-image-two-instances-expected.png
index e1f364f2..07ba2ff 100644
--- a/third_party/WebKit/LayoutTests/svg/as-image/same-image-two-instances-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/as-image/same-image-two-instances-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/clip-path/clip-in-mask-expected.png b/third_party/WebKit/LayoutTests/svg/clip-path/clip-in-mask-expected.png
index 24bd37e8..c1a4266 100644
--- a/third_party/WebKit/LayoutTests/svg/clip-path/clip-in-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/clip-path/clip-in-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-child-clipped-expected.png b/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-child-clipped-expected.png
index fe10e2ef..ce43779 100644
--- a/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-child-clipped-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-child-clipped-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png b/third_party/WebKit/LayoutTests/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
index 41715b7f..7532f38 100644
--- a/third_party/WebKit/LayoutTests/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/circular-marker-reference-2-expected.png b/third_party/WebKit/LayoutTests/svg/custom/circular-marker-reference-2-expected.png
index da975b0f..1dd1a4d 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/circular-marker-reference-2-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/circular-marker-reference-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/dasharrayOrigin-expected.png b/third_party/WebKit/LayoutTests/svg/custom/dasharrayOrigin-expected.png
index e6f6f53..dd623da 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/dasharrayOrigin-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/dasharrayOrigin-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/gradient-stroke-width-expected.png b/third_party/WebKit/LayoutTests/svg/custom/gradient-stroke-width-expected.png
index c43bf6f..bde8ad55 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/gradient-stroke-width-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/gradient-stroke-width-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/marker-opacity-expected.png b/third_party/WebKit/LayoutTests/svg/custom/marker-opacity-expected.png
index 5792007..ce19399 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/marker-opacity-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/marker-opacity-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/non-circular-marker-reference-expected.png b/third_party/WebKit/LayoutTests/svg/custom/non-circular-marker-reference-expected.png
index 70124e156..53ca8cd 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/non-circular-marker-reference-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/non-circular-marker-reference-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png b/third_party/WebKit/LayoutTests/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
index 98fc70da..a3b502c0 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/pattern-referencing-preserve-aspect-ratio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/use-css-no-effect-on-shadow-tree-expected.png b/third_party/WebKit/LayoutTests/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
index abf9254..ad529ec8 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png
index b967d88..712b4b2 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png b/third_party/WebKit/LayoutTests/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
index 5393c8c..a248a89 100644
--- a/third_party/WebKit/LayoutTests/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
+++ b/third_party/WebKit/LayoutTests/svg/stroke/zero-length-subpaths-linecap-rendering-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png
deleted file mode 100644
index 4170024..0000000
--- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png
deleted file mode 100644
index a3acd56..0000000
--- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-overflow-position-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png b/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
deleted file mode 100644
index 61f628a..0000000
--- a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
index 8ab19f5..c56423f2 100644
--- a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
+++ b/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-ellipse-circumference-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
deleted file mode 100644
index d8fdd0c..0000000
--- a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index c22ccf00..4201044 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -5322,6 +5322,7 @@
     attribute @@toStringTag
     getter iceConnectionState
     getter iceGatheringState
+    getter id
     getter localDescription
     getter onaddstream
     getter ondatachannel
@@ -9122,6 +9123,7 @@
     attribute @@toStringTag
     getter iceConnectionState
     getter iceGatheringState
+    getter id
     getter localDescription
     getter onaddstream
     getter ondatachannel
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
index 01e6783..e71c462 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
@@ -51,7 +51,7 @@
 ScriptSourceCode::ScriptSourceCode(
     const String& source,
     ScriptSourceLocationType source_location_type,
-    CachedMetadataHandler* cache_handler,
+    SingleCachedMetadataHandler* cache_handler,
     const KURL& url,
     const TextPosition& start_position)
     : source_(TreatNullSourceAsEmpty(source)),
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
index 69ed2a04..787b8fe4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
@@ -42,7 +42,7 @@
 namespace blink {
 
 class ScriptResource;
-class CachedMetadataHandler;
+class SingleCachedMetadataHandler;
 
 class CORE_EXPORT ScriptSourceCode final {
   DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
@@ -52,7 +52,7 @@
   ScriptSourceCode(
       const String& source,
       ScriptSourceLocationType = ScriptSourceLocationType::kUnknown,
-      CachedMetadataHandler* cache_handler = nullptr,
+      SingleCachedMetadataHandler* cache_handler = nullptr,
       const KURL& = KURL(),
       const TextPosition& start_position = TextPosition::MinimumPosition());
 
@@ -70,7 +70,7 @@
   bool IsNull() const { return source_.IsNull(); }
 
   const String& Source() const { return source_; }
-  CachedMetadataHandler* CacheHandler() const { return cache_handler_; }
+  SingleCachedMetadataHandler* CacheHandler() const { return cache_handler_; }
   const KURL& Url() const { return url_; }
   int StartLine() const { return start_position_.line_.OneBasedInt(); }
   const TextPosition& StartPosition() const { return start_position_; }
@@ -83,7 +83,7 @@
 
  private:
   const String source_;
-  Member<CachedMetadataHandler> cache_handler_;
+  Member<SingleCachedMetadataHandler> cache_handler_;
   Member<ScriptStreamer> streamer_;
 
   // The URL of the source code, which is primarily intended for DevTools
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
index 15f3c1f..935a0d3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
@@ -215,7 +215,7 @@
     data_queue_.Finish();
   }
 
-  void DidReceiveData(Resource* resource, ScriptStreamer* streamer) {
+  void DidReceiveData(ScriptResource* resource, ScriptStreamer* streamer) {
     DCHECK(IsMainThread());
     PrepareDataOnMainThread(resource, streamer);
   }
@@ -235,7 +235,8 @@
   }
 
  private:
-  void PrepareDataOnMainThread(Resource* resource, ScriptStreamer* streamer) {
+  void PrepareDataOnMainThread(ScriptResource* resource,
+                               ScriptStreamer* streamer) {
     DCHECK(IsMainThread());
 
     if (cancelled_) {
@@ -254,7 +255,7 @@
       return;
     }
 
-    CachedMetadataHandler* cache_handler = resource->CacheHandler();
+    SingleCachedMetadataHandler* cache_handler = resource->CacheHandler();
     scoped_refptr<CachedMetadata> code_cache(
         cache_handler ? cache_handler->GetCachedMetadata(
                             V8ScriptRunner::TagForCodeCache(cache_handler))
@@ -389,7 +390,7 @@
   streaming_suppressed_ = true;
 }
 
-void ScriptStreamer::NotifyAppendData(Resource* resource) {
+void ScriptStreamer::NotifyAppendData(ScriptResource* resource) {
   DCHECK(IsMainThread());
   if (streaming_suppressed_)
     return;
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
index 24d26b86..df5abfd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
@@ -17,7 +17,7 @@
 namespace blink {
 
 class ClassicPendingScript;
-class Resource;
+class ScriptResource;
 class ScriptState;
 class Settings;
 class SourceStream;
@@ -72,7 +72,7 @@
   bool StreamingSuppressed() const { return streaming_suppressed_; }
 
   // Called by ClassicPendingScript when data arrives from the network.
-  void NotifyAppendData(Resource*);
+  void NotifyAppendData(ScriptResource*);
   void NotifyFinished();
 
   // Called by ScriptStreamingTask when it has streamed all data to V8 and V8
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
index 31d22ee..5bc3561 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -264,7 +264,7 @@
   AppendData("function foo() {");
   AppendPadding();
 
-  CachedMetadataHandler* cache_handler = GetResource()->CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = GetResource()->CacheHandler();
   EXPECT_TRUE(cache_handler);
   cache_handler->SetCachedMetadata(
       V8ScriptRunner::TagForCodeCache(cache_handler), "X", 1,
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
index 657bb9e5..bd1bc7a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -127,7 +127,7 @@
 
 // Compile a script, and consume a V8 cache that was generated previously.
 static v8::MaybeLocal<v8::Script> CompileAndConsumeCache(
-    CachedMetadataHandler* cache_handler,
+    SingleCachedMetadataHandler* cache_handler,
     scoped_refptr<CachedMetadata> cached_metadata,
     v8::ScriptCompiler::CompileOptions consume_options,
     v8::Isolate* isolate,
@@ -174,7 +174,7 @@
 }
 
 // Check previously stored timestamp.
-bool IsResourceHotForCaching(CachedMetadataHandler* cache_handler,
+bool IsResourceHotForCaching(SingleCachedMetadataHandler* cache_handler,
                              int hot_hours) {
   const double cache_within_seconds = hot_hours * 60 * 60;
   scoped_refptr<CachedMetadata> cached_metadata =
@@ -192,7 +192,7 @@
 // Final compile call for a streamed compilation.
 v8::MaybeLocal<v8::Script> PostStreamCompile(
     v8::ScriptCompiler::CompileOptions compile_options,
-    CachedMetadataHandler* cache_handler,
+    SingleCachedMetadataHandler* cache_handler,
     ScriptStreamer* streamer,
     v8::Isolate* isolate,
     v8::Local<v8::String> code,
@@ -213,7 +213,7 @@
 // Select a compile function from any of the above depending on compile_options.
 static CompileFn SelectCompileFunction(
     v8::ScriptCompiler::CompileOptions compile_options,
-    CachedMetadataHandler* cache_handler,
+    SingleCachedMetadataHandler* cache_handler,
     v8::ScriptCompiler::NoCacheReason no_cache_reason) {
   switch (compile_options) {
     case v8::ScriptCompiler::kNoCompileOptions:
@@ -245,7 +245,7 @@
 // Select a compile function for a streaming compile.
 CompileFn SelectCompileFunction(
     v8::ScriptCompiler::CompileOptions compile_options,
-    CachedMetadataHandler* cache_handler,
+    SingleCachedMetadataHandler* cache_handler,
     ScriptStreamer* streamer) {
   DCHECK(streamer->IsFinished());
   DCHECK(!streamer->StreamingSuppressed());
@@ -284,7 +284,7 @@
       break;
   }
 
-  CachedMetadataHandler* cache_handler = source.CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = source.CacheHandler();
   if (!cache_handler) {
     return std::make_tuple(v8::ScriptCompiler::kNoCompileOptions,
                            ProduceCacheOptions::kNoProduceCache,
@@ -368,7 +368,7 @@
   const String& file_name = source.Url();
   const TextPosition& script_start_position = source.StartPosition();
   ScriptStreamer* streamer = source.Streamer();
-  CachedMetadataHandler* cache_handler = source.CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = source.CacheHandler();
 
   constexpr const char* kTraceEventCategoryGroup = "v8,devtools.timeline";
   TRACE_EVENT_BEGIN1(kTraceEventCategoryGroup, "v8.compile", "fileName",
@@ -503,7 +503,7 @@
               ("V8.CodeCacheSizeRatio", 0, 10000, 50));
           code_cache_size_histogram.Count(cache_size_ratio);
         }
-        CachedMetadataHandler* cache_handler = source.CacheHandler();
+        SingleCachedMetadataHandler* cache_handler = source.CacheHandler();
         cache_handler->ClearCachedMetadata(
             CachedMetadataHandler::kCacheLocally);
         cache_handler->SetCachedMetadata(
@@ -683,16 +683,19 @@
   return module->Evaluate(context);
 }
 
-uint32_t V8ScriptRunner::TagForCodeCache(CachedMetadataHandler* cache_handler) {
+uint32_t V8ScriptRunner::TagForCodeCache(
+    SingleCachedMetadataHandler* cache_handler) {
   return CacheTag(kCacheTagCode, cache_handler->Encoding());
 }
 
-uint32_t V8ScriptRunner::TagForTimeStamp(CachedMetadataHandler* cache_handler) {
+uint32_t V8ScriptRunner::TagForTimeStamp(
+    SingleCachedMetadataHandler* cache_handler) {
   return CacheTag(kCacheTagTimeStamp, cache_handler->Encoding());
 }
 
 // Store a timestamp to the cache as hint.
-void V8ScriptRunner::SetCacheTimeStamp(CachedMetadataHandler* cache_handler) {
+void V8ScriptRunner::SetCacheTimeStamp(
+    SingleCachedMetadataHandler* cache_handler) {
   double now = WTF::CurrentTime();
   cache_handler->ClearCachedMetadata(CachedMetadataHandler::kCacheLocally);
   cache_handler->SetCachedMetadata(TagForTimeStamp(cache_handler),
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
index 660bf596..20a5902 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
@@ -48,7 +48,7 @@
 namespace blink {
 
 class CachedMetadata;
-class CachedMetadataHandler;
+class SingleCachedMetadataHandler;
 class ExecutionContext;
 class ScriptSourceCode;
 
@@ -69,7 +69,7 @@
 
   // For the following methods, the caller sites have to hold
   // a HandleScope and a ContextScope.
-  // CachedMetadataHandler is set when metadata caching is supported.
+  // SingleCachedMetadataHandler is set when metadata caching is supported.
   static v8::MaybeLocal<v8::Script> CompileScript(
       ScriptState*,
       const ScriptSourceCode&,
@@ -132,10 +132,10 @@
                                        const String& file_name,
                                        const TextPosition&);
 
-  static uint32_t TagForParserCache(CachedMetadataHandler*);
-  static uint32_t TagForCodeCache(CachedMetadataHandler*);
-  static uint32_t TagForTimeStamp(CachedMetadataHandler*);
-  static void SetCacheTimeStamp(CachedMetadataHandler*);
+  static uint32_t TagForParserCache(SingleCachedMetadataHandler*);
+  static uint32_t TagForCodeCache(SingleCachedMetadataHandler*);
+  static uint32_t TagForTimeStamp(SingleCachedMetadataHandler*);
+  static void SetCacheTimeStamp(SingleCachedMetadataHandler*);
 
   // Utilities for calling functions added to the V8 extras binding object.
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
index c36ee37..f30ff02 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
@@ -42,13 +42,13 @@
   KURL Url() const {
     return KURL(WTF::String::Format("http://bla.com/bla%d", counter_));
   }
-  unsigned TagForCodeCache(CachedMetadataHandler* cache_handler) const {
+  unsigned TagForCodeCache(SingleCachedMetadataHandler* cache_handler) const {
     return V8ScriptRunner::TagForCodeCache(cache_handler);
   }
-  unsigned TagForTimeStamp(CachedMetadataHandler* cache_handler) const {
+  unsigned TagForTimeStamp(SingleCachedMetadataHandler* cache_handler) const {
     return V8ScriptRunner::TagForTimeStamp(cache_handler);
   }
-  void SetCacheTimeStamp(CachedMetadataHandler* cache_handler) {
+  void SetCacheTimeStamp(SingleCachedMetadataHandler* cache_handler) {
     V8ScriptRunner::SetCacheTimeStamp(cache_handler);
   }
 
@@ -124,14 +124,14 @@
 }
 
 TEST_F(V8ScriptRunnerTest, emptyResourceDoesNotHaveCacheHandler) {
-  Resource* resource = CreateEmptyResource();
+  ScriptResource* resource = CreateEmptyResource();
   EXPECT_FALSE(resource->CacheHandler());
 }
 
 TEST_F(V8ScriptRunnerTest, codeOption) {
   V8TestingScope scope;
   ScriptSourceCode source_code(nullptr, CreateResource(UTF8Encoding()));
-  CachedMetadataHandler* cache_handler = source_code.CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = source_code.CacheHandler();
   SetCacheTimeStamp(cache_handler);
 
   EXPECT_TRUE(CompileScript(scope.GetIsolate(), scope.GetScriptState(),
@@ -149,7 +149,7 @@
   V8TestingScope scope;
   ScriptSourceCode source_code(nullptr, CreateResource(UTF8Encoding()));
   // Set timestamp to simulate a warm run.
-  CachedMetadataHandler* cache_handler = source_code.CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = source_code.CacheHandler();
   SetCacheTimeStamp(cache_handler);
 
   // Warm run - should produce code cache.
@@ -178,7 +178,7 @@
 TEST_F(V8ScriptRunnerTest, produceAndConsumeCodeOption) {
   V8TestingScope scope;
   ScriptSourceCode source_code(nullptr, CreateResource(UTF8Encoding()));
-  CachedMetadataHandler* cache_handler = source_code.CacheHandler();
+  SingleCachedMetadataHandler* cache_handler = source_code.CacheHandler();
 
   // Cold run - should set the timestamp
   EXPECT_TRUE(CompileScript(scope.GetIsolate(), scope.GetScriptState(),
diff --git a/third_party/WebKit/Source/core/OWNERS b/third_party/WebKit/Source/core/OWNERS
index 36889359..c528ab5d 100644
--- a/third_party/WebKit/Source/core/OWNERS
+++ b/third_party/WebKit/Source/core/OWNERS
@@ -21,6 +21,8 @@
 dstockwell@chromium.org
 eae@chromium.org
 enne@chromium.org
+# flackr reviews animation- and scrolling-related changes.
+flackr@chromium.org
 fmalita@chromium.org
 # foolip reviews <video>, <track>, WebVTT and Fullscreen.
 foolip@chromium.org
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 6aaaf83..a42fbc3 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -222,6 +222,7 @@
     case kPseudoHover:
     case kPseudoDrag:
     case kPseudoFocus:
+    case kPseudoFocusVisible:
     case kPseudoFocusWithin:
     case kPseudoActive:
     case kPseudoChecked:
@@ -342,6 +343,7 @@
     {"first-line", CSSSelector::kPseudoFirstLine},
     {"first-of-type", CSSSelector::kPseudoFirstOfType},
     {"focus", CSSSelector::kPseudoFocus},
+    {"focus-visible", CSSSelector::kPseudoFocusVisible},
     {"focus-within", CSSSelector::kPseudoFocusWithin},
     {"fullscreen", CSSSelector::kPseudoFullscreen},
     {"future", CSSSelector::kPseudoFutureCue},
@@ -441,6 +443,9 @@
   if (match->type == CSSSelector::kPseudoFullscreen &&
       !RuntimeEnabledFeatures::FullscreenUnprefixedEnabled())
     return CSSSelector::kPseudoUnknown;
+  if (match->type == CSSSelector::kPseudoFocusVisible &&
+      !RuntimeEnabledFeatures::CSSFocusVisibleEnabled())
+    return CSSSelector::kPseudoUnknown;
 
   return static_cast<CSSSelector::PseudoType>(match->type);
 }
@@ -581,6 +586,7 @@
     case kPseudoFirstChild:
     case kPseudoFirstOfType:
     case kPseudoFocus:
+    case kPseudoFocusVisible:
     case kPseudoFocusWithin:
     case kPseudoFullPageMedia:
     case kPseudoFullScreen:
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.h b/third_party/WebKit/Source/core/css/CSSSelector.h
index d97a7a6f..812e97c 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.h
+++ b/third_party/WebKit/Source/core/css/CSSSelector.h
@@ -164,6 +164,7 @@
     kPseudoHover,
     kPseudoDrag,
     kPseudoFocus,
+    kPseudoFocusVisible,
     kPseudoFocusWithin,
     kPseudoActive,
     kPseudoChecked,
@@ -562,7 +563,8 @@
 inline bool CSSSelector::IsUserActionPseudoClass() const {
   return pseudo_type_ == kPseudoHover || pseudo_type_ == kPseudoActive ||
          pseudo_type_ == kPseudoFocus || pseudo_type_ == kPseudoDrag ||
-         pseudo_type_ == kPseudoFocusWithin;
+         pseudo_type_ == kPseudoFocusWithin ||
+         pseudo_type_ == kPseudoFocusVisible;
 }
 
 inline bool CSSSelector::IsIdClassOrAttributeSelector() const {
diff --git a/third_party/WebKit/Source/core/css/RuleFeatureSet.cpp b/third_party/WebKit/Source/core/css/RuleFeatureSet.cpp
index 23877803..9538670 100644
--- a/third_party/WebKit/Source/core/css/RuleFeatureSet.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeatureSet.cpp
@@ -97,6 +97,7 @@
     case CSSSelector::kPseudoHover:
     case CSSSelector::kPseudoDrag:
     case CSSSelector::kPseudoFocus:
+    case CSSSelector::kPseudoFocusVisible:
     case CSSSelector::kPseudoFocusWithin:
     case CSSSelector::kPseudoActive:
     case CSSSelector::kPseudoChecked:
@@ -445,6 +446,7 @@
       case CSSSelector::kPseudoHover:
       case CSSSelector::kPseudoDrag:
       case CSSSelector::kPseudoFocus:
+      case CSSSelector::kPseudoFocusVisible:
       case CSSSelector::kPseudoFocusWithin:
       case CSSSelector::kPseudoActive:
       case CSSSelector::kPseudoChecked:
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index 7f2006f..6ffeff21 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -46,6 +46,7 @@
 #include "core/html/HTMLDocument.h"
 #include "core/html/HTMLFrameElementBase.h"
 #include "core/html/HTMLSlotElement.h"
+#include "core/html/forms/HTMLFormControlElement.h"
 #include "core/html/forms/HTMLInputElement.h"
 #include "core/html/forms/HTMLOptionElement.h"
 #include "core/html/forms/HTMLSelectElement.h"
@@ -917,6 +918,12 @@
         element.SetChildrenOrSiblingsAffectedByFocus();
       }
       return MatchesFocusPseudoClass(element);
+    case CSSSelector::kPseudoFocusVisible:
+      if (mode_ == kResolvingStyle && !context.in_rightmost_compound) {
+        element_style_->SetUnique();
+        element.SetChildrenOrSiblingsAffectedByFocusVisible();
+      }
+      return MatchesFocusVisiblePseudoClass(element);
     case CSSSelector::kPseudoFocusWithin:
       if (mode_ == kResolvingStyle) {
         if (context.in_rightmost_compound) {
@@ -1350,4 +1357,12 @@
   return element.IsFocused() && IsFrameFocused(element);
 }
 
+bool SelectorChecker::MatchesFocusVisiblePseudoClass(const Element& element) {
+  bool always_show_focus_ring =
+      IsHTMLFormControlElement(element) &&
+      ToHTMLFormControlElement(element).ShouldShowFocusRingOnMouseFocus();
+  return MatchesFocusPseudoClass(element) &&
+         (!element.WasFocusedByMouse() || always_show_focus_ring);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.h b/third_party/WebKit/Source/core/css/SelectorChecker.h
index b6544db..6b50c93b9 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.h
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.h
@@ -145,6 +145,7 @@
   }
 
   static bool MatchesFocusPseudoClass(const Element&);
+  static bool MatchesFocusVisiblePseudoClass(const Element&);
 
  private:
   bool CheckOne(const SelectorCheckingContext&, MatchResult&) const;
diff --git a/third_party/WebKit/Source/core/css/StyleChangeReason.cpp b/third_party/WebKit/Source/core/css/StyleChangeReason.cpp
index 965f2d9..9157a62b 100644
--- a/third_party/WebKit/Source/core/css/StyleChangeReason.cpp
+++ b/third_party/WebKit/Source/core/css/StyleChangeReason.cpp
@@ -53,6 +53,7 @@
 DEFINE_GLOBAL(AtomicString, g_disabled);
 DEFINE_GLOBAL(AtomicString, g_drag);
 DEFINE_GLOBAL(AtomicString, g_focus);
+DEFINE_GLOBAL(AtomicString, g_focus_visible);
 DEFINE_GLOBAL(AtomicString, g_focus_within);
 DEFINE_GLOBAL(AtomicString, g_hover);
 DEFINE_GLOBAL(AtomicString, g_past);
@@ -65,6 +66,7 @@
   new (NotNull, (void*)&g_disabled) AtomicString(":disabled");
   new (NotNull, (void*)&g_drag) AtomicString(":-webkit-drag");
   new (NotNull, (void*)&g_focus) AtomicString(":focus");
+  new (NotNull, (void*)&g_focus_visible) AtomicString(":focus-visible");
   new (NotNull, (void*)&g_focus_within) AtomicString(":focus-within");
   new (NotNull, (void*)&g_hover) AtomicString(":hover");
   new (NotNull, (void*)&g_past) AtomicString(":past");
diff --git a/third_party/WebKit/Source/core/css/StyleChangeReason.h b/third_party/WebKit/Source/core/css/StyleChangeReason.h
index 8b3391c..0120734b 100644
--- a/third_party/WebKit/Source/core/css/StyleChangeReason.h
+++ b/third_party/WebKit/Source/core/css/StyleChangeReason.h
@@ -55,6 +55,7 @@
 extern const AtomicString& g_disabled;
 extern const AtomicString& g_drag;
 extern const AtomicString& g_focus;
+extern const AtomicString& g_focus_visible;
 extern const AtomicString& g_focus_within;
 extern const AtomicString& g_hover;
 extern const AtomicString& g_past;
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
index f83a743..1609025 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
@@ -228,6 +228,7 @@
   switch (pseudo) {
     case CSSSelector::kPseudoHover:
     case CSSSelector::kPseudoFocus:
+    case CSSSelector::kPseudoFocusVisible:
     case CSSSelector::kPseudoFocusWithin:
     case CSSSelector::kPseudoActive:
       return true;
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index 5671acd6..6f78d9ce 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -57,6 +57,7 @@
 #include "platform/bindings/RuntimeCallStats.h"
 #include "platform/bindings/ScriptForbiddenScope.h"
 #include "platform/bindings/V8PerIsolateData.h"
+#include "platform/runtime_enabled_features.h"
 
 namespace blink {
 
@@ -1005,9 +1006,27 @@
     ToElement(this)->PseudoStateChanged(CSSSelector::kPseudoFocus);
 
   GetLayoutObject()->InvalidateIfControlStateChanged(kFocusControlState);
+  FocusVisibleStateChanged();
   FocusWithinStateChanged();
 }
 
+void ContainerNode::FocusVisibleStateChanged() {
+  if (!RuntimeEnabledFeatures::CSSFocusVisibleEnabled())
+    return;
+  StyleChangeType change_type =
+      GetComputedStyle()->HasPseudoStyle(kPseudoIdFirstLetter)
+          ? kSubtreeStyleChange
+          : kLocalStyleChange;
+  SetNeedsStyleRecalc(change_type,
+                      StyleChangeReasonForTracing::CreateWithExtraData(
+                          StyleChangeReason::kPseudoClass,
+                          StyleChangeExtraData::g_focus_visible));
+
+  if (IsElementNode() &&
+      ToElement(this)->ChildrenOrSiblingsAffectedByFocusVisible())
+    ToElement(this)->PseudoStateChanged(CSSSelector::kPseudoFocusVisible);
+}
+
 void ContainerNode::FocusWithinStateChanged() {
   if (GetComputedStyle() && GetComputedStyle()->AffectedByFocusWithin()) {
     StyleChangeType change_type =
@@ -1062,6 +1081,18 @@
         StyleChangeReasonForTracing::CreateWithExtraData(
             StyleChangeReason::kPseudoClass, StyleChangeExtraData::g_focus));
 
+  if (RuntimeEnabledFeatures::CSSFocusVisibleEnabled()) {
+    if (IsElementNode() &&
+        ToElement(this)->ChildrenOrSiblingsAffectedByFocusVisible()) {
+      ToElement(this)->PseudoStateChanged(CSSSelector::kPseudoFocusVisible);
+    } else {
+      SetNeedsStyleRecalc(kLocalStyleChange,
+                          StyleChangeReasonForTracing::CreateWithExtraData(
+                              StyleChangeReason::kPseudoClass,
+                              StyleChangeExtraData::g_focus_visible));
+    }
+  }
+
   if (IsElementNode() &&
       ToElement(this)->ChildrenOrSiblingsAffectedByFocusWithin()) {
     ToElement(this)->PseudoStateChanged(CSSSelector::kPseudoFocusWithin);
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.h b/third_party/WebKit/Source/core/dom/ContainerNode.h
index 22009386..6996026 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.h
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.h
@@ -56,8 +56,9 @@
   kAffectedByFirstChildRules = 1 << 10,
   kAffectedByLastChildRules = 1 << 11,
   kChildrenOrSiblingsAffectedByFocusWithin = 1 << 12,
+  kChildrenOrSiblingsAffectedByFocusVisible = 1 << 13,
 
-  kNumberOfDynamicRestyleFlags = 13,
+  kNumberOfDynamicRestyleFlags = 14,
 
   kChildrenAffectedByStructuralRules =
       kChildrenAffectedByFirstChildRules | kChildrenAffectedByLastChildRules |
@@ -149,6 +150,7 @@
   void SetFocused(bool, WebFocusType) override;
   void SetHasFocusWithinUpToAncestor(bool, Node* ancestor);
   void FocusStateChanged();
+  void FocusVisibleStateChanged();
   void FocusWithinStateChanged();
   void SetActive(bool = true) override;
   void SetDragged(bool) override;
@@ -161,6 +163,13 @@
     SetRestyleFlag(kChildrenOrSiblingsAffectedByFocus);
   }
 
+  bool ChildrenOrSiblingsAffectedByFocusVisible() const {
+    return HasRestyleFlag(kChildrenOrSiblingsAffectedByFocusVisible);
+  }
+  void SetChildrenOrSiblingsAffectedByFocusVisible() {
+    SetRestyleFlag(kChildrenOrSiblingsAffectedByFocusVisible);
+  }
+
   bool ChildrenOrSiblingsAffectedByFocusWithin() const {
     return HasRestyleFlag(kChildrenOrSiblingsAffectedByFocusWithin);
   }
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 1ac9b81c..cffac9b 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4438,6 +4438,7 @@
 
   // Remove focus from the existing focus node (if any)
   if (old_focused_element) {
+    old_focused_element->SetWasFocusedByMouse(false);
     old_focused_element->SetFocused(false, params.type);
     old_focused_element->SetHasFocusWithinUpToAncestor(false, ancestor);
 
@@ -4486,6 +4487,7 @@
     focused_element_ = new_focused_element;
     SetSequentialFocusNavigationStartingPoint(focused_element_.Get());
 
+    focused_element_->SetWasFocusedByMouse(params.type == kWebFocusTypeMouse);
     focused_element_->SetFocused(true, params.type);
     focused_element_->SetHasFocusWithinUpToAncestor(true, ancestor);
 
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index de2f309..bfa7cb4 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2543,6 +2543,10 @@
   GetDocument().UserActionElements().SetHasFocusWithin(this, flag);
 }
 
+void Node::SetWasFocusedByMouse(bool flag) {
+  GetDocument().UserActionElements().SetWasFocusedByMouse(this, flag);
+}
+
 void Node::SetActive(bool flag) {
   GetDocument().UserActionElements().SetActive(this, flag);
 }
@@ -2585,6 +2589,11 @@
   return GetDocument().UserActionElements().HasFocusWithin(this);
 }
 
+bool Node::IsUserActionElementWasFocusedByMouse() const {
+  DCHECK(IsUserActionElement());
+  return GetDocument().UserActionElements().WasFocusedByMouse(this);
+}
+
 void Node::SetCustomElementState(CustomElementState new_state) {
   CustomElementState old_state = GetCustomElementState();
 
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index 3b30da64..da8d06c 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -444,6 +444,9 @@
   bool HasFocusWithin() const {
     return IsUserActionElement() && IsUserActionElementHasFocusWithin();
   }
+  bool WasFocusedByMouse() const {
+    return IsUserActionElement() && IsUserActionElementWasFocusedByMouse();
+  }
 
   bool NeedsAttach() const {
     return GetStyleChangeType() == kNeedsReattachStyleChange;
@@ -536,6 +539,7 @@
   virtual void SetActive(bool flag = true);
   virtual void SetDragged(bool flag);
   virtual void SetHovered(bool flag = true);
+  void SetWasFocusedByMouse(bool flag);
 
   virtual int tabIndex() const;
 
@@ -986,6 +990,7 @@
   bool IsUserActionElementHovered() const;
   bool IsUserActionElementFocused() const;
   bool IsUserActionElementHasFocusWithin() const;
+  bool IsUserActionElementWasFocusedByMouse() const;
 
   void RecalcDistribution();
 
diff --git a/third_party/WebKit/Source/core/dom/UserActionElementSet.h b/third_party/WebKit/Source/core/dom/UserActionElementSet.h
index d236f1e..2554f0b9 100644
--- a/third_party/WebKit/Source/core/dom/UserActionElementSet.h
+++ b/third_party/WebKit/Source/core/dom/UserActionElementSet.h
@@ -43,6 +43,9 @@
   bool HasFocusWithin(const Node* node) {
     return HasFlags(node, kHasFocusWithinFlag);
   }
+  bool WasFocusedByMouse(const Node* node) {
+    return HasFlags(node, kWasFocusedByMouseFlag);
+  }
   bool IsActive(const Node* node) { return HasFlags(node, kIsActiveFlag); }
   bool IsInActiveChain(const Node* node) {
     return HasFlags(node, kInActiveChainFlag);
@@ -55,6 +58,9 @@
   void SetHasFocusWithin(Node* node, bool enable) {
     SetFlags(node, enable, kHasFocusWithinFlag);
   }
+  void SetWasFocusedByMouse(Node* node, bool enable) {
+    SetFlags(node, enable, kWasFocusedByMouseFlag);
+  }
   void SetActive(Node* node, bool enable) {
     SetFlags(node, enable, kIsActiveFlag);
   }
@@ -83,6 +89,7 @@
     kIsFocusedFlag = 1 << 3,
     kIsDraggedFlag = 1 << 4,
     kHasFocusWithinFlag = 1 << 5,
+    kWasFocusedByMouseFlag = 1 << 6,
   };
 
   void SetFlags(Node* node, bool enable, unsigned flags) {
diff --git a/third_party/WebKit/Source/core/exported/WebElement.cpp b/third_party/WebKit/Source/core/exported/WebElement.cpp
index 47748bf..35f8c434 100644
--- a/third_party/WebKit/Source/core/exported/WebElement.cpp
+++ b/third_party/WebKit/Source/core/exported/WebElement.cpp
@@ -32,8 +32,11 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/Element.h"
+#include "core/dom/ElementShadow.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/fullscreen/Fullscreen.h"
+#include "core/html/custom/CustomElement.h"
+#include "core/html/custom/V0CustomElement.h"
 #include "core/html/custom/V0CustomElementProcessingStack.h"
 #include "core/html/forms/TextControlElement.h"
 #include "core/html_names.h"
@@ -126,6 +129,22 @@
   return ConstUnwrap<Element>()->InnerHTMLAsString();
 }
 
+bool WebElement::IsAutonomousCustomElement() const {
+  auto* element = ConstUnwrap<Element>();
+  if (element->GetCustomElementState() == CustomElementState::kCustom)
+    return CustomElement::IsValidName(element->localName());
+  if (element->GetV0CustomElementState() == Node::kV0Upgraded)
+    return V0CustomElement::IsValidName(element->localName());
+  return false;
+}
+
+WebNode WebElement::ShadowRoot() const {
+  auto* root = ConstUnwrap<Element>()->GetShadowRoot();
+  if (!root || root->IsUserAgent())
+    return WebNode();
+  return WebNode(root);
+}
+
 bool WebElement::HasNonEmptyLayoutSize() const {
   return ConstUnwrap<Element>()->HasNonEmptyLayoutSize();
 }
diff --git a/third_party/WebKit/Source/core/exported/WebElementTest.cpp b/third_party/WebKit/Source/core/exported/WebElementTest.cpp
index 7d429a4..6e85891 100644
--- a/third_party/WebKit/Source/core/exported/WebElementTest.cpp
+++ b/third_party/WebKit/Source/core/exported/WebElementTest.cpp
@@ -5,9 +5,13 @@
 #include "public/web/WebElement.h"
 
 #include <memory>
+#include "bindings/core/v8/V8BindingForCore.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootInit.h"
+#include "core/frame/Settings.h"
+#include "core/html/HTMLElement.h"
 #include "core/testing/PageTestBase.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -160,4 +164,80 @@
   EXPECT_FALSE(TestElement().IsEditable());
 }
 
+TEST_F(WebElementTest, IsAutonomousCustomElement) {
+  InsertHTML("<x-undefined id=testElement></x-undefined>");
+  EXPECT_FALSE(TestElement().IsAutonomousCustomElement());
+  InsertHTML("<div id=testElement></div>");
+  EXPECT_FALSE(TestElement().IsAutonomousCustomElement());
+
+  GetDocument().GetSettings()->SetScriptEnabled(true);
+  auto* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  script->setTextContent(R"JS(
+    customElements.define('v1-custom', class extends HTMLElement {});
+    document.body.appendChild(document.createElement('v1-custom'));
+    customElements.define('v1-builtin',
+                          class extends HTMLButtonElement {},
+                          { extends:'button' });
+    document.body.appendChild(
+        document.createElement('button', { is: 'v1-builtin' }));
+
+    document.registerElement('v0-custom');
+    document.body.appendChild(document.createElement('v0-custom'));
+    document.registerElement('v0-typext', {
+        prototype: Object.create(HTMLInputElement.prototype),
+        extends: 'input' });
+    document.body.appendChild(document.createElement('input', 'v0-typeext'));
+  )JS");
+  GetDocument().body()->appendChild(script);
+  auto* v0typeext = GetDocument().body()->lastChild();
+  EXPECT_FALSE(WebElement(ToElement(v0typeext)).IsAutonomousCustomElement());
+  auto* v0autonomous = v0typeext->previousSibling();
+  EXPECT_TRUE(WebElement(ToElement(v0autonomous)).IsAutonomousCustomElement());
+  auto* v1builtin = v0autonomous->previousSibling();
+  EXPECT_FALSE(WebElement(ToElement(v1builtin)).IsAutonomousCustomElement());
+  auto* v1autonomous = v1builtin->previousSibling();
+  EXPECT_TRUE(WebElement(ToElement(v1autonomous)).IsAutonomousCustomElement());
+}
+
+TEST_F(WebElementTest, ShadowRoot) {
+  InsertHTML("<input id=testElement>");
+  EXPECT_TRUE(TestElement().ShadowRoot().IsNull())
+      << "ShadowRoot() should not return a UA ShadowRoot.";
+
+  auto* script_state = ToScriptStateForMainWorld(GetDocument().GetFrame());
+  {
+    InsertHTML("<div id=testElement></div>");
+    EXPECT_TRUE(TestElement().ShadowRoot().IsNull())
+        << "No ShadowRoot initially.";
+    auto* element = GetDocument().getElementById("testElement");
+    element->createShadowRoot(script_state, ASSERT_NO_EXCEPTION);
+    EXPECT_FALSE(TestElement().ShadowRoot().IsNull())
+        << "Should return V0 ShadowRoot.";
+  }
+
+  {
+    InsertHTML("<span id=testElement></span>");
+    EXPECT_TRUE(TestElement().ShadowRoot().IsNull())
+        << "No ShadowRoot initially.";
+    auto* element = GetDocument().getElementById("testElement");
+    ShadowRootInit init;
+    init.setMode("open");
+    element->attachShadow(script_state, init, ASSERT_NO_EXCEPTION);
+    EXPECT_FALSE(TestElement().ShadowRoot().IsNull())
+        << "Should return V1 open ShadowRoot.";
+  }
+
+  {
+    InsertHTML("<p id=testElement></p>");
+    EXPECT_TRUE(TestElement().ShadowRoot().IsNull())
+        << "No ShadowRoot initially.";
+    auto* element = GetDocument().getElementById("testElement");
+    ShadowRootInit init;
+    init.setMode("closed");
+    element->attachShadow(script_state, init, ASSERT_NO_EXCEPTION);
+    EXPECT_FALSE(TestElement().ShadowRoot().IsNull())
+        << "Should return V1 closed ShadowRoot.";
+  }
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/fetch/FetchManager.cpp b/third_party/WebKit/Source/core/fetch/FetchManager.cpp
index e3773daf..0cce3d0 100644
--- a/third_party/WebKit/Source/core/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchManager.cpp
@@ -240,8 +240,10 @@
       if (r == WebDataConsumerHandle::kDone) {
         SubresourceIntegrity::ReportInfo report_info;
         bool check_result = SubresourceIntegrity::CheckSubresourceIntegrity(
-            integrity_metadata_, buffer_.data(), buffer_.size(), url_,
-            report_info);
+            integrity_metadata_,
+            SubresourceIntegrityHelper::GetFeatures(
+                loader_->GetExecutionContext()),
+            buffer_.data(), buffer_.size(), url_, report_info);
         SubresourceIntegrityHelper::DoReport(*loader_->GetExecutionContext(),
                                              report_info);
         if (check_result) {
diff --git a/third_party/WebKit/Source/core/fetch/OWNERS b/third_party/WebKit/Source/core/fetch/OWNERS
index d6b556d..160a1ff 100644
--- a/third_party/WebKit/Source/core/fetch/OWNERS
+++ b/third_party/WebKit/Source/core/fetch/OWNERS
@@ -1,6 +1,5 @@
 hiroshige@chromium.org
 horo@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
index be4e6b24..182606e 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
@@ -358,9 +358,11 @@
     const KURL resource(test.url);
 
     IntegrityMetadataSet integrity_metadata;
-    ASSERT_EQ(SubresourceIntegrity::kIntegrityParseValidResult,
-              SubresourceIntegrity::ParseIntegrityAttribute(
-                  test.integrity, integrity_metadata));
+    EXPECT_EQ(
+        SubresourceIntegrity::kIntegrityParseValidResult,
+        SubresourceIntegrity::ParseIntegrityAttribute(
+            test.integrity, SubresourceIntegrity::IntegrityFeatures::kDefault,
+            integrity_metadata));
 
     // Report-only 'script-src'
     Member<CSPDirectiveList> directive_list =
diff --git a/third_party/WebKit/Source/core/html/LinkStyle.cpp b/third_party/WebKit/Source/core/html/LinkStyle.cpp
index c6a4c44..7790aeb 100644
--- a/third_party/WebKit/Source/core/html/LinkStyle.cpp
+++ b/third_party/WebKit/Source/core/html/LinkStyle.cpp
@@ -324,7 +324,9 @@
   String integrity_attr = owner_->FastGetAttribute(integrityAttr);
   if (!integrity_attr.IsEmpty()) {
     IntegrityMetadataSet metadata_set;
-    SubresourceIntegrity::ParseIntegrityAttribute(integrity_attr, metadata_set);
+    SubresourceIntegrity::ParseIntegrityAttribute(
+        integrity_attr, SubresourceIntegrityHelper::GetFeatures(&GetDocument()),
+        metadata_set);
     params.SetIntegrityMetadata(metadata_set);
     params.MutableResourceRequest().SetFetchIntegrity(integrity_attr);
   }
diff --git a/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h b/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h
index 13537704..c8f99d5 100644
--- a/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h
+++ b/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h
@@ -122,6 +122,8 @@
 
   bool IsAutofocusable() const;
 
+  virtual bool ShouldShowFocusRingOnMouseFocus() const;
+
   bool IsAutofilled() const { return is_autofilled_; }
   void SetAutofilled(bool = true);
 
@@ -156,7 +158,6 @@
 
   bool SupportsFocus() const override;
   bool IsKeyboardFocusable() const override;
-  virtual bool ShouldShowFocusRingOnMouseFocus() const;
   bool ShouldHaveFocusAppearance() const final;
   void DispatchBlurEvent(Element* new_focused_element,
                          WebFocusType,
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index 63f6d871..c63b805 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -45,6 +45,7 @@
 #include "core/html_names.h"
 #include "core/input_type_names.h"
 #include "core/loader/LinkLoader.h"
+#include "core/loader/SubresourceIntegrityHelper.h"
 #include "core/script/ScriptLoader.h"
 #include "platform/Histogram.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
@@ -116,6 +117,7 @@
  public:
   StartTagScanner(const StringImpl* tag_impl,
                   MediaValuesCached* media_values,
+                  SubresourceIntegrity::IntegrityFeatures features,
                   TokenPreloadScanner::ScannerType scanner_type)
       : tag_impl_(tag_impl),
         link_is_style_sheet_(false),
@@ -133,6 +135,7 @@
         media_values_(media_values),
         referrer_policy_set_(false),
         referrer_policy_(kReferrerPolicyDefault),
+        integrity_features_(features),
         scanner_type_(scanner_type) {
     if (Match(tag_impl_, imgTag) || Match(tag_impl_, sourceTag)) {
       source_size_ = SizesAttributeParser(media_values_, String()).length();
@@ -278,25 +281,26 @@
   void ProcessScriptAttribute(const NameType& attribute_name,
                               const String& attribute_value) {
     // FIXME - Don't set crossorigin multiple times.
-    if (Match(attribute_name, srcAttr))
+    if (Match(attribute_name, srcAttr)) {
       SetUrlToLoad(attribute_value, kDisallowURLReplacement);
-    else if (Match(attribute_name, crossoriginAttr))
+    } else if (Match(attribute_name, crossoriginAttr)) {
       SetCrossOrigin(attribute_value);
-    else if (Match(attribute_name, nonceAttr))
+    } else if (Match(attribute_name, nonceAttr)) {
       SetNonce(attribute_value);
-    else if (Match(attribute_name, asyncAttr))
+    } else if (Match(attribute_name, asyncAttr)) {
       SetDefer(FetchParameters::kLazyLoad);
-    else if (Match(attribute_name, deferAttr))
+    } else if (Match(attribute_name, deferAttr)) {
       SetDefer(FetchParameters::kLazyLoad);
-    else if (Match(attribute_name, integrityAttr))
-      SubresourceIntegrity::ParseIntegrityAttribute(attribute_value,
-                                                    integrity_metadata_);
-    else if (Match(attribute_name, typeAttr))
+    } else if (Match(attribute_name, integrityAttr)) {
+      SubresourceIntegrity::ParseIntegrityAttribute(
+          attribute_value, integrity_features_, integrity_metadata_);
+    } else if (Match(attribute_name, typeAttr)) {
       type_attribute_value_ = attribute_value;
-    else if (Match(attribute_name, languageAttr))
+    } else if (Match(attribute_name, languageAttr)) {
       language_attribute_value_ = attribute_value;
-    else if (Match(attribute_name, nomoduleAttr))
+    } else if (Match(attribute_name, nomoduleAttr)) {
       nomodule_attribute_value_ = true;
+    }
   }
 
   template <typename NameType>
@@ -366,8 +370,8 @@
           attribute_value, kDoNotSupportReferrerPolicyLegacyKeywords,
           &referrer_policy_);
     } else if (Match(attribute_name, integrityAttr)) {
-      SubresourceIntegrity::ParseIntegrityAttribute(attribute_value,
-                                                    integrity_metadata_);
+      SubresourceIntegrity::ParseIntegrityAttribute(
+          attribute_value, integrity_features_, integrity_metadata_);
     } else if (Match(attribute_name, srcsetAttr) &&
                srcset_attribute_value_.IsNull()) {
       srcset_attribute_value_ = attribute_value;
@@ -591,6 +595,7 @@
   bool referrer_policy_set_;
   ReferrerPolicy referrer_policy_;
   IntegrityMetadataSet integrity_metadata_;
+  SubresourceIntegrity::IntegrityFeatures integrity_features_;
   TokenPreloadScanner::ScannerType scanner_type_;
 };
 
@@ -816,7 +821,9 @@
         return;
       }
 
-      StartTagScanner scanner(tag_impl, media_values_, scanner_type_);
+      StartTagScanner scanner(tag_impl, media_values_,
+                              document_parameters_->integrity_features,
+                              scanner_type_);
       scanner.ProcessAttributes(token.Attributes());
       // TODO(yoav): ViewportWidth is currently racy and might be zero in some
       // cases, at least in tests. That problem will go away once
@@ -910,6 +917,7 @@
   viewport_meta_enabled = document->GetSettings() &&
                           document->GetSettings()->GetViewportMetaEnabled();
   referrer_policy = document->GetReferrerPolicy();
+  integrity_features = SubresourceIntegrityHelper::GetFeatures(document);
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
index cb1b7d0..d8eee9e1 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
@@ -72,6 +72,7 @@
   bool viewport_meta_zero_values_quirk;
   bool viewport_meta_enabled;
   ReferrerPolicy referrer_policy;
+  SubresourceIntegrity::IntegrityFeatures integrity_features;
 
  private:
   explicit CachedDocumentParameters(Document*);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 9123736..d330865 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -325,7 +325,8 @@
   kPseudoFocus = 1 << 1,
   kPseudoActive = 1 << 2,
   kPseudoVisited = 1 << 3,
-  kPseudoFocusWithin = 1 << 4
+  kPseudoFocusWithin = 1 << 4,
+  kPseudoFocusVisible = 1 << 5
 };
 
 static unsigned ComputePseudoClassMask(
@@ -333,6 +334,7 @@
   DEFINE_STATIC_LOCAL(String, active, ("active"));
   DEFINE_STATIC_LOCAL(String, hover, ("hover"));
   DEFINE_STATIC_LOCAL(String, focus, ("focus"));
+  DEFINE_STATIC_LOCAL(String, focusVisible, ("focus-visible"));
   DEFINE_STATIC_LOCAL(String, focusWithin, ("focus-within"));
   DEFINE_STATIC_LOCAL(String, visited, ("visited"));
   if (!pseudo_class_array || !pseudo_class_array->length())
@@ -347,6 +349,8 @@
       result |= kPseudoHover;
     else if (pseudo_class == focus)
       result |= kPseudoFocus;
+    else if (pseudo_class == focusVisible)
+      result |= kPseudoFocusVisible;
     else if (pseudo_class == focusWithin)
       result |= kPseudoFocusWithin;
     else if (pseudo_class == visited)
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
index 4391f26..2cb6cb7 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
@@ -251,6 +251,7 @@
     DEFINE_STRING_MAPPING(PseudoHover)
     DEFINE_STRING_MAPPING(PseudoDrag)
     DEFINE_STRING_MAPPING(PseudoFocus)
+    DEFINE_STRING_MAPPING(PseudoFocusVisible)
     DEFINE_STRING_MAPPING(PseudoFocusWithin)
     DEFINE_STRING_MAPPING(PseudoActive)
     DEFINE_STRING_MAPPING(PseudoChecked)
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index cfc5083f..ee9da5bf 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -871,11 +871,24 @@
 
     // Check if |url| is allowed to run JavaScript. If not, client hints are not
     // attached to the requests that initiate on the render side.
-    if (GetContentSettingsClient() && AllowScriptFromSource(request.Url())) {
-      // TODO(tbansal): crbug.com/735518 This code path is not executed for main
-      // frame navigations when browser side navigation is enabled. For main
-      // frame requests with browser side navigation enabled, the client hints
-      // should be attached by the browser process.
+    if (!AllowScriptFromSource(request.Url())) {
+      return;
+    }
+
+    if (IsDetached())
+      return;
+
+    if (!GetFrame()
+             ->Tree()
+             .Top()
+             .GetSecurityContext()
+             ->GetSecurityOrigin()
+             ->IsSameSchemeHostPort(
+                 SecurityOrigin::Create(request.Url()).get())) {
+      // No client hints for 3p origins.
+      return;
+    }
+    if (GetContentSettingsClient()) {
       GetContentSettingsClient()->GetAllowedClientHintsFromSource(
           request.Url(), &enabled_hints);
     }
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index f176a033..2cc489c 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -572,7 +572,8 @@
 };
 
 // Verify that the client hints should be attached for subresources fetched
-// over secure transport.
+// over secure transport. Tests when the persistent client hint feature is
+// enabled.
 TEST_F(FrameFetchContextHintsTest, MonitorDeviceMemorySecureTransport) {
   ExpectHeader("https://www.example.com/1.gif", "Device-Memory", false, "");
   ClientHintsPreferences preferences;
@@ -584,7 +585,29 @@
   ExpectHeader("https://www.example.com/1.gif", "Width", false, "");
   ExpectHeader("https://www.example.com/1.gif", "Viewport-Width", false, "");
   // The origin of the resource does not match the origin of the main frame
-  // resource. Client hints are still attached.
+  // resource. Client hint should not be attached.
+  ExpectHeader("https://www.someother-example.com/1.gif", "Device-Memory",
+               false, "");
+}
+
+// Verify that the client hints should be attached for subresources fetched
+// over secure transport. Tests when the persistent client hint feature is not
+// enabled.
+TEST_F(FrameFetchContextHintsTest,
+       MonitorDeviceMemorySecureTransportPersistentHintsDisabled) {
+  WebRuntimeFeatures::EnableClientHintsPersistent(false);
+  ExpectHeader("https://www.example.com/1.gif", "Device-Memory", false, "");
+  ClientHintsPreferences preferences;
+  preferences.SetShouldSendForTesting(mojom::WebClientHintsType::kDeviceMemory);
+  document->GetClientHintsPreferences().UpdateFrom(preferences);
+  ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(4096);
+  ExpectHeader("https://www.example.com/1.gif", "Device-Memory", true, "4");
+  ExpectHeader("https://www.example.com/1.gif", "DPR", false, "");
+  ExpectHeader("https://www.example.com/1.gif", "Width", false, "");
+  ExpectHeader("https://www.example.com/1.gif", "Viewport-Width", false, "");
+  // The origin of the resource does not match the origin of the main frame
+  // resource. Client hint should be attached since the persisten client hint
+  // feature is not enabled.
   ExpectHeader("https://www.someother-example.com/1.gif", "Device-Memory", true,
                "4");
 }
@@ -627,6 +650,9 @@
 // Verify that client hints are attched when the resources belong to a local
 // context.
 TEST_F(FrameFetchContextHintsTest, MonitorDeviceMemoryHintsLocalContext) {
+  document->SetURL(KURL("http://localhost/"));
+  document->SetSecurityOrigin(
+      SecurityOrigin::Create(KURL("http://localhost/")));
   ExpectHeader("http://localhost/1.gif", "Device-Memory", false, "");
   ClientHintsPreferences preferences;
   preferences.SetShouldSendForTesting(mojom::WebClientHintsType::kDeviceMemory);
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index a9741a35..5ec60a2 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -510,9 +510,11 @@
   // it is specified, or the empty string otherwise." [spec text]
   IntegrityMetadataSet integrity_metadata;
   if (!params.integrity.IsEmpty()) {
+    SubresourceIntegrity::IntegrityFeatures integrity_features =
+        SubresourceIntegrityHelper::GetFeatures(&document);
     SubresourceIntegrity::ReportInfo report_info;
     SubresourceIntegrity::ParseIntegrityAttribute(
-        params.integrity, integrity_metadata, &report_info);
+        params.integrity, integrity_features, integrity_metadata, &report_info);
     SubresourceIntegrityHelper::DoReport(document, report_info);
   }
 
diff --git a/third_party/WebKit/Source/core/loader/OWNERS b/third_party/WebKit/Source/core/loader/OWNERS
index 6bbd5b3..b875f73 100644
--- a/third_party/WebKit/Source/core/loader/OWNERS
+++ b/third_party/WebKit/Source/core/loader/OWNERS
@@ -1,7 +1,6 @@
 japhet@chromium.org
 mkwst@chromium.org
 yhirano@chromium.org
-tyoshino@chromium.org
 
 # TEAM: loading-dev@chromium.org
 # COMPONENT: Blink>Loader
diff --git a/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.cpp b/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.cpp
index 967db27..f6d4ee39 100644
--- a/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.cpp
+++ b/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.cpp
@@ -7,6 +7,8 @@
 #include "core/dom/ExecutionContext.h"
 #include "core/frame/UseCounter.h"
 #include "core/inspector/ConsoleTypes.h"
+#include "core/origin_trials/origin_trials.h"
+#include "platform/runtime_enabled_features.h"
 
 namespace blink {
 
@@ -59,4 +61,13 @@
   }
 }
 
+SubresourceIntegrity::IntegrityFeatures SubresourceIntegrityHelper::GetFeatures(
+    ExecutionContext* execution_context) {
+  bool allow_signatures =
+      RuntimeEnabledFeatures::SignatureBasedIntegrityEnabledByRuntimeFlag() ||
+      OriginTrials::signatureBasedIntegrityEnabled(execution_context);
+  return allow_signatures ? SubresourceIntegrity::IntegrityFeatures::kSignatures
+                          : SubresourceIntegrity::IntegrityFeatures::kDefault;
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.h b/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.h
index d8f1daa..836bfc1 100644
--- a/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.h
+++ b/third_party/WebKit/Source/core/loader/SubresourceIntegrityHelper.h
@@ -23,6 +23,8 @@
 
   static void GetConsoleMessages(const SubresourceIntegrity::ReportInfo&,
                                  HeapVector<Member<ConsoleMessage>>*);
+
+  static SubresourceIntegrity::IntegrityFeatures GetFeatures(ExecutionContext*);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
index 12f49a2..c63ccd7 100644
--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
@@ -32,6 +32,7 @@
 #include "platform/instrumentation/tracing/web_memory_allocator_dump.h"
 #include "platform/instrumentation/tracing/web_process_memory_dump.h"
 #include "platform/loader/SubresourceIntegrity.h"
+#include "platform/loader/fetch/CachedMetadata.h"
 #include "platform/loader/fetch/FetchParameters.h"
 #include "platform/loader/fetch/IntegrityMetadata.h"
 #include "platform/loader/fetch/ResourceClientWalker.h"
@@ -42,6 +43,109 @@
 
 namespace blink {
 
+// SingleCachedMetadataHandlerImpl should be created when a response is
+// received, and can be used independently from Resource. - It doesn't have any
+// references to Resource. Necessary data are captured
+//   from Resource when the handler is created.
+// - It is not affected by Resource's revalidation on MemoryCache.
+//   The validity of the handler is solely checked by |response_url_| and
+//   |response_time_| (not by Resource) by the browser process, and the cached
+//   metadata written to the handler is rejected if e.g. the disk cache entry
+//   has been updated and the handler refers to an older response.
+class ScriptResource::SingleCachedMetadataHandlerImpl final
+    : public SingleCachedMetadataHandler {
+ public:
+  SingleCachedMetadataHandlerImpl(const WTF::TextEncoding&,
+                                  std::unique_ptr<CachedMetadataSender>);
+  ~SingleCachedMetadataHandlerImpl() override = default;
+  void Trace(blink::Visitor*) override;
+  void SetCachedMetadata(uint32_t, const char*, size_t, CacheType) override;
+  void ClearCachedMetadata(CacheType) override;
+  scoped_refptr<CachedMetadata> GetCachedMetadata(uint32_t) const override;
+
+  // This returns the encoding at the time of ResponseReceived().
+  // Therefore this does NOT reflect encoding detection from body contents,
+  // but the final encoding after the encoding detection can be determined
+  // uniquely from Encoding(), provided the body content is the same,
+  // as we can assume the encoding detection will results in the same final
+  // encoding.
+  // TODO(hiroshige): Make this semantics cleaner.
+  String Encoding() const override { return String(encoding_.GetName()); }
+
+  bool IsServedFromCacheStorage() const override {
+    return sender_->IsServedFromCacheStorage();
+  }
+
+  // Sets the serialized metadata retrieved from the platform's cache.
+  void SetSerializedCachedMetadata(const char*, size_t);
+
+ private:
+  void SendToPlatform();
+
+  scoped_refptr<CachedMetadata> cached_metadata_;
+  std::unique_ptr<CachedMetadataSender> sender_;
+
+  const WTF::TextEncoding encoding_;
+};
+
+ScriptResource::SingleCachedMetadataHandlerImpl::
+    SingleCachedMetadataHandlerImpl(
+        const WTF::TextEncoding& encoding,
+        std::unique_ptr<CachedMetadataSender> sender)
+    : sender_(std::move(sender)), encoding_(encoding) {}
+
+void ScriptResource::SingleCachedMetadataHandlerImpl::Trace(
+    blink::Visitor* visitor) {
+  CachedMetadataHandler::Trace(visitor);
+}
+
+void ScriptResource::SingleCachedMetadataHandlerImpl::SetCachedMetadata(
+    uint32_t data_type_id,
+    const char* data,
+    size_t size,
+    CachedMetadataHandler::CacheType cache_type) {
+  // Currently, only one type of cached metadata per resource is supported. If
+  // the need arises for multiple types of metadata per resource this could be
+  // enhanced to store types of metadata in a map.
+  DCHECK(!cached_metadata_);
+  cached_metadata_ = CachedMetadata::Create(data_type_id, data, size);
+  if (cache_type == CachedMetadataHandler::kSendToPlatform)
+    SendToPlatform();
+}
+
+void ScriptResource::SingleCachedMetadataHandlerImpl::ClearCachedMetadata(
+    CachedMetadataHandler::CacheType cache_type) {
+  cached_metadata_ = nullptr;
+  if (cache_type == CachedMetadataHandler::kSendToPlatform)
+    SendToPlatform();
+}
+
+scoped_refptr<CachedMetadata>
+ScriptResource::SingleCachedMetadataHandlerImpl::GetCachedMetadata(
+    uint32_t data_type_id) const {
+  if (!cached_metadata_ || cached_metadata_->DataTypeID() != data_type_id)
+    return nullptr;
+  return cached_metadata_;
+}
+
+void ScriptResource::SingleCachedMetadataHandlerImpl::
+    SetSerializedCachedMetadata(const char* data, size_t size) {
+  // We only expect to receive cached metadata from the platform once. If this
+  // triggers, it indicates an efficiency problem which is most likely
+  // unexpected in code designed to improve performance.
+  DCHECK(!cached_metadata_);
+  cached_metadata_ = CachedMetadata::CreateFromSerializedData(data, size);
+}
+
+void ScriptResource::SingleCachedMetadataHandlerImpl::SendToPlatform() {
+  if (cached_metadata_) {
+    const Vector<char>& serialized_data = cached_metadata_->SerializedData();
+    sender_->Send(serialized_data.data(), serialized_data.size());
+  } else {
+    sender_->Send(nullptr, 0);
+  }
+}
+
 ScriptResource* ScriptResource::Fetch(FetchParameters& params,
                                       ResourceFetcher* fetcher,
                                       ResourceClient* client) {
@@ -83,6 +187,26 @@
   return source_text_;
 }
 
+SingleCachedMetadataHandler* ScriptResource::CacheHandler() {
+  return static_cast<SingleCachedMetadataHandler*>(Resource::CacheHandler());
+}
+
+CachedMetadataHandler* ScriptResource::CreateCachedMetadataHandler(
+    std::unique_ptr<CachedMetadataSender> send_callback) {
+  return new SingleCachedMetadataHandlerImpl(Encoding(),
+                                             std::move(send_callback));
+}
+
+void ScriptResource::SetSerializedCachedMetadata(const char* data,
+                                                 size_t size) {
+  Resource::SetSerializedCachedMetadata(data, size);
+  SingleCachedMetadataHandlerImpl* cache_handler =
+      static_cast<SingleCachedMetadataHandlerImpl*>(Resource::CacheHandler());
+  if (cache_handler) {
+    cache_handler->SetSerializedCachedMetadata(data, size);
+  }
+}
+
 void ScriptResource::DestroyDecodedDataForFailedRevalidation() {
   source_text_ = AtomicString();
   SetDecodedSize(0);
diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
index 7764a3c..ff7f145 100644
--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
+++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
@@ -66,11 +66,21 @@
 
   void DestroyDecodedDataForFailedRevalidation() override;
 
+  void SetSerializedCachedMetadata(const char*, size_t) override;
+
   const String& SourceText();
 
   AccessControlStatus CalculateAccessControlStatus(const SecurityOrigin*) const;
 
+  SingleCachedMetadataHandler* CacheHandler();
+
+ protected:
+  CachedMetadataHandler* CreateCachedMetadataHandler(
+      std::unique_ptr<CachedMetadataSender> send_callback) override;
+
  private:
+  class SingleCachedMetadataHandlerImpl;
+
   class ScriptResourceFactory : public ResourceFactory {
    public:
     ScriptResourceFactory()
diff --git a/third_party/WebKit/Source/core/script/ScriptLoader.cpp b/third_party/WebKit/Source/core/script/ScriptLoader.cpp
index 061b78f..1ad3f1f 100644
--- a/third_party/WebKit/Source/core/script/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/script/ScriptLoader.cpp
@@ -349,9 +349,11 @@
   String integrity_attr = element_->IntegrityAttributeValue();
   IntegrityMetadataSet integrity_metadata;
   if (!integrity_attr.IsEmpty()) {
+    SubresourceIntegrity::IntegrityFeatures integrity_features =
+        SubresourceIntegrityHelper::GetFeatures(&element_document);
     SubresourceIntegrity::ReportInfo report_info;
     SubresourceIntegrity::ParseIntegrityAttribute(
-        integrity_attr, integrity_metadata, &report_info);
+        integrity_attr, integrity_features, integrity_metadata, &report_info);
     SubresourceIntegrityHelper::DoReport(element_document, report_info);
   }
 
diff --git a/third_party/WebKit/Source/core/streams/OWNERS b/third_party/WebKit/Source/core/streams/OWNERS
index 5ef0f09..b63f881 100644
--- a/third_party/WebKit/Source/core/streams/OWNERS
+++ b/third_party/WebKit/Source/core/streams/OWNERS
@@ -1,4 +1,3 @@
-tyoshino@chromium.org
 yhirano@chromium.org
 ricea@chromium.org
 
diff --git a/third_party/WebKit/Source/core/url/OWNERS b/third_party/WebKit/Source/core/url/OWNERS
index 5c6f193..aa9bc48 100644
--- a/third_party/WebKit/Source/core/url/OWNERS
+++ b/third_party/WebKit/Source/core/url/OWNERS
@@ -1,5 +1,4 @@
 mkwst@chromium.org
-tyoshino@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
 # COMPONENT: Blink>Network
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 66182a5..331b4368 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -179,8 +179,9 @@
     }
 
     ErrorEvent* error_event = nullptr;
-    CachedMetadataHandler* handler(CreateWorkerScriptCachedMetadataHandler(
-        complete_url, cached_meta_data.get()));
+    SingleCachedMetadataHandler* handler(
+        CreateWorkerScriptCachedMetadataHandler(complete_url,
+                                                cached_meta_data.get()));
     ReportingProxy().WillEvaluateImportedScript(
         source_code.length(), cached_meta_data ? cached_meta_data->size() : 0);
     ScriptController()->Evaluate(
@@ -298,8 +299,9 @@
     String source_code,
     std::unique_ptr<Vector<char>> cached_meta_data) {
   DCHECK(IsContextThread());
-  CachedMetadataHandler* handler = CreateWorkerScriptCachedMetadataHandler(
-      script_url, cached_meta_data.get());
+  SingleCachedMetadataHandler* handler =
+      CreateWorkerScriptCachedMetadataHandler(script_url,
+                                              cached_meta_data.get());
   DCHECK(!source_code.IsNull());
   ReportingProxy().WillEvaluateWorkerScript(
       source_code.length(),
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
index 94ca31b..6bcaf7f 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
@@ -70,7 +70,7 @@
   ~WorkerGlobalScope() override;
 
   // Returns null if caching is not supported.
-  virtual CachedMetadataHandler* CreateWorkerScriptCachedMetadataHandler(
+  virtual SingleCachedMetadataHandler* CreateWorkerScriptCachedMetadataHandler(
       const KURL& script_url,
       const Vector<char>* meta_data) {
     return nullptr;
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/OWNERS b/third_party/WebKit/Source/core/xmlhttprequest/OWNERS
index 461d9eee..aac34a8e 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/OWNERS
+++ b/third_party/WebKit/Source/core/xmlhttprequest/OWNERS
@@ -1,5 +1,4 @@
 kouhei@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.cpp
index b9ff424..908b9348 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.cpp
@@ -6,6 +6,7 @@
 
 #include "core/dom/ExecutionContext.h"
 #include "core/loader/ThreadableLoader.h"
+#include "modules/background_fetch/IconDefinition.h"
 #include "platform/graphics/ColorBehavior.h"
 #include "platform/image-decoders/ImageDecoder.h"
 #include "platform/image-decoders/ImageFrame.h"
@@ -25,12 +26,28 @@
 }  // namespace
 
 BackgroundFetchIconLoader::BackgroundFetchIconLoader() = default;
-BackgroundFetchIconLoader::~BackgroundFetchIconLoader() = default;
+BackgroundFetchIconLoader::~BackgroundFetchIconLoader() {
+  // We should've called Stop() before the destructor is invoked.
+  DCHECK(stopped_ || icon_callback_.is_null());
+}
 
+// TODO(nator): Add functionality to select which icon to load.
 void BackgroundFetchIconLoader::Start(ExecutionContext* execution_context,
-                                      const KURL& url,
+                                      const HeapVector<IconDefinition>& icons,
                                       IconCallback icon_callback) {
   DCHECK(!stopped_);
+  DCHECK_GE(icons.size(), 1u);
+
+  if (!icons[0].hasSrc()) {
+    std::move(icon_callback).Run(SkBitmap());
+    return;
+  }
+
+  KURL first_icon_url = execution_context->CompleteURL(icons[0].src());
+  if (!first_icon_url.IsValid() || first_icon_url.IsEmpty()) {
+    std::move(icon_callback).Run(SkBitmap());
+    return;
+  }
 
   icon_callback_ = std::move(icon_callback);
 
@@ -41,7 +58,7 @@
   if (execution_context->IsWorkerGlobalScope())
     resource_loader_options.request_initiator_context = kWorkerContext;
 
-  ResourceRequest resource_request(url);
+  ResourceRequest resource_request(first_icon_url);
   resource_request.SetRequestContext(WebURLRequest::kRequestContextImage);
   resource_request.SetPriority(ResourceLoadPriority::kMedium);
   resource_request.SetRequestorOrigin(execution_context->GetSecurityOrigin());
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.h
index dfbcb63..364955a 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoader.h
@@ -15,6 +15,8 @@
 
 namespace blink {
 
+class IconDefinition;
+
 class MODULES_EXPORT BackgroundFetchIconLoader final
     : public GarbageCollectedFinalized<BackgroundFetchIconLoader>,
       public ThreadableLoaderClient {
@@ -32,7 +34,9 @@
 
   // Asynchronously download an icon from the given url, decodes the loaded
   // data, and passes the bitmap to the given callback.
-  void Start(ExecutionContext*, const KURL&, IconCallback);
+  void Start(ExecutionContext*,
+             const HeapVector<IconDefinition>&,
+             IconCallback);
 
   // Cancels the pending load, if there is one. The |icon_callback_| will not
   // be run.
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoaderTest.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoaderTest.cpp
index af78df8..49aa317 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoaderTest.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchIconLoaderTest.cpp
@@ -5,6 +5,7 @@
 #include "core/dom/ExecutionContext.h"
 #include "core/testing/PageTestBase.h"
 #include "modules/background_fetch/BackgroundFetchIconLoader.h"
+#include "modules/background_fetch/IconDefinition.h"
 #include "platform/heap/Persistent.h"
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/testing/URLTestHelpers.h"
@@ -50,7 +51,6 @@
   // Callback for BackgroundFetchIconLoader. This will set up the state of the
   // load as either success or failed based on whether the bitmap is empty.
   void IconLoaded(const SkBitmap& bitmap) {
-    LOG(ERROR) << "did icon get loaded?";
     if (!bitmap.empty())
       loaded_ = BackgroundFetchLoadState::kLoadSuccessful;
     else
@@ -58,7 +58,12 @@
   }
 
   void LoadIcon(const KURL& url) {
-    loader_->Start(GetContext(), url,
+    IconDefinition icon;
+    icon.setSrc(url.GetString());
+    icon.setType("image/png");
+    icon.setSizes("500x500");
+    HeapVector<IconDefinition> icons(1, icon);
+    loader_->Start(GetContext(), icons,
                    Bind(&BackgroundFetchIconLoaderTest::IconLoaded,
                         WTF::Unretained(this)));
   }
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
index 161f2b8..142c8cab 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
@@ -15,6 +15,7 @@
 #include "core/frame/csp/ContentSecurityPolicy.h"
 #include "core/loader/MixedContentChecker.h"
 #include "modules/background_fetch/BackgroundFetchBridge.h"
+#include "modules/background_fetch/BackgroundFetchIconLoader.h"
 #include "modules/background_fetch/BackgroundFetchOptions.h"
 #include "modules/background_fetch/BackgroundFetchRegistration.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
@@ -27,6 +28,7 @@
 #include "platform/weborigin/KnownPorts.h"
 #include "platform/weborigin/SecurityOrigin.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
+#include "third_party/skia/include/core/SkBitmap.h"
 
 namespace blink {
 
@@ -158,7 +160,9 @@
 
 BackgroundFetchManager::BackgroundFetchManager(
     ServiceWorkerRegistration* registration)
-    : registration_(registration) {
+    : ContextLifecycleObserver(registration->GetExecutionContext()),
+      registration_(registration),
+      loader_(new BackgroundFetchIconLoader()) {
   DCHECK(registration);
   bridge_ = BackgroundFetchBridge::From(registration_);
 }
@@ -250,11 +254,31 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
   ScriptPromise promise = resolver->Promise();
 
+  // Load Icons. Right now, we just load the first icon. Lack of icons or
+  // inability to load them should not be fatal to the fetch.
+  if (options.icons().size()) {
+    loader_->Start(
+        execution_context, options.icons(),
+        WTF::Bind(&BackgroundFetchManager::DidLoadIcons, WrapPersistent(this),
+                  id, WTF::Passed(std::move(web_requests)), options,
+                  WrapPersistent(resolver)));
+    return promise;
+  }
+
+  DidLoadIcons(id, std::move(web_requests), options, WrapPersistent(resolver),
+               SkBitmap());
+  return promise;
+}
+
+void BackgroundFetchManager::DidLoadIcons(
+    const String& id,
+    Vector<WebServiceWorkerRequest> web_requests,
+    const BackgroundFetchOptions& options,
+    ScriptPromiseResolver* resolver,
+    const SkBitmap& bitmap) {
   bridge_->Fetch(id, std::move(web_requests), options,
                  WTF::Bind(&BackgroundFetchManager::DidFetch,
                            WrapPersistent(this), WrapPersistent(resolver)));
-
-  return promise;
 }
 
 void BackgroundFetchManager::DidFetch(
@@ -433,7 +457,15 @@
 void BackgroundFetchManager::Trace(blink::Visitor* visitor) {
   visitor->Trace(registration_);
   visitor->Trace(bridge_);
+  visitor->Trace(loader_);
+  ContextLifecycleObserver::Trace(visitor);
   ScriptWrappable::Trace(visitor);
 }
 
+void BackgroundFetchManager::ContextDestroyed(ExecutionContext*) {
+  if (loader_) {
+    loader_->Stop();
+  }
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
index ff656db1..6172bad 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
@@ -6,18 +6,23 @@
 #define BackgroundFetchManager_h
 
 #include "bindings/core/v8/ScriptPromise.h"
+#include "core/dom/ContextLifecycleObserver.h"
 #include "modules/ModulesExport.h"
 #include "platform/bindings/ScriptWrappable.h"
 #include "platform/heap/GarbageCollected.h"
 #include "platform/heap/Handle.h"
 #include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
 
+class SkBitmap;
+
 namespace blink {
 
 class BackgroundFetchBridge;
+class BackgroundFetchIconLoader;
 class BackgroundFetchOptions;
 class BackgroundFetchRegistration;
 class ExceptionState;
+class ExecutionContext;
 class RequestOrUSVStringOrRequestOrUSVStringSequence;
 class ScriptPromiseResolver;
 class ScriptState;
@@ -26,10 +31,14 @@
 
 // Implementation of the BackgroundFetchManager JavaScript object, accessible
 // by developers through ServiceWorkerRegistration.backgroundFetch.
-class MODULES_EXPORT BackgroundFetchManager final : public ScriptWrappable {
+class MODULES_EXPORT BackgroundFetchManager final
+    : public ScriptWrappable,
+      public ContextLifecycleObserver {
+  USING_GARBAGE_COLLECTED_MIXIN(BackgroundFetchManager);
   DEFINE_WRAPPERTYPEINFO();
 
  public:
+  ~BackgroundFetchManager() override = default;
   static BackgroundFetchManager* Create(
       ServiceWorkerRegistration* registration) {
     return new BackgroundFetchManager(registration);
@@ -47,6 +56,9 @@
 
   void Trace(blink::Visitor*);
 
+  // ContextLifecycleObserver interface
+  void ContextDestroyed(ExecutionContext*) override;
+
  private:
   friend class BackgroundFetchManagerTest;
 
@@ -59,6 +71,11 @@
       const RequestOrUSVStringOrRequestOrUSVStringSequence& requests,
       ExceptionState&);
 
+  void DidLoadIcons(const String&,
+                    Vector<WebServiceWorkerRequest>,
+                    const BackgroundFetchOptions&,
+                    ScriptPromiseResolver*,
+                    const SkBitmap&);
   void DidFetch(ScriptPromiseResolver*,
                 mojom::blink::BackgroundFetchError,
                 BackgroundFetchRegistration*);
@@ -71,6 +88,7 @@
 
   Member<ServiceWorkerRegistration> registration_;
   Member<BackgroundFetchBridge> bridge_;
+  Member<BackgroundFetchIconLoader> loader_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/beacon/OWNERS b/third_party/WebKit/Source/modules/beacon/OWNERS
index d6b8c84..7115fad 100644
--- a/third_party/WebKit/Source/modules/beacon/OWNERS
+++ b/third_party/WebKit/Source/modules/beacon/OWNERS
@@ -1,4 +1,4 @@
-tyoshino@chromium.org
+yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
 # COMPONENT: Blink>Network
diff --git a/third_party/WebKit/Source/modules/eventsource/OWNERS b/third_party/WebKit/Source/modules/eventsource/OWNERS
index 4991204e..7115fad 100644
--- a/third_party/WebKit/Source/modules/eventsource/OWNERS
+++ b/third_party/WebKit/Source/modules/eventsource/OWNERS
@@ -1,4 +1,3 @@
-tyoshino@chromium.org
 yhirano@chromium.org
 
 # TEAM: blink-network-dev@chromium.org
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index d3112170..85cc92a 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -58,6 +58,7 @@
 #include "core/frame/LocalFrameClient.h"
 #include "core/frame/UseCounter.h"
 #include "core/frame/csp/ContentSecurityPolicy.h"
+#include "core/origin_trials/origin_trials.h"
 #include "modules/crypto/CryptoResultImpl.h"
 #include "modules/mediastream/MediaConstraintsImpl.h"
 #include "modules/mediastream/MediaStream.h"
@@ -1176,6 +1177,12 @@
   stream->UnregisterObserver(this);
 }
 
+String RTCPeerConnection::id(ScriptState* script_state) const {
+  DCHECK(OriginTrials::rtcPeerConnectionIdEnabled(
+      ExecutionContext::From(script_state)));
+  return peer_handler_->Id();
+}
+
 MediaStreamVector RTCPeerConnection::getLocalStreams() const {
   MediaStreamVector local_streams;
   for (const auto& rtp_sender : getSenders()) {
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
index a00a164..e5ea469 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
@@ -154,6 +154,8 @@
 
   void removeStream(MediaStream*, ExceptionState&);
 
+  String id(ScriptState*) const;
+
   ScriptPromise getStats(ScriptState*,
                          V8RTCStatsCallback* success_callback,
                          MediaStreamTrack* selector = nullptr);
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
index 036ecfc..2ad13fce 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
@@ -139,6 +139,8 @@
     [Measure, RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track);
     attribute EventHandler onaddstream;
     attribute EventHandler onremovestream;
+
+    [OriginTrialEnabled=RtcPeerConnectionId, CallWith=ScriptState, MeasureAs=RtcPeerConnectionId] readonly attribute DOMString id;
 };
 
 // https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionerrorcallback
diff --git a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
index bd8c769..189fe29 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
@@ -191,11 +191,10 @@
   resource_response.SetEncodedDataLength(encoded_data_length);
   resource_response.SetEncodedBodyLength(encoded_body_length);
   resource_response.SetDecodedBodyLength(decoded_body_length);
-  // According to the current spec of Resource Timing, the initiator type of
-  // navigation preload request must be "other". But it may change when the spec
-  // discussion is settled. https://github.com/w3c/resource-timing/issues/110
+  // According to the Resource Timing spec, the initiator type of
+  // navigation preload request is "navigation".
   scoped_refptr<ResourceTimingInfo> info = ResourceTimingInfo::Create(
-      "other",
+      "navigation",
       TimeTicksInSeconds(
           resource_response.GetResourceLoadTiming()->RequestTime()),
       false /* is_main_resource */);
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
index 5dbd1886..1610391d 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -298,7 +298,7 @@
   WorkerGlobalScope::importScripts(urls, exception_state);
 }
 
-CachedMetadataHandler*
+SingleCachedMetadataHandler*
 ServiceWorkerGlobalScope::CreateWorkerScriptCachedMetadataHandler(
     const KURL& script_url,
     const Vector<char>* meta_data) {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index bb00358..7f13343 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -129,7 +129,7 @@
                            ServiceWorkerThread*,
                            double time_origin);
   void importScripts(const Vector<String>& urls, ExceptionState&) override;
-  CachedMetadataHandler* CreateWorkerScriptCachedMetadataHandler(
+  SingleCachedMetadataHandler* CreateWorkerScriptCachedMetadataHandler(
       const KURL& script_url,
       const Vector<char>* meta_data) override;
   void ExceptionThrown(ErrorEvent*) override;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeProxy.cpp
index c186bc2..871c884 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeProxy.cpp
@@ -496,7 +496,7 @@
 }
 
 void ServiceWorkerGlobalScopeProxy::CountFeature(WebFeature feature) {
-  Client().CountFeature(static_cast<uint32_t>(feature));
+  Client().CountFeature(feature);
 }
 
 void ServiceWorkerGlobalScopeProxy::CountDeprecation(WebFeature feature) {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
index 05ceb08..9f63102 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
@@ -16,7 +16,8 @@
 class WorkerGlobalScope;
 class CachedMetadata;
 
-class ServiceWorkerScriptCachedMetadataHandler : public CachedMetadataHandler {
+class ServiceWorkerScriptCachedMetadataHandler
+    : public SingleCachedMetadataHandler {
  public:
   static ServiceWorkerScriptCachedMetadataHandler* Create(
       WorkerGlobalScope* worker_global_scope,
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 4fdec527..7667890 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -765,36 +765,23 @@
     AccelerationHint hint) const {
   if (!GetDrawingBuffer())
     return nullptr;
-  // If on the main thread, directly access the drawing buffer and create the
-  // image snapshot.
-  if (IsMainThread()) {
-    GetDrawingBuffer()->ResolveAndBindForReadAndDraw();
-    IntSize size = ClampedCanvasSize();
-    std::unique_ptr<CanvasResourceProvider> resource_provider =
-        CanvasResourceProvider::Create(
-            size, CanvasResourceProvider::kAcceleratedResourceUsage,
-            SharedGpuContext::ContextProviderWrapper());
-    if (!resource_provider || !resource_provider->IsValid())
-      return nullptr;
-    if (!CopyRenderingResultsFromDrawingBuffer(resource_provider.get(),
-                                               kBackBuffer)) {
-      // copyRenderingResultsFromDrawingBuffer is expected to always succeed
-      // because we've explicitly created an Accelerated surface and have
-      // already validated it.
-      NOTREACHED();
-      return nullptr;
-    }
-    return resource_provider->Snapshot();
+  GetDrawingBuffer()->ResolveAndBindForReadAndDraw();
+  IntSize size = ClampedCanvasSize();
+  std::unique_ptr<CanvasResourceProvider> resource_provider =
+      CanvasResourceProvider::Create(
+          size, CanvasResourceProvider::kAcceleratedResourceUsage,
+          SharedGpuContext::ContextProviderWrapper(), 0, ColorParams());
+  if (!resource_provider || !resource_provider->IsValid())
+    return nullptr;
+  if (!CopyRenderingResultsFromDrawingBuffer(resource_provider.get(),
+                                             kBackBuffer)) {
+    // copyRenderingResultsFromDrawingBuffer is expected to always succeed
+    // because we've explicitly created an Accelerated surface and have
+    // already validated it.
+    NOTREACHED();
+    return nullptr;
   }
-
-  // If on a worker thread, create a copy from the drawing buffer and create
-  // the snapshot from the copy.
-  int width = GetDrawingBuffer()->Size().Width();
-  int height = GetDrawingBuffer()->Size().Height();
-  SkImageInfo image_info = SkImageInfo::Make(
-      width, height, kRGBA_8888_SkColorType,
-      CreationAttributes().alpha ? kPremul_SkAlphaType : kOpaque_SkAlphaType);
-  return this->MakeImageSnapshot(image_info);
+  return resource_provider->Snapshot();
 }
 
 scoped_refptr<StaticBitmapImage> WebGLRenderingContextBase::MakeImageSnapshot(
@@ -1555,11 +1542,12 @@
     SourceDrawingBuffer source_buffer) const {
   if (!drawing_buffer_)
     return false;
-  std::unique_ptr<WebGraphicsContext3DProvider> provider =
-      Platform::Current()->CreateSharedOffscreenGraphicsContext3DProvider();
-  if (!provider)
+  base::WeakPtr<WebGraphicsContext3DProviderWrapper> shared_context_wrapper =
+      SharedGpuContext::ContextProviderWrapper();
+  if (!shared_context_wrapper)
     return false;
-  gpu::gles2::GLES2Interface* gl = provider->ContextGL();
+  gpu::gles2::GLES2Interface* gl =
+      shared_context_wrapper->ContextProvider()->ContextGL();
   GLuint texture_id = resource_provider->GetBackingTextureHandleForOverwrite();
   if (!texture_id)
     return false;
diff --git a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
index a1d5d3c..b393fa0 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
@@ -48,6 +48,16 @@
 
 namespace blink {
 
+namespace {
+sk_sp<SkFontMgr> FontManagerForSubType(
+    FontFormatCheck::VariableFontSubType font_sub_type) {
+  CHECK_NE(font_sub_type, FontFormatCheck::VariableFontSubType::kNotVariable);
+  if (font_sub_type == FontFormatCheck::VariableFontSubType::kVariableCFF2)
+    return WebFontTypefaceFactory::FreeTypeFontManager();
+  return WebFontTypefaceFactory::FontManagerForVariations();
+}
+}  // namespace
+
 FontCustomPlatformData::FontCustomPlatformData(sk_sp<SkTypeface> typeface,
                                                size_t data_size)
     : base_typeface_(std::move(typeface)), data_size_(data_size) {}
@@ -74,7 +84,11 @@
   // now, going with a reasonable upper limit. Deduplication is
   // handled by Skia with priority given to the last occuring
   // assignment.
-  if (FontFormatCheck::IsVariableFont(base_typeface_)) {
+  FontFormatCheck::VariableFontSubType font_sub_type =
+      FontFormatCheck::ProbeVariableFont(base_typeface_);
+  if (font_sub_type ==
+          FontFormatCheck::VariableFontSubType::kVariableTrueType ||
+      font_sub_type == FontFormatCheck::VariableFontSubType::kVariableCFF2) {
     Vector<SkFontArguments::Axis, 0> axes;
 
     SkFontArguments::Axis weight_axis = {
@@ -105,9 +119,10 @@
     }
 
     sk_sp<SkTypeface> sk_variation_font(
-        WebFontTypefaceFactory::FontManagerForVariations()->makeFromStream(
-            base_typeface_->openStream(nullptr)->duplicate(),
-            SkFontArguments().setAxes(axes.data(), axes.size())));
+        FontManagerForSubType(font_sub_type)
+            ->makeFromStream(
+                base_typeface_->openStream(nullptr)->duplicate(),
+                SkFontArguments().setAxes(axes.data(), axes.size())));
 
     if (sk_variation_font) {
       return_typeface = sk_variation_font;
diff --git a/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.h b/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.h
index e8bbbac..14cfe86 100644
--- a/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.h
+++ b/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.h
@@ -26,6 +26,7 @@
   // https://bugs.chromium.org/p/skia/issues/detail?id=7121
   static sk_sp<SkFontMgr> FontManagerForVariations();
   static sk_sp<SkFontMgr> FontManagerForSbix();
+  static sk_sp<SkFontMgr> FreeTypeFontManager();
 
  private:
   // These values are written to logs.  New enum values can be added, but
@@ -41,7 +42,6 @@
   };
 
   static sk_sp<SkFontMgr> DefaultFontManager();
-  static sk_sp<SkFontMgr> FreeTypeFontManager();
 
   static void ReportWebFontInstantiationResult(WebFontInstantiationResult);
 };
diff --git a/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.cpp b/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.cpp
index 8b0f2d1a..883f088 100644
--- a/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.cpp
+++ b/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.cpp
@@ -48,9 +48,16 @@
   return table_tags_.size() && table_tags_.Contains(HB_TAG('C', 'F', 'F', '2'));
 }
 
-bool FontFormatCheck::IsVariableFont(sk_sp<SkTypeface> typeface) {
-  return typeface->getTableSize(
-      SkFontTableTag(SkSetFourByteTag('f', 'v', 'a', 'r')));
+FontFormatCheck::VariableFontSubType FontFormatCheck::ProbeVariableFont(
+    sk_sp<SkTypeface> typeface) {
+  if (!typeface->getTableSize(
+          SkFontTableTag(SkSetFourByteTag('f', 'v', 'a', 'r'))))
+    return VariableFontSubType::kNotVariable;
+
+  if (typeface->getTableSize(
+          SkFontTableTag(SkSetFourByteTag('C', 'F', 'F', '2'))))
+    return VariableFontSubType::kVariableCFF2;
+  return VariableFontSubType::kVariableTrueType;
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.h b/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.h
index 81e66dd1..1e8b9c59 100644
--- a/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.h
+++ b/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.h
@@ -21,7 +21,13 @@
   bool IsCff2OutlineFont();
 
   // Still needed in FontCustomPlatformData.
-  static bool IsVariableFont(sk_sp<SkTypeface>);
+  enum class VariableFontSubType {
+    kNotVariable,
+    kVariableTrueType,
+    kVariableCFF2
+  };
+
+  static VariableFontSubType ProbeVariableFont(sk_sp<SkTypeface>);
 
  private:
   // hb-common.h: typedef uint32_t hb_tag_t;
diff --git a/third_party/WebKit/Source/platform/heap/BUILD.gn b/third_party/WebKit/Source/platform/heap/BUILD.gn
index e836245..da24c73 100644
--- a/third_party/WebKit/Source/platform/heap/BUILD.gn
+++ b/third_party/WebKit/Source/platform/heap/BUILD.gn
@@ -49,6 +49,7 @@
     "HeapTerminatedArray.h",
     "HeapTerminatedArrayBuilder.h",
     "HeapTraits.h",
+    "MarkingVerifier.h",
     "MarkingVisitor.cpp",
     "MarkingVisitor.h",
     "Member.h",
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index bdcb00d5..a4fc096 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -397,6 +397,12 @@
   weak_processing_time_histogram.Count(time_for_weak_processing);
 }
 
+void ThreadHeap::VerifyMarking() {
+  for (int i = 0; i < BlinkGC::kNumberOfArenas; ++i) {
+    arenas_[i]->VerifyMarking();
+  }
+}
+
 void ThreadHeap::ReportMemoryUsageHistogram() {
   static size_t supported_max_size_in_mb = 4 * 1024;
   static size_t observed_max_size_in_mb = 0;
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
index 1da251a..df76452 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.h
+++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -356,6 +356,7 @@
   void PostMarkingProcessing(Visitor*);
   void WeakProcessing(Visitor*);
   bool AdvanceMarkingStackProcessing(Visitor*, double deadline_seconds);
+  void VerifyMarking();
 
   // Conservatively checks whether an address is a pointer in any of the
   // thread heaps.  If so marks the object pointed to as live.
diff --git a/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp b/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
index b437dcb..eaa72bd3 100644
--- a/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
@@ -25,7 +25,10 @@
 
 class IntWrapper : public blink::GarbageCollectedFinalized<IntWrapper> {
  public:
+  static bool did_verify_at_least_once;
+
   static IntWrapper* Create(int x, VerifyArenaCompaction verify = NoVerify) {
+    did_verify_at_least_once = false;
     return new IntWrapper(x, verify);
   }
 
@@ -33,7 +36,13 @@
 
   void Trace(blink::Visitor* visitor) {
     // Verify if compaction is indeed activated.
-    //
+
+    // There may be multiple passes over objects during a GC, even after
+    // compaction is finished. Filter out that cases here.
+    if (!visitor->Heap().Compaction()->IsCompacting())
+      return;
+
+    did_verify_at_least_once = true;
     // What arenas end up being compacted is dependent on residency,
     // so approximate the arena checks to fit.
     blink::HeapCompact* compaction = visitor->Heap().Compaction();
@@ -66,6 +75,9 @@
   int x_;
   VerifyArenaCompaction verify_;
 };
+
+bool IntWrapper::did_verify_at_least_once = false;
+
 static_assert(WTF::IsTraceable<IntWrapper>::value,
               "IsTraceable<> template failed to recognize trace method.");
 
@@ -255,6 +267,7 @@
     EXPECT_EQ(k.key->Value(), 100 - k.value);
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   for (auto k : *int_map)
     EXPECT_EQ(k.key->Value(), 100 - k.value);
@@ -284,6 +297,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   EXPECT_EQ(10u, int_map_vector->size());
   for (auto map : *int_map_vector) {
@@ -317,6 +331,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   EXPECT_EQ(10u, int_vector_map->size());
   for (const IntVector& int_vector : int_vector_map->Values()) {
@@ -338,6 +353,7 @@
     EXPECT_EQ(static_cast<int>(7 - i), deque->at(i)->Value());
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   for (size_t i = 0; i < deque->size(); ++i)
     EXPECT_EQ(static_cast<int>(7 - i), deque->at(i)->Value());
@@ -356,6 +372,7 @@
     EXPECT_EQ(static_cast<int>(7 - i), deque->at(i).at(i)->Value());
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   for (size_t i = 0; i < deque->size(); ++i)
     EXPECT_EQ(static_cast<int>(7 - i), deque->at(i).at(i)->Value());
@@ -377,6 +394,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   expected = 0;
   for (IntWrapper* v : *set) {
@@ -402,6 +420,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   expected = 0;
   for (IntVector* v : *set) {
@@ -431,6 +450,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   expected = 0;
   for (const Inner* v : *set) {
@@ -461,6 +481,7 @@
   }
 
   PerformHeapCompaction();
+  EXPECT_TRUE(IntWrapper::did_verify_at_least_once);
 
   expected = 0;
   for (const Inner* v : *set) {
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index db7a02f..b085ec93 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -37,6 +37,7 @@
 #include "platform/heap/BlinkGCMemoryDumpProvider.h"
 #include "platform/heap/CallbackStack.h"
 #include "platform/heap/HeapCompact.h"
+#include "platform/heap/MarkingVerifier.h"
 #include "platform/heap/MarkingVisitor.h"
 #include "platform/heap/PageMemory.h"
 #include "platform/heap/PagePool.h"
@@ -601,6 +602,14 @@
 #endif  // DCHECK_IS_ON()
 }
 
+void NormalPageArena::VerifyMarking() {
+#if DCHECK_IS_ON()
+  for (NormalPage* page = static_cast<NormalPage*>(first_page_); page;
+       page = static_cast<NormalPage*>(page->Next()))
+    page->VerifyMarking();
+#endif  // DCHECK_IS_ON()
+}
+
 #if DCHECK_IS_ON()
 bool NormalPageArena::IsConsistentForGC() {
   // A thread heap is consistent for sweeping if none of the pages to be swept
@@ -1574,6 +1583,22 @@
 #endif  // DCHECK_IS_ON()
 }
 
+void NormalPage::VerifyMarking() {
+  DCHECK(!ArenaForNormalPage()
+              ->GetThreadState()
+              ->Heap()
+              .GetStackFrameDepth()
+              .IsSafeToRecurse());
+  DCHECK(!ArenaForNormalPage()->CurrentAllocationPoint());
+  MarkingVerifier verifier(ArenaForNormalPage()->GetThreadState());
+  for (Address header_address = Payload(); header_address < PayloadEnd();) {
+    HeapObjectHeader* header =
+        reinterpret_cast<HeapObjectHeader*>(header_address);
+    verifier.VerifyObject(header);
+    header_address += header->size();
+  }
+}
+
 Address ObjectStartBitmap::FindHeader(
     Address address_maybe_pointing_to_the_middle_of_object) {
   size_t object_offset =
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.h b/third_party/WebKit/Source/platform/heap/HeapPage.h
index 168e5c3b..e8bae87 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.h
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.h
@@ -436,6 +436,8 @@
   // Returns true if magic number is valid.
   bool IsValid() const;
 
+  virtual void VerifyMarking() = 0;
+
  private:
   // Returns a random magic value.
   uint32_t GetMagic() const { return GetRandomMagic() ^ 0xba5e4a9e; }
@@ -593,6 +595,8 @@
   // found, or it is pointing to valid object or free list entry.
   HeapObjectHeader* FindHeaderFromAddress(Address);
 
+  void VerifyMarking() override;
+
  private:
   ObjectStartBitmap object_start_bit_map_;
 };
@@ -668,6 +672,8 @@
   bool IsVectorBackingPage() const { return is_vector_backing_page_; }
 #endif
 
+  void VerifyMarking() override {}
+
  private:
   size_t payload_size_;
 #ifdef ANNOTATE_CONTIGUOUS_CONTAINER
@@ -807,6 +813,7 @@
   void DisableIncrementalMarkingBarrier();
 
   virtual void Verify(){};
+  virtual void VerifyMarking(){};
 
  protected:
   bool SweepingCompleted() const { return !first_unswept_page_; }
@@ -868,6 +875,7 @@
   void SweepAndCompact();
 
   void Verify() override;
+  void VerifyMarking() override;
 
   Address CurrentAllocationPoint() const { return current_allocation_point_; }
 
@@ -877,6 +885,8 @@
            (address < (CurrentAllocationPoint() + RemainingAllocationSize()));
   }
 
+  size_t RemainingAllocationSize() const { return remaining_allocation_size_; }
+
   void MakeConsistentForGC() override;
 
  private:
@@ -892,7 +902,6 @@
   }
   void SetAllocationPoint(Address, size_t);
 
-  size_t RemainingAllocationSize() const { return remaining_allocation_size_; }
   void SetRemainingAllocationSize(size_t);
   void UpdateRemainingAllocationSize();
 
diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
index e9303b9b..822bd0e3 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -360,7 +360,7 @@
   }
 
   ~TestGCScope() {
-    state_->MarkPhaseEpilogue();
+    state_->MarkPhaseEpilogue(BlinkGC::kGCWithSweep);
     state_->PreSweep(BlinkGC::kGCWithSweep);
   }
 
@@ -720,8 +720,7 @@
   static TraceCounter* Create() { return new TraceCounter(); }
 
   void Trace(blink::Visitor* visitor) { trace_count_++; }
-
-  int TraceCount() { return trace_count_; }
+  int TraceCount() const { return trace_count_; }
 
  private:
   TraceCounter() : trace_count_(0) {}
@@ -729,27 +728,24 @@
   int trace_count_;
 };
 
+TEST(HeapTest, IsHeapObjectAliveForConstPointer) {
+  // See http://crbug.com/661363.
+  SimpleObject* object = SimpleObject::Create();
+  HeapObjectHeader* header = HeapObjectHeader::FromPayload(object);
+  header->Mark();
+  EXPECT_TRUE(ThreadHeap::IsHeapObjectAlive(object));
+  const SimpleObject* const_object = const_cast<const SimpleObject*>(object);
+  EXPECT_TRUE(ThreadHeap::IsHeapObjectAlive(const_object));
+}
+
 class ClassWithMember : public GarbageCollected<ClassWithMember> {
  public:
   static ClassWithMember* Create() { return new ClassWithMember(); }
 
   void Trace(blink::Visitor* visitor) {
-    EXPECT_TRUE(ThreadHeap::IsHeapObjectAlive(this));
-
-    // Const pointer should also be alive. See http://crbug.com/661363.
-    const ClassWithMember* const_ptr =
-        static_cast<const ClassWithMember*>(this);
-    EXPECT_TRUE(ThreadHeap::IsHeapObjectAlive(const_ptr));
-
-    if (!TraceCount())
-      EXPECT_FALSE(ThreadHeap::IsHeapObjectAlive(trace_counter_));
-    else
-      EXPECT_TRUE(ThreadHeap::IsHeapObjectAlive(trace_counter_));
-
     visitor->Trace(trace_counter_);
   }
-
-  int TraceCount() { return trace_counter_->TraceCount(); }
+  int TraceCount() const { return trace_counter_->TraceCount(); }
 
  private:
   ClassWithMember() : trace_counter_(TraceCounter::Create()) {}
@@ -1870,16 +1866,15 @@
 TEST(HeapTest, SimplePersistent) {
   Persistent<TraceCounter> trace_counter = TraceCounter::Create();
   EXPECT_EQ(0, trace_counter->TraceCount());
-
   PreciselyCollectGarbage();
-  EXPECT_EQ(1, trace_counter->TraceCount());
+  int saved_trace_count = trace_counter->TraceCount();
+  EXPECT_LT(0, saved_trace_count);
 
   Persistent<ClassWithMember> class_with_member = ClassWithMember::Create();
   EXPECT_EQ(0, class_with_member->TraceCount());
-
   PreciselyCollectGarbage();
-  EXPECT_EQ(1, class_with_member->TraceCount());
-  EXPECT_EQ(2, trace_counter->TraceCount());
+  EXPECT_LT(0, class_with_member->TraceCount());
+  EXPECT_LT(saved_trace_count, trace_counter->TraceCount());
 }
 
 TEST(HeapTest, SimpleFinalization) {
@@ -4796,13 +4791,13 @@
     Persistent<MixinA> a = obj;
     PreciselyCollectGarbage();
     EXPECT_EQ(0, IntWrapper::destructor_calls_);
-    EXPECT_EQ(1, DerivedMultipleMixins::trace_called_);
+    EXPECT_LT(0, DerivedMultipleMixins::trace_called_);
   }
   {
     Persistent<MixinB> b = obj;
     PreciselyCollectGarbage();
     EXPECT_EQ(0, IntWrapper::destructor_calls_);
-    EXPECT_EQ(2, DerivedMultipleMixins::trace_called_);
+    EXPECT_LT(0, DerivedMultipleMixins::trace_called_);
   }
   PreciselyCollectGarbage();
   EXPECT_EQ(4, IntWrapper::destructor_calls_);
@@ -4823,18 +4818,23 @@
   ClearOutOldGarbage();
   MixinA::trace_count_ = 0;
   MixinInstanceWithoutTrace* obj = new MixinInstanceWithoutTrace();
+  int saved_trace_count = 0;
   {
     Persistent<MixinA> a = obj;
     PreciselyCollectGarbage();
-    EXPECT_EQ(1, MixinA::trace_count_);
+    saved_trace_count = MixinA::trace_count_;
+    EXPECT_LT(0, saved_trace_count);
   }
   {
     Persistent<MixinInstanceWithoutTrace> b = obj;
     PreciselyCollectGarbage();
-    EXPECT_EQ(2, MixinA::trace_count_);
+    EXPECT_LT(saved_trace_count, MixinA::trace_count_);
+    saved_trace_count = MixinA::trace_count_;
   }
   PreciselyCollectGarbage();
-  EXPECT_EQ(2, MixinA::trace_count_);
+  // Oilpan might still call trace on dead objects for various reasons which is
+  // valid before sweeping started.
+  EXPECT_LE(saved_trace_count, MixinA::trace_count_);
 }
 
 TEST(HeapTest, NeedsAdjustAndMark) {
diff --git a/third_party/WebKit/Source/platform/heap/MarkingVerifier.h b/third_party/WebKit/Source/platform/heap/MarkingVerifier.h
new file mode 100644
index 0000000..25a43e2
--- /dev/null
+++ b/third_party/WebKit/Source/platform/heap/MarkingVerifier.h
@@ -0,0 +1,65 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MarkingVerifier_h
+#define MarkingVerifier_h
+
+#include "platform/heap/GarbageCollected.h"
+#include "platform/heap/HeapPage.h"
+#include "platform/heap/Visitor.h"
+
+namespace blink {
+
+// Marking verifier that checks that a child is marked if its parent is marked.
+// TODO(mlippautz):
+// - Backing store pointers
+// - Weak handling
+class MarkingVerifier final : public Visitor {
+ public:
+  explicit MarkingVerifier(ThreadState* state)
+      : Visitor(state), parent_(nullptr) {}
+  virtual ~MarkingVerifier() {}
+
+  void VerifyObject(HeapObjectHeader* header) {
+    if (header->IsFree())
+      return;
+
+    const GCInfo* info = ThreadHeap::GcInfo(header->GcInfoIndex());
+    const bool can_verify =
+        !info->HasVTable() || blink::VTableInitialized(header->Payload());
+    if (can_verify) {
+      CHECK(header->IsValid());
+      parent_ = header;
+      info->trace_(this, header->Payload());
+    }
+  }
+
+  void Visit(void* object, TraceDescriptor desc) {
+    if (parent_->IsMarked()) {
+      HeapObjectHeader* child_header =
+          HeapObjectHeader::FromPayload(desc.base_object_payload);
+      // This CHECKs ensure that any children reachable from marked parents are
+      // also marked. If you hit these CHECKs then marking is in an inconsistent
+      // state meaning that there are unmarked objects reachable from marked
+      // ones.
+      CHECK(child_header);
+      CHECK(child_header->IsMarked());
+    }
+  }
+
+  // Unused overrides.
+  void RegisterBackingStoreReference(void* slot) final {}
+  void RegisterBackingStoreCallback(void* backing_store,
+                                    MovingObjectCallback,
+                                    void* callback_data) final {}
+  void RegisterDelayedMarkNoTracing(const void* pointer) final {}
+  void RegisterWeakCallback(void* closure, WeakCallback) final {}
+
+ private:
+  HeapObjectHeader* parent_;
+};
+
+}  // namespace blink
+
+#endif  // MarkingVerifier_h
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 6cfc81f..47a8aecf 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -1293,7 +1293,7 @@
       MarkPhasePrologue(stack_state, gc_type, reason);
       MarkPhaseVisitRoots();
       CHECK(MarkPhaseAdvanceMarking(std::numeric_limits<double>::infinity()));
-      MarkPhaseEpilogue();
+      MarkPhaseEpilogue(gc_type);
     }
   }
 
@@ -1399,12 +1399,16 @@
   return complete;
 }
 
-void ThreadState::MarkPhaseEpilogue() {
+void ThreadState::MarkPhaseEpilogue(BlinkGC::GCType gc_type) {
   VisitWeakPersistents(current_gc_data_.visitor.get());
   Heap().PostMarkingProcessing(current_gc_data_.visitor.get());
   Heap().WeakProcessing(current_gc_data_.visitor.get());
   Heap().DecommitCallbackStacks();
 
+#if BUILDFLAG(BLINK_HEAP_VERIFICATION)
+  VerifyMarking(gc_type);
+#endif  // BLINK_HEAP_VERIFICATION
+
   Heap().HeapStats().SetEstimatedMarkingTimePerByte(
       current_gc_data_.marked_object_size
           ? (current_gc_data_.marking_time_in_milliseconds / 1000 /
@@ -1436,6 +1440,15 @@
   gc_reason_histogram.Count(current_gc_data_.reason);
 }
 
+void ThreadState::VerifyMarking(BlinkGC::GCType gc_type) {
+  // Marking for snapshot does not clear unreachable weak fields prohibiting
+  // verification of markbits as we leave behind non-marked non-cleared weak
+  // fields.
+  if (gc_type == BlinkGC::kTakeSnapshot)
+    return;
+  Heap().VerifyMarking();
+}
+
 void ThreadState::CollectAllGarbage() {
   // We need to run multiple GCs to collect a chain of persistent handles.
   size_t previous_live_objects = 0;
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h
index 723d16f..ff07726 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.h
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
@@ -296,7 +296,9 @@
                          BlinkGC::GCReason);
   void MarkPhaseVisitRoots();
   bool MarkPhaseAdvanceMarking(double deadline_seconds);
-  void MarkPhaseEpilogue();
+  void MarkPhaseEpilogue(BlinkGC::GCType);
+  void VerifyMarking(BlinkGC::GCType);
+
   void CompleteSweep();
   void PreSweep(BlinkGC::GCType);
   void PostSweep();
diff --git a/third_party/WebKit/Source/platform/loader/BUILD.gn b/third_party/WebKit/Source/platform/loader/BUILD.gn
index cad85e75d..9335857 100644
--- a/third_party/WebKit/Source/platform/loader/BUILD.gn
+++ b/third_party/WebKit/Source/platform/loader/BUILD.gn
@@ -153,6 +153,7 @@
   public_deps = [
     "//net",
     "//skia",
+    "//third_party/WebKit/Source/platform:platform",
     "//third_party/WebKit/Source/platform/blob:generator",
     "//third_party/WebKit/public:blink_headers",
     "//third_party/icu",
diff --git a/third_party/WebKit/Source/platform/loader/OWNERS b/third_party/WebKit/Source/platform/loader/OWNERS
index 5652ff8..fa3423b 100644
--- a/third_party/WebKit/Source/platform/loader/OWNERS
+++ b/third_party/WebKit/Source/platform/loader/OWNERS
@@ -1,6 +1,5 @@
 japhet@chromium.org
 mkwst@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 yoav@yoav.ws
 
diff --git a/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.cpp b/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.cpp
index 4f3fe257..d16fd9bb 100644
--- a/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.cpp
+++ b/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.cpp
@@ -6,7 +6,6 @@
 
 #include "platform/Crypto.h"
 #include "platform/loader/fetch/Resource.h"
-#include "platform/runtime_enabled_features.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
 #include "platform/wtf/ASCIICType.h"
@@ -72,26 +71,6 @@
 }
 
 bool SubresourceIntegrity::CheckSubresourceIntegrity(
-    const String& integrity_attribute,
-    const char* content,
-    size_t size,
-    const KURL& resource_url,
-    const Resource& resource,
-    ReportInfo& report_info) {
-  if (integrity_attribute.IsEmpty())
-    return true;
-
-  IntegrityMetadataSet metadata_set;
-  IntegrityParseResult integrity_parse_result =
-      ParseIntegrityAttribute(integrity_attribute, metadata_set, &report_info);
-  if (integrity_parse_result != kIntegrityParseValidResult)
-    return true;
-
-  return CheckSubresourceIntegrity(metadata_set, content, size, resource_url,
-                                   resource, report_info);
-}
-
-bool SubresourceIntegrity::CheckSubresourceIntegrity(
     const IntegrityMetadataSet& metadata_set,
     const char* content,
     size_t size,
@@ -117,6 +96,7 @@
 
 bool SubresourceIntegrity::CheckSubresourceIntegrity(
     const String& integrity_metadata,
+    IntegrityFeatures features,
     const char* content,
     size_t size,
     const KURL& resource_url,
@@ -125,8 +105,8 @@
     return true;
 
   IntegrityMetadataSet metadata_set;
-  IntegrityParseResult integrity_parse_result =
-      ParseIntegrityAttribute(integrity_metadata, metadata_set, &report_info);
+  IntegrityParseResult integrity_parse_result = ParseIntegrityAttribute(
+      integrity_metadata, features, metadata_set, &report_info);
   if (integrity_parse_result != kIntegrityParseValidResult)
     return true;
   // TODO(vogelheim): crbug.com/753349, figure out how deal with Ed25519
@@ -324,6 +304,7 @@
 SubresourceIntegrity::AlgorithmParseResult
 SubresourceIntegrity::ParseAttributeAlgorithm(const UChar*& begin,
                                               const UChar* end,
+                                              IntegrityFeatures features,
                                               IntegrityAlgorithm& algorithm) {
   static const AlgorithmPrefixPair kPrefixes[] = {
       {"sha256", IntegrityAlgorithm::kSha256},
@@ -334,8 +315,11 @@
       {"sha-512", IntegrityAlgorithm::kSha512},
       {"ed25519", IntegrityAlgorithm::kEd25519}};
 
+  // The last algorithm prefix is the ed25519 signature algorithm, which should
+  // only be enabled if kSignatures is requested. We'll implement this by
+  // adjusting the last_prefix index into the array.
   size_t last_prefix = WTF_ARRAY_LENGTH(kPrefixes);
-  if (!RuntimeEnabledFeatures::SignatureBasedIntegrityEnabled())
+  if (features != IntegrityFeatures::kSignatures)
     last_prefix--;
 
   return ParseAlgorithmPrefix(begin, end, kPrefixes, last_prefix, algorithm);
@@ -404,22 +388,27 @@
 SubresourceIntegrity::IntegrityParseResult
 SubresourceIntegrity::ParseIntegrityAttribute(
     const WTF::String& attribute,
+    IntegrityFeatures features,
     IntegrityMetadataSet& metadata_set) {
-  return ParseIntegrityAttribute(attribute, metadata_set, nullptr);
+  return ParseIntegrityAttribute(attribute, features, metadata_set, nullptr);
 }
 
 SubresourceIntegrity::IntegrityParseResult
 SubresourceIntegrity::ParseIntegrityAttribute(
     const WTF::String& attribute,
+    IntegrityFeatures features,
     IntegrityMetadataSet& metadata_set,
     ReportInfo* report_info) {
+  // We expect a "clean" metadata_set, since metadata_set should only be filled
+  // once.
+  DCHECK(metadata_set.IsEmpty());
+
   Vector<UChar> characters;
   attribute.StripWhiteSpace().AppendTo(characters);
   const UChar* position = characters.data();
   const UChar* end = characters.end();
   const UChar* current_integrity_end;
 
-  metadata_set.clear();
   bool error = false;
 
   // The integrity attribute takes the form:
@@ -438,8 +427,8 @@
     // still be loaded) because strong hash algorithms should be used
     // without fear of breaking older user agents that don't support
     // them.
-    AlgorithmParseResult parse_result =
-        ParseAttributeAlgorithm(position, current_integrity_end, algorithm);
+    AlgorithmParseResult parse_result = ParseAttributeAlgorithm(
+        position, current_integrity_end, features, algorithm);
     if (parse_result == kAlgorithmUnknown) {
       // Unknown hash algorithms are treated as if they're not present,
       // and thus are not marked as an error, they're just skipped.
diff --git a/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.h b/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.h
index 353c9244..044bba4 100644
--- a/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.h
+++ b/third_party/WebKit/Source/platform/loader/SubresourceIntegrity.h
@@ -51,15 +51,15 @@
     kIntegrityParseNoValidResult
   };
 
-  // The versions with the IntegrityMetadataSet passed as the first argument
-  // assume that the integrity attribute has already been parsed, and the
+  // Determine which SRI features to support when parsing integrity attributes.
+  enum class IntegrityFeatures {
+    kDefault,    // Default: All sha* hash codes.
+    kSignatures  // Also support the ed25519 signature scheme.
+  };
+
+  // The version with the IntegrityMetadataSet passed as the first argument
+  // assumes that the integrity attribute has already been parsed, and the
   // IntegrityMetadataSet represents the result of that parsing.
-  static bool CheckSubresourceIntegrity(const String& integrity_attribute,
-                                        const char* content,
-                                        size_t content_size,
-                                        const KURL& resource_url,
-                                        const Resource&,
-                                        ReportInfo&);
   static bool CheckSubresourceIntegrity(const IntegrityMetadataSet&,
                                         const char* content,
                                         size_t content_size,
@@ -67,17 +67,21 @@
                                         const Resource&,
                                         ReportInfo&);
   static bool CheckSubresourceIntegrity(const String&,
+                                        IntegrityFeatures,
                                         const char* content,
                                         size_t content_size,
                                         const KURL& resource_url,
                                         ReportInfo&);
 
+  // The IntegrityMetadataSet arguments are out parameters which contain the
   // set of all valid, parsed metadata from |attribute|.
   static IntegrityParseResult ParseIntegrityAttribute(
       const WTF::String& attribute,
+      IntegrityFeatures,
       IntegrityMetadataSet&);
   static IntegrityParseResult ParseIntegrityAttribute(
       const WTF::String& attribute,
+      IntegrityFeatures,
       IntegrityMetadataSet&,
       ReportInfo*);
 
@@ -125,6 +129,7 @@
 
   static AlgorithmParseResult ParseAttributeAlgorithm(const UChar*& begin,
                                                       const UChar* end,
+                                                      IntegrityFeatures,
                                                       IntegrityAlgorithm&);
   static AlgorithmParseResult ParseIntegrityHeaderAlgorithm(
       const UChar*& begin,
diff --git a/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp b/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp
index 873d7d2..f1abfc77 100644
--- a/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp
+++ b/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp
@@ -15,6 +15,7 @@
 #include "platform/loader/fetch/ResourceResponse.h"
 #include "platform/loader/testing/CryptoTestingPlatformSupport.h"
 #include "platform/loader/testing/MockFetchContext.h"
+#include "platform/runtime_enabled_features.h"
 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
@@ -91,6 +92,12 @@
         MockFetchContext::Create(MockFetchContext::kShouldLoadNewResource);
   }
 
+  SubresourceIntegrity::IntegrityFeatures Features() const {
+    return RuntimeEnabledFeatures::SignatureBasedIntegrityEnabledByRuntimeFlag()
+               ? SubresourceIntegrity::IntegrityFeatures::kSignatures
+               : SubresourceIntegrity::IntegrityFeatures::kDefault;
+  }
+
   void ExpectAlgorithm(const String& text,
                        IntegrityAlgorithm expected_algorithm) {
     Vector<UChar> characters;
@@ -100,8 +107,8 @@
     IntegrityAlgorithm algorithm;
 
     EXPECT_EQ(SubresourceIntegrity::kAlgorithmValid,
-              SubresourceIntegrity::ParseAttributeAlgorithm(position, end,
-                                                            algorithm));
+              SubresourceIntegrity::ParseAttributeAlgorithm(
+                  position, end, Features(), algorithm));
     EXPECT_EQ(expected_algorithm, algorithm);
     EXPECT_EQ(end, position);
   }
@@ -117,7 +124,7 @@
     IntegrityAlgorithm algorithm;
 
     EXPECT_EQ(expected_result, SubresourceIntegrity::ParseAttributeAlgorithm(
-                                   position, end, algorithm));
+                                   position, end, Features(), algorithm));
     EXPECT_EQ(begin, position);
   }
 
@@ -149,8 +156,8 @@
     IntegrityMetadataSet metadata_set;
 
     EXPECT_EQ(SubresourceIntegrity::kIntegrityParseValidResult,
-              SubresourceIntegrity::ParseIntegrityAttribute(integrity_attribute,
-                                                            metadata_set));
+              SubresourceIntegrity::ParseIntegrityAttribute(
+                  integrity_attribute, Features(), metadata_set));
     EXPECT_EQ(1u, metadata_set.size());
     if (metadata_set.size() > 0) {
       IntegrityMetadata metadata = *metadata_set.begin();
@@ -169,8 +176,8 @@
     }
     IntegrityMetadataSet metadata_set;
     EXPECT_EQ(SubresourceIntegrity::kIntegrityParseValidResult,
-              SubresourceIntegrity::ParseIntegrityAttribute(integrity_attribute,
-                                                            metadata_set));
+              SubresourceIntegrity::ParseIntegrityAttribute(
+                  integrity_attribute, Features(), metadata_set));
     EXPECT_TRUE(
         IntegrityMetadata::SetsEqual(expected_metadata_set, metadata_set));
   }
@@ -179,16 +186,16 @@
     IntegrityMetadataSet metadata_set;
 
     EXPECT_EQ(SubresourceIntegrity::kIntegrityParseNoValidResult,
-              SubresourceIntegrity::ParseIntegrityAttribute(integrity_attribute,
-                                                            metadata_set));
+              SubresourceIntegrity::ParseIntegrityAttribute(
+                  integrity_attribute, Features(), metadata_set));
   }
 
   void ExpectEmptyParseResult(const char* integrity_attribute) {
     IntegrityMetadataSet metadata_set;
 
     EXPECT_EQ(SubresourceIntegrity::kIntegrityParseValidResult,
-              SubresourceIntegrity::ParseIntegrityAttribute(integrity_attribute,
-                                                            metadata_set));
+              SubresourceIntegrity::ParseIntegrityAttribute(
+                  integrity_attribute, Features(), metadata_set));
     EXPECT_EQ(0u, metadata_set.size());
   }
 
@@ -219,14 +226,18 @@
                               Expectation expectation) {
     context->SetSecurityOrigin(SecurityOrigin::Create(test.origin));
 
+    IntegrityMetadataSet metadata_set;
+    EXPECT_EQ(SubresourceIntegrity::kIntegrityParseValidResult,
+              SubresourceIntegrity::ParseIntegrityAttribute(
+                  String(integrity), Features(), metadata_set));
+
     SubresourceIntegrity::ReportInfo report_info;
-    EXPECT_EQ(
-        expectation == kIntegritySuccess,
-        SubresourceIntegrity::CheckSubresourceIntegrity(
-            String(integrity), kBasicScript, strlen(kBasicScript), test.target,
-            *CreateTestResource(test.target, test.allow_origin_url,
-                                test.service_worker),
-            report_info));
+    EXPECT_EQ(expectation == kIntegritySuccess,
+              SubresourceIntegrity::CheckSubresourceIntegrity(
+                  metadata_set, kBasicScript, strlen(kBasicScript), test.target,
+                  *CreateTestResource(test.target, test.allow_origin_url,
+                                      test.service_worker),
+                  report_info));
   }
 
   Resource* CreateTestResource(const KURL& url,
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CachedMetadataHandler.h b/third_party/WebKit/Source/platform/loader/fetch/CachedMetadataHandler.h
index 7a343eed..44f2f2f 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/CachedMetadataHandler.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/CachedMetadataHandler.h
@@ -23,19 +23,10 @@
   };
   virtual ~CachedMetadataHandler() = default;
   virtual void Trace(blink::Visitor* visitor) {}
-  // Caches the given metadata in association with this resource and suggests
-  // that the platform persist it. The dataTypeID is a pseudo-randomly chosen
-  // identifier that is used to distinguish data generated by the caller.
-  virtual void SetCachedMetadata(uint32_t data_type_id,
-                                 const char*,
-                                 size_t,
-                                 CacheType = kSendToPlatform) = 0;
+
   // Reset existing metadata, to allow setting new data.
   virtual void ClearCachedMetadata(CacheType = kCacheLocally) = 0;
-  // Returns cached metadata of the given type associated with this resource.
-  // This cached metadata can be pruned at any time.
-  virtual scoped_refptr<CachedMetadata> GetCachedMetadata(
-      uint32_t data_type_id) const = 0;
+
   // Returns the encoding to which the cache is specific.
   virtual String Encoding() const = 0;
 
@@ -44,6 +35,27 @@
  protected:
   CachedMetadataHandler() = default;
 };
+
+// A CachedMetadataHandler which stores one piece of metadata.
+class SingleCachedMetadataHandler : public CachedMetadataHandler {
+ public:
+  // Caches the given metadata in association with this resource and suggests
+  // that the platform persist it. The dataTypeID is a pseudo-randomly chosen
+  // identifier that is used to distinguish data generated by the caller.
+  virtual void SetCachedMetadata(uint32_t data_type_id,
+                                 const char*,
+                                 size_t,
+                                 CacheType = kSendToPlatform) = 0;
+
+  // Returns cached metadata of the given type associated with this resource.
+  // This cached metadata can be pruned at any time.
+  virtual scoped_refptr<CachedMetadata> GetCachedMetadata(
+      uint32_t data_type_id) const = 0;
+
+ protected:
+  SingleCachedMetadataHandler() = default;
+};
+
 }  // namespace blink
 
 #endif  // CachedMetadataHandler_h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
index d22a49e..ab5f802 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
@@ -114,170 +114,72 @@
   return true;
 }
 
-// CachedMetadataHandlerImpl should be created when a response is received,
-// and can be used independently from Resource.
-// - It doesn't have any references to Resource. Necessary data are captured
-//   from Resource when the handler is created.
-// - It is not affected by Resource's revalidation on MemoryCache.
-//   The validity of the handler is solely checked by |response_url_| and
-//   |response_time_| (not by Resource) by the browser process, and the cached
-//   metadata written to the handler is rejected if e.g. the disk cache entry
-//   has been updated and the handler refers to an older response.
-class Resource::CachedMetadataHandlerImpl : public CachedMetadataHandler {
+// This is a CachedMetadataSender implementation for normal responses.
+class CachedMetadataSenderImpl : public CachedMetadataSender {
  public:
-  static Resource::CachedMetadataHandlerImpl* Create(const Resource* resource) {
-    return new CachedMetadataHandlerImpl(resource);
-  }
-  ~CachedMetadataHandlerImpl() override = default;
-  void Trace(blink::Visitor*) override;
-  void SetCachedMetadata(uint32_t, const char*, size_t, CacheType) override;
-  void ClearCachedMetadata(CacheType) override;
-  scoped_refptr<CachedMetadata> GetCachedMetadata(uint32_t) const override;
+  CachedMetadataSenderImpl(const Resource*);
+  ~CachedMetadataSenderImpl() override = default;
 
-  // This returns the encoding at the time of ResponseReceived().
-  // Therefore this does NOT reflect encoding detection from body contents,
-  // but the final encoding after the encoding detection can be determined
-  // uniquely from Encoding(), provided the body content is the same,
-  // as we can assume the encoding detection will results in the same final
-  // encoding.
-  // TODO(hiroshige): Make this semantics cleaner.
-  String Encoding() const override { return String(encoding_.GetName()); }
+  void Send(const char*, size_t) override;
+  bool IsServedFromCacheStorage() override { return false; }
 
-  bool IsServedFromCacheStorage() const override {
-    return !cache_storage_cache_name_.IsNull();
-  }
+ private:
+  const KURL response_url_;
+  const Time response_time_;
+};
 
-  // Sets the serialized metadata retrieved from the platform's cache.
-  void SetSerializedCachedMetadata(const char*, size_t);
+CachedMetadataSenderImpl::CachedMetadataSenderImpl(const Resource* resource)
+    : response_url_(resource->GetResponse().Url()),
+      response_time_(resource->GetResponse().ResponseTime()) {
+  DCHECK(resource->GetResponse().CacheStorageCacheName().IsNull());
+}
 
- protected:
-  explicit CachedMetadataHandlerImpl(const Resource*);
-  virtual void SendToPlatform();
+void CachedMetadataSenderImpl::Send(const char* data, size_t size) {
+  Platform::Current()->CacheMetadata(response_url_, response_time_, data, size);
+}
 
-  scoped_refptr<CachedMetadata> cached_metadata_;
+// This is a CachedMetadataSender implementation that does nothing.
+class NullCachedMetadataSender : public CachedMetadataSender {
+ public:
+  NullCachedMetadataSender() = default;
+  ~NullCachedMetadataSender() override = default;
 
+  void Send(const char*, size_t) override {}
+  bool IsServedFromCacheStorage() override { return false; }
+};
+
+// This is a CachedMetadataSender implementation for responses that are served
+// by a ServiceWorker from cache storage.
+class ServiceWorkerCachedMetadataSender : public CachedMetadataSender {
+ public:
+  ServiceWorkerCachedMetadataSender(const Resource*, const SecurityOrigin*);
+  ~ServiceWorkerCachedMetadataSender() override = default;
+
+  void Send(const char*, size_t) override;
+  bool IsServedFromCacheStorage() override { return true; }
+
+ private:
   const KURL response_url_;
   const Time response_time_;
   const String cache_storage_cache_name_;
-
- private:
-  const WTF::TextEncoding encoding_;
+  scoped_refptr<const SecurityOrigin> security_origin_;
 };
 
-Resource::CachedMetadataHandlerImpl::CachedMetadataHandlerImpl(
-    const Resource* resource)
+ServiceWorkerCachedMetadataSender::ServiceWorkerCachedMetadataSender(
+    const Resource* resource,
+    const SecurityOrigin* security_origin)
     : response_url_(resource->GetResponse().Url()),
       response_time_(resource->GetResponse().ResponseTime()),
       cache_storage_cache_name_(
           resource->GetResponse().CacheStorageCacheName()),
-      encoding_(resource->Encoding()) {}
-
-void Resource::CachedMetadataHandlerImpl::Trace(blink::Visitor* visitor) {
-  CachedMetadataHandler::Trace(visitor);
+      security_origin_(security_origin) {
+  DCHECK(!cache_storage_cache_name_.IsNull());
 }
 
-void Resource::CachedMetadataHandlerImpl::SetCachedMetadata(
-    uint32_t data_type_id,
-    const char* data,
-    size_t size,
-    CachedMetadataHandler::CacheType cache_type) {
-  // Currently, only one type of cached metadata per resource is supported. If
-  // the need arises for multiple types of metadata per resource this could be
-  // enhanced to store types of metadata in a map.
-  DCHECK(!cached_metadata_);
-  cached_metadata_ = CachedMetadata::Create(data_type_id, data, size);
-  if (cache_type == CachedMetadataHandler::kSendToPlatform)
-    SendToPlatform();
-}
-
-void Resource::CachedMetadataHandlerImpl::ClearCachedMetadata(
-    CachedMetadataHandler::CacheType cache_type) {
-  cached_metadata_ = nullptr;
-  if (cache_type == CachedMetadataHandler::kSendToPlatform)
-    SendToPlatform();
-}
-
-scoped_refptr<CachedMetadata>
-Resource::CachedMetadataHandlerImpl::GetCachedMetadata(
-    uint32_t data_type_id) const {
-  if (!cached_metadata_ || cached_metadata_->DataTypeID() != data_type_id)
-    return nullptr;
-  return cached_metadata_;
-}
-
-void Resource::CachedMetadataHandlerImpl::SetSerializedCachedMetadata(
-    const char* data,
-    size_t size) {
-  // We only expect to receive cached metadata from the platform once. If this
-  // triggers, it indicates an efficiency problem which is most likely
-  // unexpected in code designed to improve performance.
-  DCHECK(!cached_metadata_);
-  cached_metadata_ = CachedMetadata::CreateFromSerializedData(data, size);
-}
-
-void Resource::CachedMetadataHandlerImpl::SendToPlatform() {
-  if (cached_metadata_) {
-    const Vector<char>& serialized_data = cached_metadata_->SerializedData();
-    Platform::Current()->CacheMetadata(response_url_, response_time_,
-                                       serialized_data.data(),
-                                       serialized_data.size());
-  } else {
-    Platform::Current()->CacheMetadata(response_url_, response_time_, nullptr,
-                                       0);
-  }
-}
-
-class Resource::ServiceWorkerResponseCachedMetadataHandler final
-    : public Resource::CachedMetadataHandlerImpl {
- public:
-  static Resource::CachedMetadataHandlerImpl* Create(
-      const Resource* resource,
-      const SecurityOrigin* security_origin) {
-    return new ServiceWorkerResponseCachedMetadataHandler(resource,
-                                                          security_origin);
-  }
-  ~ServiceWorkerResponseCachedMetadataHandler() override = default;
-  void Trace(blink::Visitor*) override;
-
- protected:
-  void SendToPlatform() override;
-
- private:
-  explicit ServiceWorkerResponseCachedMetadataHandler(const Resource*,
-                                                      const SecurityOrigin*);
-  scoped_refptr<const SecurityOrigin> security_origin_;
-};
-
-Resource::ServiceWorkerResponseCachedMetadataHandler::
-    ServiceWorkerResponseCachedMetadataHandler(
-        const Resource* resource,
-        const SecurityOrigin* security_origin)
-    : CachedMetadataHandlerImpl(resource), security_origin_(security_origin) {}
-
-void Resource::ServiceWorkerResponseCachedMetadataHandler::Trace(
-    blink::Visitor* visitor) {
-  CachedMetadataHandlerImpl::Trace(visitor);
-}
-
-void Resource::ServiceWorkerResponseCachedMetadataHandler::SendToPlatform() {
-  // We don't support sending the metadata to the platform when the response was
-  // directly fetched via a ServiceWorker (eg:
-  // FetchEvent.respondWith(fetch(FetchEvent.request))) to prevent an attacker's
-  // Service Worker from poisoning the metadata cache of HTTPCache.
-  if (cache_storage_cache_name_.IsNull())
-    return;
-
-  if (cached_metadata_) {
-    const Vector<char>& serialized_data = cached_metadata_->SerializedData();
-    Platform::Current()->CacheMetadataInCacheStorage(
-        response_url_, response_time_, serialized_data.data(),
-        serialized_data.size(), WebSecurityOrigin(security_origin_),
-        cache_storage_cache_name_);
-  } else {
-    Platform::Current()->CacheMetadataInCacheStorage(
-        response_url_, response_time_, nullptr, 0,
-        WebSecurityOrigin(security_origin_), cache_storage_cache_name_);
-  }
+void ServiceWorkerCachedMetadataSender::Send(const char* data, size_t size) {
+  Platform::Current()->CacheMetadataInCacheStorage(
+      response_url_, response_time_, data, size,
+      WebSecurityOrigin(security_origin_), cache_storage_cache_name_);
 }
 
 Resource::Resource(const ResourceRequest& request,
@@ -598,12 +500,19 @@
     return;
   }
 
+  cache_handler_ = CreateCachedMetadataHandler(CreateCachedMetadataSender());
+}
+
+std::unique_ptr<CachedMetadataSender> Resource::CreateCachedMetadataSender()
+    const {
   if (GetResponse().WasFetchedViaServiceWorker()) {
-    cache_handler_ = ServiceWorkerResponseCachedMetadataHandler::Create(
+    if (GetResponse().CacheStorageCacheName().IsNull()) {
+      return std::make_unique<NullCachedMetadataSender>();
+    }
+    return std::make_unique<ServiceWorkerCachedMetadataSender>(
         this, fetcher_security_origin_.get());
-  } else {
-    cache_handler_ = CachedMetadataHandlerImpl::Create(this);
   }
+  return std::make_unique<CachedMetadataSenderImpl>(this);
 }
 
 void Resource::ResponseReceived(const ResourceResponse& response,
@@ -634,12 +543,6 @@
 void Resource::SetSerializedCachedMetadata(const char* data, size_t size) {
   DCHECK(!is_revalidating_);
   DCHECK(!GetResponse().IsNull());
-  if (cache_handler_)
-    cache_handler_->SetSerializedCachedMetadata(data, size);
-}
-
-CachedMetadataHandler* Resource::CacheHandler() {
-  return cache_handler_.Get();
 }
 
 String Resource::ReasonNotDeletable() const {
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
index 6d77562..3fae6ad 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
@@ -65,6 +65,18 @@
 class ResourceLoader;
 class SecurityOrigin;
 
+// A callback for sending the serialized data of cached metadata back to the
+// platform.
+class CachedMetadataSender {
+ public:
+  virtual ~CachedMetadataSender() = default;
+  virtual void Send(const char*, size_t) = 0;
+
+  // IsServedFromCacheStorage is used to alter caching strategy to be more
+  // aggressive. See ScriptController.cpp CacheOptions() for an example.
+  virtual bool IsServedFromCacheStorage() = 0;
+};
+
 // A resource that is held in the cache. Classes who want to use this object
 // should derive from ResourceClient, to get the function calls in case the
 // requested data has arrived. This class also does the actual communication
@@ -235,11 +247,10 @@
   virtual void ReportResourceTimingToClients(const ResourceTimingInfo&) {}
 
   // Sets the serialized metadata retrieved from the platform's cache.
+  // Subclasses of Resource that support cached metadata should override this
+  // method with one that fills the current CachedMetadataHandler.
   virtual void SetSerializedCachedMetadata(const char*, size_t);
 
-  // This may return nullptr when the resource isn't cacheable.
-  CachedMetadataHandler* CacheHandler();
-
   AtomicString HttpContentType() const;
 
   bool WasCanceled() const { return error_ && error_->IsCancellation(); }
@@ -427,14 +438,23 @@
 
   virtual void SetEncoding(const String&) {}
 
+  // Create a handler for the cached metadata of this resource. Subclasses of
+  // Resource that support cached metadata should override this method with one
+  // that creates an appropriate CachedMetadataHandler implementation, and
+  // override SetSerializedCachedMetadata with an implementation that fills the
+  // cache handler.
+  virtual CachedMetadataHandler* CreateCachedMetadataHandler(
+      std::unique_ptr<CachedMetadataSender> send_callback) {
+    return nullptr;
+  }
+
+  CachedMetadataHandler* CacheHandler() { return cache_handler_.Get(); }
+
  private:
   // To allow access to SetCORSStatus
   friend class ResourceLoader;
   friend class SubresourceIntegrityTest;
 
-  class CachedMetadataHandlerImpl;
-  class ServiceWorkerResponseCachedMetadataHandler;
-
   void RevalidationSucceeded(const ResourceResponse&);
   void RevalidationFailed();
 
@@ -452,6 +472,10 @@
   void CheckResourceIntegrity();
   void TriggerNotificationForFinishObservers(base::SingleThreadTaskRunner*);
 
+  // Helper for creating the send callback function for the cached metadata
+  // handler.
+  std::unique_ptr<CachedMetadataSender> CreateCachedMetadataSender() const;
+
   Type type_;
   ResourceStatus status_;
 
@@ -475,7 +499,7 @@
 
   CORSStatus cors_status_;
 
-  Member<CachedMetadataHandlerImpl> cache_handler_;
+  Member<CachedMetadataHandler> cache_handler_;
 
   // Holds the SecurityOrigin obtained from the associated FetchContext.
   // ResourceFetcher sets this at the beginning of loading. The override by
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp
index 9c2f77e4..e5a0a4163 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp
@@ -6,7 +6,6 @@
 
 #include "platform/SharedBuffer.h"
 #include "platform/loader/fetch/MemoryCache.h"
-#include "platform/loader/fetch/RawResource.h"
 #include "platform/loader/fetch/ResourceRequest.h"
 #include "platform/loader/fetch/ResourceResponse.h"
 #include "platform/loader/testing/MockResource.h"
@@ -46,12 +45,9 @@
 
 void CreateTestResourceAndSetCachedMetadata(const ResourceResponse& response) {
   const char kTestData[] = "test data";
-  Resource* resource =
-      RawResource::CreateForTest(response.Url(), Resource::kRaw);
+  MockResource* resource = MockResource::Create(response.Url());
   resource->SetResponse(response);
-  resource->CacheHandler()->SetCachedMetadata(
-      100, kTestData, sizeof(kTestData),
-      CachedMetadataHandler::kSendToPlatform);
+  resource->SendCachedMetadata(kTestData, sizeof(kTestData));
   return;
 }
 
@@ -79,7 +75,7 @@
   KURL url("http://127.0.0.1:8000/foo.html");
   ResourceResponse response(url);
   response.SetHTTPStatusCode(200);
-  Resource* resource = RawResource::CreateForTest(url, Resource::kRaw);
+  MockResource* resource = MockResource::Create(url);
   resource->ResponseReceived(response, nullptr);
   resource->FinishForTest();
 
@@ -98,7 +94,7 @@
   ResourceResponse response(url);
   response.SetHTTPStatusCode(200);
 
-  Resource* resource = RawResource::CreateForTest(url, Resource::kRaw);
+  MockResource* resource = MockResource::Create(url);
   resource->ResponseReceived(response, nullptr);
   resource->FinishForTest();
 
@@ -124,7 +120,7 @@
   ResourceRequest old_request(url);
   old_request.SetHTTPHeaderField(HTTPNames::User_Agent, "something");
   old_request.SetHTTPHeaderField(HTTPNames::Referer, "http://foo.com");
-  resource = RawResource::CreateForTest(old_request, Resource::kRaw);
+  resource = MockResource::Create(old_request);
   resource->ResponseReceived(response, nullptr);
   resource->FinishForTest();
 
@@ -152,7 +148,7 @@
   ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
       platform_;
   const KURL url("http://test.example.com/");
-  Resource* resource = MockResource::Create(ResourceRequest(url));
+  MockResource* resource = MockResource::Create(ResourceRequest(url));
   ResourceResponse response(url);
   response.SetHTTPStatusCode(200);
   resource->ResponseReceived(response, nullptr);
@@ -161,7 +157,7 @@
   resource->FinishForTest();
   GetMemoryCache()->Add(resource);
 
-  CachedMetadataHandler* original_cache_handler = resource->CacheHandler();
+  MockCacheHandler* original_cache_handler = resource->CacheHandler();
   EXPECT_TRUE(original_cache_handler);
 
   // Simulate revalidation start.
@@ -199,7 +195,7 @@
   ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
       platform_;
   const KURL url("http://test.example.com/");
-  Resource* resource = MockResource::Create(ResourceRequest(url));
+  MockResource* resource = MockResource::Create(ResourceRequest(url));
   ResourceResponse response(url);
   response.SetHTTPStatusCode(200);
   resource->ResponseReceived(response, nullptr);
@@ -208,7 +204,7 @@
   resource->FinishForTest();
   GetMemoryCache()->Add(resource);
 
-  CachedMetadataHandler* original_cache_handler = resource->CacheHandler();
+  MockCacheHandler* original_cache_handler = resource->CacheHandler();
   EXPECT_TRUE(original_cache_handler);
 
   // Simulate a successful revalidation.
@@ -348,7 +344,7 @@
   const KURL url("http://test.example.com/1");
   const KURL redirect_target_url("http://test.example.com/2");
 
-  Resource* resource = MockResource::Create(ResourceRequest(url));
+  MockResource* resource = MockResource::Create(ResourceRequest(url));
   ResourceResponse response(url);
   response.SetHTTPStatusCode(200);
   resource->ResponseReceived(response, nullptr);
@@ -361,7 +357,7 @@
   EXPECT_EQ(url, resource->GetResourceRequest().Url());
   EXPECT_EQ(url, resource->LastResourceRequest().Url());
 
-  CachedMetadataHandler* original_cache_handler = resource->CacheHandler();
+  MockCacheHandler* original_cache_handler = resource->CacheHandler();
   EXPECT_TRUE(original_cache_handler);
 
   // Simulate a revalidation.
diff --git a/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp b/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp
index 8ce3cf7..f450925 100644
--- a/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp
+++ b/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp
@@ -39,8 +39,65 @@
   return new MockResource(request, options);
 }
 
+MockResource* MockResource::Create(const KURL& url) {
+  ResourceRequest request(url);
+  return Create(request);
+}
+
 MockResource::MockResource(const ResourceRequest& request,
                            const ResourceLoaderOptions& options)
     : Resource(request, Resource::kMock, options) {}
 
+CachedMetadataHandler* MockResource::CreateCachedMetadataHandler(
+    std::unique_ptr<CachedMetadataSender> send_callback) {
+  return new MockCacheHandler(std::move(send_callback));
+}
+
+void MockResource::SetSerializedCachedMetadata(const char* data, size_t size) {
+  Resource::SetSerializedCachedMetadata(data, size);
+  MockCacheHandler* cache_handler =
+      static_cast<MockCacheHandler*>(Resource::CacheHandler());
+  if (cache_handler) {
+    cache_handler->Set(data, size);
+  }
+}
+
+void MockResource::SendCachedMetadata(const char* data, size_t size) {
+  MockCacheHandler* cache_handler =
+      static_cast<MockCacheHandler*>(Resource::CacheHandler());
+  if (cache_handler) {
+    cache_handler->Set(data, size);
+    cache_handler->Send();
+  }
+}
+
+MockCacheHandler* MockResource::CacheHandler() {
+  return static_cast<MockCacheHandler*>(Resource::CacheHandler());
+}
+
+MockCacheHandler::MockCacheHandler(
+    std::unique_ptr<CachedMetadataSender> send_callback)
+    : send_callback_(std::move(send_callback)) {}
+
+void MockCacheHandler::Set(const char* data, size_t size) {
+  data_.emplace();
+  data_->Append(data, size);
+}
+
+void MockCacheHandler::ClearCachedMetadata(
+    CachedMetadataHandler::CacheType cache_type) {
+  if (cache_type == CachedMetadataHandler::kSendToPlatform) {
+    Send();
+  }
+  data_.reset();
+}
+
+void MockCacheHandler::Send() {
+  if (data_) {
+    send_callback_->Send(data_->data(), data_->size());
+  } else {
+    send_callback_->Send(nullptr, 0);
+  }
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/loader/testing/MockResource.h b/third_party/WebKit/Source/platform/loader/testing/MockResource.h
index eca8ba9..db20eebc 100644
--- a/third_party/WebKit/Source/platform/loader/testing/MockResource.h
+++ b/third_party/WebKit/Source/platform/loader/testing/MockResource.h
@@ -7,6 +7,7 @@
 
 #include "platform/heap/Handle.h"
 #include "platform/loader/fetch/Resource.h"
+#include "platform/wtf/RefCounted.h"
 
 namespace blink {
 
@@ -14,6 +15,24 @@
 class ResourceFetcher;
 struct ResourceLoaderOptions;
 
+// Mocked cache handler class used by MockResource to test the caching behaviour
+// of Resource.
+class MockCacheHandler : public CachedMetadataHandler {
+ public:
+  MockCacheHandler(std::unique_ptr<CachedMetadataSender> send_callback);
+
+  void Set(const char* data, size_t);
+  void ClearCachedMetadata(CachedMetadataHandler::CacheType) override;
+  void Send();
+
+  String Encoding() const override { return "mock encoding"; }
+  bool IsServedFromCacheStorage() const override { return false; }
+
+ private:
+  std::unique_ptr<CachedMetadataSender> send_callback_;
+  base::Optional<Vector<char>> data_;
+};
+
 // Mocked Resource sub-class for testing. MockResource class can pretend a type
 // of Resource sub-class in a simple way. You should not expect anything
 // complicated to emulate actual sub-resources, but you may be able to use this
@@ -24,7 +43,16 @@
                              ResourceFetcher*,
                              ResourceClient*);
   static MockResource* Create(const ResourceRequest&);
+  static MockResource* Create(const KURL&);
   MockResource(const ResourceRequest&, const ResourceLoaderOptions&);
+
+  CachedMetadataHandler* CreateCachedMetadataHandler(
+      std::unique_ptr<CachedMetadataSender> send_callback) override;
+  void SetSerializedCachedMetadata(const char*, size_t) override;
+
+  MockCacheHandler* CacheHandler();
+
+  void SendCachedMetadata(const char*, size_t);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
index b17e948d..f301592 100644
--- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5
+++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -230,6 +230,10 @@
       status: "stable",
     },
     {
+      name: "CSSFocusVisible",
+      status: "experimental",
+    },
+    {
       name: "CSSFontSizeAdjust",
       status: "experimental",
     },
@@ -931,6 +935,11 @@
       status: "stable",
     },
     {
+      name: "RtcPeerConnectionId",
+      origin_trial_feature_name: "RtcPeerConnectionId",
+      status: "experimental",
+    },
+    {
       name: "RTCUnifiedPlan",
       status: "experimental",
     },
@@ -1014,6 +1023,7 @@
     },
     {
       name: "SignatureBasedIntegrity",
+      origin_trial_feature_name: "SignatureBasedIntegrity",
       status: "experimental",
     },
     {
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
index cce6d0b..d7caae4 100644
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
@@ -109,6 +109,10 @@
 
 void MockWebRTCPeerConnectionHandler::Stop() {}
 
+WebString MockWebRTCPeerConnectionHandler::Id() const {
+  return WebString();
+}
+
 std::unique_ptr<WebRTCPeerConnectionHandler>
 TestingPlatformSupportWithWebRTC::CreateRTCPeerConnectionHandler(
     WebRTCPeerConnectionHandlerClient*,
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h
index 79bc630..764739d 100644
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h
@@ -43,6 +43,7 @@
       const WebString& label,
       const WebRTCDataChannelInit&) override;
   void Stop() override;
+  WebString Id() const override;
 };
 
 class TestingPlatformSupportWithWebRTC : public TestingPlatformSupport {
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/config/builders.json b/third_party/WebKit/Tools/Scripts/webkitpy/common/config/builders.json
index 734d528..5d012e3 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/config/builders.json
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/config/builders.json
@@ -74,7 +74,8 @@
     },
     "mac10.13_blink_rel": {
         "port_name": "mac-mac10.13",
-        "specifiers": ["Mac10.13", "Release"]
+        "specifiers": ["Mac10.13", "Release"],
+        "is_try_builder": true
     },
     "win7_blink_rel": {
         "port_name": "win-win7",
diff --git a/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h b/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
index 814f6412..75b0cab 100644
--- a/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
+++ b/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
@@ -102,6 +102,9 @@
   // track must have been set to null.
   virtual bool RemoveTrack(WebRTCRtpSender*) = 0;
   virtual void Stop() = 0;
+
+  // Origin Trial - RtcPeerConnectionId
+  virtual WebString Id() const = 0;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/fetch/OWNERS b/third_party/WebKit/public/platform/modules/fetch/OWNERS
index 983a316b..7a628a2 100644
--- a/third_party/WebKit/public/platform/modules/fetch/OWNERS
+++ b/third_party/WebKit/public/platform/modules/fetch/OWNERS
@@ -1,6 +1,5 @@
 hiroshige@chromium.org
 horo@chromium.org
-tyoshino@chromium.org
 yhirano@chromium.org
 
 per-file *.mojom=set noparent
diff --git a/third_party/WebKit/public/platform/modules/websockets/OWNERS b/third_party/WebKit/public/platform/modules/websockets/OWNERS
index 117f71a..d6fd3dac 100644
--- a/third_party/WebKit/public/platform/modules/websockets/OWNERS
+++ b/third_party/WebKit/public/platform/modules/websockets/OWNERS
@@ -1,5 +1,5 @@
-tyoshino@chromium.org
 yhirano@chromium.org
+ricea@chromium.org
 
 per-file *.mojom=set noparent
 per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/third_party/WebKit/public/platform/web_feature.mojom b/third_party/WebKit/public/platform/web_feature.mojom
index 8c9418e..a0f9bf38 100644
--- a/third_party/WebKit/public/platform/web_feature.mojom
+++ b/third_party/WebKit/public/platform/web_feature.mojom
@@ -1874,6 +1874,7 @@
   kV8RTCRtpSender_Dtmf_AttributeGetter = 2381,
   kRTCConstraintEnableDtlsSrtpTrue = 2382,
   kRTCConstraintEnableDtlsSrtpFalse = 2383,
+  kRtcPeerConnectionId = 2383,
 
   // Add new features immediately above this line. Don't change assigned
   // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/WebKit/public/web/WebElement.h b/third_party/WebKit/public/web/WebElement.h
index b6fd6fce..d2990bf 100644
--- a/third_party/WebKit/public/web/WebElement.h
+++ b/third_party/WebKit/public/web/WebElement.h
@@ -69,6 +69,15 @@
   WebString AttributeValue(unsigned index) const;
   unsigned AttributeCount() const;
 
+  // Returns true if this is an autonomous custom element, regardless of
+  // Custom Elements V0 or V1.
+  bool IsAutonomousCustomElement() const;
+
+  // Returns an author ShadowRoot attached to this element, regardless
+  // of V0, V1 open, or V1 closed.  This returns null WebNode if this
+  // element has no ShadowRoot or has a UA ShadowRoot.
+  WebNode ShadowRoot() const;
+
   // If this element takes up space in the layout of the page.
   bool HasNonEmptyLayoutSize() const;
 
diff --git a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
index 6691993..fbbf692 100644
--- a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
+++ b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
@@ -41,6 +41,7 @@
 #include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h"
 #include "third_party/WebKit/public/common/message_port/transferable_message.h"
 #include "third_party/WebKit/public/mojom/service_worker/service_worker_event_status.mojom-shared.h"
+#include "third_party/WebKit/public/platform/web_feature.mojom-shared.h"
 #include "v8/include/v8.h"
 
 namespace blink {
@@ -136,7 +137,7 @@
 
   // Called when some API to be recorded in UseCounter is called on the worker
   // global scope.
-  virtual void CountFeature(uint32_t feature) {}
+  virtual void CountFeature(mojom::WebFeature feature) {}
 
   // Called when the WorkerGlobalScope had an error or an exception.
   virtual void ReportException(const WebString& error_message,
diff --git a/third_party/feed/BUILD.gn b/third_party/feed/BUILD.gn
new file mode 100644
index 0000000..164d25f
--- /dev/null
+++ b/third_party/feed/BUILD.gn
@@ -0,0 +1,289 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/config.gni")
+import("//build/config/android/rules.gni")
+import("//third_party/protobuf/proto_library.gni")
+
+java_group("feed_java") {
+  deps = [
+    "//third_party/feed:api_common_java",
+    "//third_party/feed:api_java",
+    "//third_party/feed:basicstream_java",
+    "//third_party/feed:feedmodelprovider_java",
+    "//third_party/feed:feedprotocoladapter_java",
+    "//third_party/feed:feedsessionmanager_java",
+    "//third_party/feed:host_java",
+    "//third_party/feed:piet_java",
+    "//third_party/feed:piet_proto_java",
+  ]
+}
+
+android_resources("piet_resources") {
+  resource_dirs =
+      [ "src/src/main/java/com/google/android/libraries/feed/piet/res" ]
+  custom_package = "com.google.android.libraries.feed.piet"
+}
+
+android_library("api_common_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/api/common/ConfigManager.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/common/InternalProtocolUtils.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/common/ThreadUtils.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/common/UiRunnableHandler.java",
+  ]
+  deps = [
+    ":piet_proto_java",
+    "//third_party/jsr-305:jsr_305_javalib",
+  ]
+}
+
+android_library("api_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/api/actionhandler/FeedActionHandler.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/actionhandler/FeedActionHandlerImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelChangeObserver.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelChild.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelCursor.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelFeature.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelMutator.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelProviderFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelProviderObserver.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/ModelToken.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/StreamFeatureChange.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/TokenChange.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/modelprovider/TokenChangeObserver.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/network/HttpRequest.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/network/HttpResponse.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/network/NetworkClient.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/protocoladapter/ProtocolAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/requestmanager/RequestManager.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/sessionmanager/Session.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/sessionmanager/SessionManager.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/sessionmanager/SessionMutation.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/store/ContentMutation.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/store/SessionMutation.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/store/Store.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/stream/CardConfiguration.java",
+    "src/src/main/java/com/google/android/libraries/feed/api/stream/Stream.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedstore/internal/FeedContentMutation.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedstore/internal/FeedSessionMutation.java",
+  ]
+  deps = [
+    ":api_common_java",
+    ":common_java",
+    ":host_java",
+  ]
+}
+
+android_library("basicstream_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/basicstream/BasicStream.java",
+    "src/src/main/java/com/google/android/libraries/feed/basicstream/internal/StreamRecyclerViewAdapter.java",
+  ]
+  deps = [
+    ":api_java",
+    ":piet_java",
+    "//third_party/android_tools:android_support_cardview_java",
+    "//third_party/android_tools:android_support_v7_appcompat_java",
+    "//third_party/android_tools:android_support_v7_recyclerview_java",
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+android_library("common_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/common/DateUtils.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/Dumpable.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/Dumper.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/Logger.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/TimingUtils.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/UiRunnableHandlerImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/Validators.java",
+    "src/src/main/java/com/google/android/libraries/feed/common/protoextensions/FeedExtensionRegistry.java",
+  ]
+  deps = [
+    ":api_common_java",
+    ":host_java",
+    "//third_party/android_tools:android_support_annotations_java",
+  ]
+}
+
+android_library("feedmodelprovider_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/FeedModelProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/FeedModelProviderFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/CursorProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelChildBinder.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelChildFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelCursorImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelFeatureImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelMutatorImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedmodelprovider/internal/ModelTokenImpl.java",
+  ]
+  deps = [
+    ":api_common_java",
+    ":api_java",
+    ":common_java",
+    ":host_java",
+    ":piet_proto_java",
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+android_library("feedprotocoladapter_java") {
+  chromium_code = false
+  java_files = [ "src/src/main/java/com/google/android/libraries/feed/feedprotocoladapter/FeedProtocolAdapter.java" ]
+  deps = [
+    ":api_common_java",
+    ":api_java",
+    ":common_java",
+  ]
+}
+
+android_library("feedrequestmanager_java") {
+  chromium_code = false
+  java_files = [ "src/src/main/java/com/google/android/libraries/feed/feedrequestmanager/FeedRequestManager.java" ]
+  deps = [
+    ":api_common_java",
+    ":api_java",
+    ":common_java",
+  ]
+}
+
+android_library("feedsessionmanager_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/FeedSessionManager.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/FeedSession.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/HeadSessionImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/ManagedSession.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/SessionFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/SessionImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/feedsessionmanager/internal/SessionMutationImpl.java",
+  ]
+  deps = [
+    ":api_common_java",
+    ":api_java",
+    ":common_java",
+    ":host_java",
+    ":piet_proto_java",
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+android_library("mocknetworkclient_java") {
+  chromium_code = false
+  java_files = [ "src/src/main/java/com/google/android/libraries/feed/mocknetworkclient/MockServerNetworkClient.java" ]
+  deps = [
+    ":api_java",
+    ":piet_proto_java",
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+android_library("host_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/host/common/Callback.java",
+    "src/src/main/java/com/google/android/libraries/feed/host/common/ProtoExtensionProvider.java",
+  ]
+  deps = [
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+android_library("piet_java") {
+  chromium_code = false
+  java_files = [
+    "src/src/main/java/com/google/android/libraries/feed/piet/AdapterFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/AdapterParameters.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/BoundFrameContext.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/BoundViewAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/CustomElementAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ElementAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ElementAdapterFactory.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ElementListAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ErrorViewUtils.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/FrameAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/FrameModelBinder.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/GridRowAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ImageElementAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/KeyedRecyclerPool.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/PietManager.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/PietStylesHelper.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/RecyclerPool.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/SingleKeyRecyclerPool.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/SpacerElementAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/StyleProviderImpl.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/TemplateInvocationAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/TextElementAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ViewGroupBoundViewAdapter.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/host/ActionHandler.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/host/AssetProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/host/CustomElementProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/ui/RoundedCornerColorDrawable.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/FrameContext.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/ParameterizedTextEvaluator.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/Producer.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/Producers.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/StyleProvider.java",
+    "src/src/main/java/com/google/android/libraries/feed/piet/util/ViewUtils.java",
+  ]
+  deps = [
+    ":common_java",
+    ":piet_proto_java",
+    ":piet_resources",
+    "//third_party/android_tools:android_support_annotations_java",
+    "//third_party/android_tools:android_support_v7_appcompat_java",
+    "//third_party/jsr-305:jsr_305_javalib",
+    "//third_party/protobuf:protobuf_lite_javalib",
+  ]
+}
+
+proto_java_library("piet_proto_java") {
+  proto_path = "src"
+  generate_lite = true
+  sources = [
+    "$proto_path/src/main/proto/com/google/android/libraries/feed/api/proto/stream_data.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/action/feed_action.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/action/piet_extensions.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/accessibility.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/actions.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/binding_refs.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/elements.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/gradients.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/images.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/piet.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/piet_android_support.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/piet_web_support.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/rounded_corners.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/shadows.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/styles.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/piet/text.proto",
+    "$proto_path/src/main/proto/search/now/proto/ui/stream/stream_structure.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/card_metadata.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/client_info.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/content_id.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/data_operation.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feature.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feed_card.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feed_query.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feed_request.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feed_response.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/feed_stream.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/mockserver/mock_server.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/payload_metadata.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/piet_shared_state_item.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/request.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/response.proto",
+    "$proto_path/src/main/proto/search/now/proto/wire/feed/version.proto",
+  ]
+}
diff --git a/third_party/feed/LICENSE b/third_party/feed/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/third_party/feed/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/third_party/feed/OWNERS b/third_party/feed/OWNERS
new file mode 100644
index 0000000..ba0283b8
--- /dev/null
+++ b/third_party/feed/OWNERS
@@ -0,0 +1,6 @@
+fgorski@chromium.org
+pavely@chromium.org
+zea@chromium.org
+
+# Team: chrome-jardin-team@google.com
+# COMPONENT: UI>Browser>ContentSuggestions>Feed
diff --git a/third_party/feed/README.chromium b/third_party/feed/README.chromium
new file mode 100644
index 0000000..6b5b12b3
--- /dev/null
+++ b/third_party/feed/README.chromium
@@ -0,0 +1,11 @@
+Name: Feed
+Short name: feed
+URL: https://chromium.googlesource.com/feed
+Version: 0
+Revision: 5ebe38905c1a1d09e39a22cfb8ae59531553b65a
+License: Apache 2.0
+License File: LICENSE
+Security Critical: yes
+License Android Compatible: yes
+Description: Feed is a library for embedding content recommendations.
+Local Modifications: None
diff --git a/third_party/gvr-android-sdk/BUILD.gn b/third_party/gvr-android-sdk/BUILD.gn
index 73e88146..4ce8053 100644
--- a/third_party/gvr-android-sdk/BUILD.gn
+++ b/third_party/gvr-android-sdk/BUILD.gn
@@ -40,9 +40,9 @@
     "*google/vr/cardboard/VrParamsProviderFactory.class",
     "*google/vr/cardboard/VrParamsProviderFactory\$ContentProviderClientHandle.class",
     "*google/vr/cardboard/VrSettingsProviderContract.class",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/internal/controller/*",
+    "*google/vr/internal/controller/ControllerServiceBridge.class",
+    "*google/vr/internal/controller/ControllerServiceBridge\$*",
+    "*google/vr/internal/controller/NativeCallbacks.class",
     "*google/vr/ndk/base/AndroidCompat.class",
     "*google/vr/ndk/base/BuildConstants.class",
     "*google/vr/ndk/base/DaydreamApi*.class",
@@ -55,23 +55,25 @@
     "*google/vr/ndk/base/SdkConfigurationReader.class",
     "*google/vr/ndk/base/TraceCompat.class",
     "*google/vr/ndk/base/Version.class",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/sdk/common/deps/*",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/sdk/proto/nano/*",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/vrcore/base/api/*",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/vrcore/common/api/*",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
-    "*google/vr/vrcore/controller/api/*",
-
-    # TODO(mthiesse): Figure out whether all files in this directory are needed.
+    "*google/vr/sdk/common/deps/a.class",
+    "*google/vr/sdk/common/deps/b.class",
+    "*google/vr/sdk/common/deps/c.class",
+    "*google/vr/sdk/proto/nano/CardboardDevice.class",
+    "*google/vr/sdk/proto/nano/CardboardDevice\$*",
+    "*google/vr/sdk/proto/nano/Display.class",
+    "*google/vr/sdk/proto/nano/Display\$*",
+    "*google/vr/sdk/proto/nano/SdkConfiguration.class",
+    "*google/vr/sdk/proto/nano/SdkConfiguration\$*",
+    "*google/vr/vrcore/base/api/ParcelableProto.class",
+    "*google/vr/vrcore/base/api/VrCoreConstants.class",
+    "*google/vr/vrcore/base/api/VrCoreNotAvailableException.class",
+    "*google/vr/vrcore/base/api/VrCoreUtils.class",
+    "*google/vr/vrcore/base/api/VrCoreUtils\$*",
+    "*google/vr/vrcore/common/api/IDaydream*",
+    "*google/vr/vrcore/common/api/ITransition*",
+    "*google/vr/vrcore/common/api/IVrCore*",
+    "*google/vr/vrcore/controller/api/IController*",
+    "*google/vr/vrcore/controller/api/Controller*",
     "*google/vr/vrcore/library/api/*",
   ]
 
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index 69fc11e..bdd1000 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -64,6 +64,8 @@
 import json
 import logging
 import os
+import re
+import shlex
 import subprocess
 import urllib2
 
@@ -316,7 +318,7 @@
     return 'mac'
 
 
-def _IsTargetOsIos():
+def _IsIOS():
   """Returns true if the target_os specified in args.gn file is ios"""
   build_args = _ParseArgsGnFile()
   return 'target_os' in build_args and build_args['target_os'] == '"ios"'
@@ -422,11 +424,7 @@
   ]
   subprocess_cmd.extend(
       ['-object=' + binary_path for binary_path in binary_paths[1:]])
-  if _IsTargetOsIos():
-    # iOS binaries are universal binaries, and it requires specifying the
-    # architecture to use.
-    subprocess_cmd.append('-arch=x86_64')
-
+  _AddArchArgumentForIOSIfNeeded(subprocess_cmd, len(binary_paths))
   subprocess_cmd.extend(filters)
   subprocess.check_call(subprocess_cmd)
   logging.debug('Finished running "llvm-cov show" command')
@@ -771,11 +769,11 @@
     logging.info('Running command: "%s", the output is redirected to "%s"',
                  command, output_file_path)
 
-    if _IsIosCommand(command):
+    if _IsIOSCommand(command):
       # On iOS platform, due to lack of write permissions, profraw files are
       # generated outside of the OUTPUT_DIR, and the exact paths are contained
       # in the output of the command execution.
-      output = _ExecuteIosCommand(target, command)
+      output = _ExecuteIOSCommand(target, command)
       profraw_file_paths.append(_GetProfrawDataFileByParsingOutput(output))
     else:
       # On other platforms, profraw files are generated inside the OUTPUT_DIR.
@@ -786,7 +784,7 @@
 
   logging.debug('Finished executing the test commands')
 
-  if _IsTargetOsIos():
+  if _IsIOS():
     return profraw_file_paths
 
   for file_or_dir in os.listdir(OUTPUT_DIR):
@@ -825,7 +823,8 @@
 
   try:
     output = subprocess.check_output(
-        command.split(), env={'LLVM_PROFILE_FILE': expected_profraw_file_path})
+        shlex.split(command),
+        env={'LLVM_PROFILE_FILE': expected_profraw_file_path})
   except subprocess.CalledProcessError as e:
     output = e.output
     logging.warning('Command: "%s" exited with non-zero return code', command)
@@ -833,7 +832,7 @@
   return output
 
 
-def _ExecuteIosCommand(target, command):
+def _ExecuteIOSCommand(target, command):
   """Runs a single iOS command and generates a profraw data file.
 
   iOS application doesn't have write access to folders outside of the app, so
@@ -842,10 +841,18 @@
   application's Documents folder, and the full path can be obtained by parsing
   the output.
   """
-  assert _IsIosCommand(command)
+  assert _IsIOSCommand(command)
+
+  # After running tests, iossim generates a profraw data file, it won't be
+  # needed anyway, so dump it into the OUTPUT_DIR to avoid polluting the
+  # checkout.
+  iossim_profraw_file_path = os.path.join(
+      OUTPUT_DIR, os.extsep.join(['iossim', PROFRAW_FILE_EXTENSION]))
 
   try:
-    output = subprocess.check_output(command.split())
+    output = subprocess.check_output(
+        shlex.split(command),
+        env={'LLVM_PROFILE_FILE': iossim_profraw_file_path})
   except subprocess.CalledProcessError as e:
     # iossim emits non-zero return code even if tests run successfully, so
     # ignore the return code.
@@ -861,15 +868,15 @@
   have a single line containing the path to the generated profraw data file.
   NOTE: This should only be called when target os is iOS.
   """
-  assert _IsTargetOsIos()
+  assert _IsIOS()
 
-  output_by_lines = ''.join(output).split('\n')
-  profraw_file_identifier = 'Coverage data at '
+  output_by_lines = ''.join(output).splitlines()
+  profraw_file_pattern = re.compile('.*Coverage data at (.*coverage\.profraw).')
 
   for line in output_by_lines:
-    if profraw_file_identifier in line:
-      profraw_file_path = line.split(profraw_file_identifier)[1][:-1]
-      return profraw_file_path
+    result = profraw_file_pattern.match(line)
+    if result:
+      return result.group(1)
 
   assert False, ('No profraw data file was generated, did you call '
                  'coverage_util::ConfigureCoverageReportPath() in test setup? '
@@ -922,10 +929,7 @@
   ]
   subprocess_cmd.extend(
       ['-object=' + binary_path for binary_path in binary_paths[1:]])
-  if _IsTargetOsIos():
-    # iOS binaries are universal binaries, and it requires specifying the
-    # architecture to use.
-    subprocess_cmd.append('-arch=x86_64')
+  _AddArchArgumentForIOSIfNeeded(subprocess_cmd, len(binary_paths))
 
   subprocess_cmd.extend(filters)
 
@@ -953,6 +957,16 @@
   return per_file_coverage_summary
 
 
+def _AddArchArgumentForIOSIfNeeded(cmd_list, num_archs):
+  """Appends -arch arguments to the command list if it's ios platform.
+
+  iOS binaries are universal binaries, and require specifying the architecture
+  to use, and one architecture needs to be specified for each binary.
+  """
+  if _IsIOS():
+    cmd_list.extend(['-arch=x86_64'] * num_archs)
+
+
 def _GetBinaryPath(command):
   """Returns a relative path to the binary to be run by the command.
 
@@ -973,7 +987,7 @@
   """
   xvfb_script_name = os.extsep.join(['xvfb', 'py'])
 
-  command_parts = command.split()
+  command_parts = shlex.split(command)
   if os.path.basename(command_parts[0]) == 'python':
     assert os.path.basename(command_parts[1]) == xvfb_script_name, (
         'This tool doesn\'t understand the command: "%s"' % command)
@@ -982,19 +996,19 @@
   if os.path.basename(command_parts[0]) == xvfb_script_name:
     return command_parts[1]
 
-  if _IsIosCommand(command):
+  if _IsIOSCommand(command):
     # For a given application bundle, the binary resides in the bundle and has
     # the same name with the application without the .app extension.
     app_path = command_parts[1]
     app_name = os.path.splitext(os.path.basename(app_path))[0]
     return os.path.join(app_path, app_name)
 
-  return command.split()[0]
+  return command_parts[0]
 
 
-def _IsIosCommand(command):
+def _IsIOSCommand(command):
   """Returns true if command is used to run tests on iOS platform."""
-  return os.path.basename(command.split()[0]) == 'iossim'
+  return os.path.basename(shlex.split(command)[0]) == 'iossim'
 
 
 def _VerifyTargetExecutablesAreInBuildDirectory(commands):
@@ -1144,7 +1158,7 @@
   """Execute tool commands."""
   assert _GetPlatform() in [
       'linux', 'mac'
-  ], ('Coverage is only supported on linux and mac platforms.')
+  ], ('This script is only supported on linux and mac platforms.')
   assert os.path.abspath(os.getcwd()) == SRC_ROOT_PATH, ('This script must be '
                                                          'called from the root '
                                                          'of checkout.')
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 38e2d224..d196bfe 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -17919,6 +17919,7 @@
   <int value="2381" label="V8RTCRtpSender_Dtmf_AttributeGetter"/>
   <int value="2382" label="RTCConstraintEnableDtlsSrtpTrue"/>
   <int value="2383" label="RTCConstraintEnableDtlsSrtpFalse"/>
+  <int value="2384" label="RtcPeerConnectionId"/>
 </enum>
 
 <enum name="FeedbackSource">
@@ -25861,6 +25862,7 @@
   <int value="-1469536698" label="ChromeHomeDoodle:enabled"/>
   <int value="-1469228683" label="QuickUnlockPinSignin:disabled"/>
   <int value="-1468126425" label="ResourceLoadScheduler:disabled"/>
+  <int value="-1467642274" label="KeyboardShortcutViewer:disabled"/>
   <int value="-1467332609" label="tab-management-experiment-type-anise"/>
   <int value="-1466990325" label="CrosCompUpdates:enabled"/>
   <int value="-1466759286" label="TabModalJsDialog:disabled"/>
@@ -26168,7 +26170,6 @@
   <int value="-723224470" label="enable-password-force-saving:enabled"/>
   <int value="-722474177" label="browser-side-navigation:disabled"/>
   <int value="-718626298" label="SysInternals:enabled"/>
-  <int value="-717281513" label="ash-enable-keyboard-shortcut-viewer"/>
   <int value="-716953514" label="disable-password-separated-signin-flow"/>
   <int value="-715733307" label="force-effective-connection-type"/>
   <int value="-714712077" label="ClickToOpenPDFPlaceholder:disabled"/>
@@ -26181,6 +26182,7 @@
   <int value="-704232562" label="UseMonitorColorSpace:enabled"/>
   <int value="-702477233" label="ContentFullscreen:enabled"/>
   <int value="-699767107" label="enable-sync-app-list"/>
+  <int value="-699198009" label="KeyboardShortcutViewer:enabled"/>
   <int value="-697751423" label="disable-quickoffice-component-app"/>
   <int value="-684900739" label="disable-merge-key-char-events"/>
   <int value="-684223908" label="enable-android-wallpapers-app"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 6464753..f716452 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -56216,6 +56216,17 @@
   </summary>
 </histogram>
 
+<histogram name="OfflinePages.ClearTemporaryPages.TimeSinceCreation"
+    units="minutes">
+  <owner>carlosk@chromium.org</owner>
+  <summary>
+    When a temporary page is deleted due to storage pressure, reports the time
+    since its creation. This metric should be useful to track the occurrence of
+    &quot;content thrashing&quot;, when automatically created temporary pages
+    are forcing the deletion of recently saved temporary pages.
+  </summary>
+</histogram>
+
 <histogram name="OfflinePages.Consistency.DeleteOrphanedArchivesResult"
     enum="BooleanSuccess">
   <obsolete>
@@ -89291,6 +89302,9 @@
 </histogram>
 
 <histogram name="Sync.FreqApps" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for apps. Used as estimate of datatype commit frequency.
@@ -89299,6 +89313,9 @@
 </histogram>
 
 <histogram name="Sync.FreqAutofill" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for autofill entries. Used as estimate of datatype
@@ -89308,6 +89325,9 @@
 </histogram>
 
 <histogram name="Sync.FreqAutofillProfiles" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for autofill profiles. Used as estimate of datatype
@@ -89317,6 +89337,9 @@
 </histogram>
 
 <histogram name="Sync.FreqBookmarks" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for bookmarks. Used as estimate of datatype commit
@@ -89325,6 +89348,9 @@
 </histogram>
 
 <histogram name="Sync.FreqDictionary" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for dictionary. Used as estimate of datatype commit
@@ -89333,6 +89359,9 @@
 </histogram>
 
 <histogram name="Sync.FreqExtensions" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for extensions. Used as estimate of datatype commit
@@ -89341,6 +89370,9 @@
 </histogram>
 
 <histogram name="Sync.FreqFaviconImages" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for favicon images. Used as estimate of datatype commit
@@ -89349,6 +89381,9 @@
 </histogram>
 
 <histogram name="Sync.FreqFaviconTracking" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for favicon tracking. Used as estimate of datatype
@@ -89358,6 +89393,9 @@
 </histogram>
 
 <histogram name="Sync.FreqNigori" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for nigori. Used as estimate of datatype commit
@@ -89366,6 +89404,9 @@
 </histogram>
 
 <histogram name="Sync.FreqPasswords" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for passwords. Used as estimate of datatype commit
@@ -89374,6 +89415,9 @@
 </histogram>
 
 <histogram name="Sync.FreqPreferences" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for preferences. Used as estimate of datatype commit
@@ -89382,6 +89426,9 @@
 </histogram>
 
 <histogram name="Sync.FreqSearchEngines" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for search engines. Used as estimate of datatype commit
@@ -89390,6 +89437,9 @@
 </histogram>
 
 <histogram name="Sync.FreqSessions" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for sessions. Used as estimate of datatype commit
@@ -89410,6 +89460,9 @@
 </histogram>
 
 <histogram name="Sync.FreqThemes" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for themes. Used as estimate of datatype commit
@@ -89418,6 +89471,9 @@
 </histogram>
 
 <histogram name="Sync.FreqTypedUrls" units="ms">
+  <obsolete>
+    Deprecated 03/2018 (M67). Replaced by Sync.SyncCycleInterval.
+  </obsolete>
   <owner>zea@chromium.org</owner>
   <summary>
     Time between nudges for typed urls. Used as estimate of datatype commit
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml
index 45b11bb..979eb64 100644
--- a/tools/metrics/ukm/ukm.xml
+++ b/tools/metrics/ukm/ukm.xml
@@ -2330,12 +2330,25 @@
       brought to foreground again.
     </summary>
   </metric>
+  <metric name="MRUIndex">
+    <summary>
+      Index of the tab in most-recently-used order. A value of N means there are
+      N tabs more recently used than the one that is being foregrounded or
+      closed.
+    </summary>
+  </metric>
   <metric name="TimeFromBackgrounded">
     <summary>
       Duration in MS from when the tab is backgrounded to when it is brought to
       foreground or closed.
     </summary>
   </metric>
+  <metric name="TotalTabCount">
+    <summary>
+      Total number of tabs open across all non-incognito browser windows. Helps
+      contextualize the MRUIndex value.
+    </summary>
+  </metric>
 </event>
 
 <event
diff --git a/tools/perf/contrib/blink_perf_xml_http_request/OWNERS b/tools/perf/contrib/blink_perf_xml_http_request/OWNERS
index 3bcd079..3d558f9 100644
--- a/tools/perf/contrib/blink_perf_xml_http_request/OWNERS
+++ b/tools/perf/contrib/blink_perf_xml_http_request/OWNERS
@@ -1,2 +1,2 @@
-tyoshino@chromium.org
+yhirano@chromium.org
 hiroshige@chromium.org
diff --git a/ui/arc/notification/arc_notification_content_view_unittest.cc b/ui/arc/notification/arc_notification_content_view_unittest.cc
index d69a751f..114a3836 100644
--- a/ui/arc/notification/arc_notification_content_view_unittest.cc
+++ b/ui/arc/notification/arc_notification_content_view_unittest.cc
@@ -111,8 +111,10 @@
   gfx::Rect GetSwipeInputRect() const override { return gfx::Rect(); }
   const base::string16& GetAccessibleName() const override {
     return base::EmptyString16();
-  };
-  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data) override {}
+  }
+
+  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data,
+                            const std::string& app_id) override {}
   bool IsManuallyExpandedOrCollapsed() const override { return false; }
 
  private:
diff --git a/ui/arc/notification/arc_notification_item.h b/ui/arc/notification/arc_notification_item.h
index cbe9410..d3973bf 100644
--- a/ui/arc/notification/arc_notification_item.h
+++ b/ui/arc/notification/arc_notification_item.h
@@ -32,7 +32,8 @@
   virtual void OnClosedFromAndroid() = 0;
   // Called when the notification is updated on Android-side. This is called
   // from ArcNotificationManager.
-  virtual void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data) = 0;
+  virtual void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data,
+                                    const std::string& app_id) = 0;
 
   // Called when the notification is closed on Chrome-side. This is called from
   // ArcNotificationDelegate.
diff --git a/ui/arc/notification/arc_notification_item_impl.cc b/ui/arc/notification/arc_notification_item_impl.cc
index a889206a..60e31b8 100644
--- a/ui/arc/notification/arc_notification_item_impl.cc
+++ b/ui/arc/notification/arc_notification_item_impl.cc
@@ -7,6 +7,7 @@
 #include <utility>
 #include <vector>
 
+#include "ash/shelf/shelf_constants.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -22,7 +23,6 @@
 
 namespace {
 
-constexpr char kNotifierId[] = "ARC_NOTIFICATION";
 constexpr char kNotificationIdPrefix[] = "ARC_NOTIFICATION_";
 
 // Converts from Android notification priority to Chrome notification priority.
@@ -68,7 +68,8 @@
 }
 
 void ArcNotificationItemImpl::OnUpdatedFromAndroid(
-    mojom::ArcNotificationDataPtr data) {
+    mojom::ArcNotificationDataPtr data,
+    const std::string& app_id) {
   DCHECK(CalledOnValidThread());
   DCHECK_EQ(notification_key_, data->key);
 
@@ -91,7 +92,8 @@
   }
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::ARC_APPLICATION, kNotifierId);
+      message_center::NotifierId::ARC_APPLICATION,
+      app_id.empty() ? ash::kDefaultArcNotifierId : app_id);
   notifier_id.profile_id = profile_id_.GetUserEmail();
 
   auto notification = std::make_unique<message_center::Notification>(
diff --git a/ui/arc/notification/arc_notification_item_impl.h b/ui/arc/notification/arc_notification_item_impl.h
index 33bea52..c8c22f8 100644
--- a/ui/arc/notification/arc_notification_item_impl.h
+++ b/ui/arc/notification/arc_notification_item_impl.h
@@ -32,7 +32,8 @@
 
   // ArcNotificationItem overrides:
   void OnClosedFromAndroid() override;
-  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data) override;
+  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data,
+                            const std::string& app_id) override;
   void Close(bool by_user) override;
   void Click() override;
   void OpenSettings() override;
diff --git a/ui/arc/notification/arc_notification_manager.cc b/ui/arc/notification/arc_notification_manager.cc
index 98553c4b..ad12a9a 100644
--- a/ui/arc/notification/arc_notification_manager.cc
+++ b/ui/arc/notification/arc_notification_manager.cc
@@ -130,7 +130,8 @@
   const std::string& key = data->key;
   auto it = items_.find(key);
   if (it == items_.end()) {
-    // Show a notification on the primary logged-in user's desktop.
+    // Show a notification on the primary logged-in user's desktop and badge the
+    // app icon in the shelf if the icon exists.
     // TODO(yoshiki): Reconsider when ARC supports multi-user.
     auto item = std::make_unique<ArcNotificationItemImpl>(
         this, message_center_, key, main_profile_id_);
@@ -139,7 +140,9 @@
     DCHECK(result.second);
     it = result.first;
   }
-  it->second->OnUpdatedFromAndroid(std::move(data));
+  const std::string app_id =
+      data->package_name ? GetAppId(data->package_name.value()) : std::string();
+  it->second->OnUpdatedFromAndroid(std::move(data), app_id);
 }
 
 void ArcNotificationManager::OnNotificationUpdated(
@@ -154,7 +157,8 @@
   if (it == items_.end())
     return;
 
-  it->second->OnUpdatedFromAndroid(std::move(data));
+  const std::string app_id = GetAppId(data->package_name.value());
+  it->second->OnUpdatedFromAndroid(std::move(data), app_id);
 }
 
 void ArcNotificationManager::OnNotificationRemoved(const std::string& key) {
@@ -340,6 +344,10 @@
       key, mojom::ArcNotificationEvent::TOGGLE_EXPANSION);
 }
 
+void ArcNotificationManager::Shutdown() {
+  get_app_id_callback_.Reset();
+}
+
 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) {
   const base::string16 text16(
       base::UTF8ToUTF16(data->text.has_value() ? *data->text : std::string()));
@@ -361,4 +369,12 @@
          *data->package_name == kPlayStorePackageName && IsRobotAccountMode();
 }
 
+std::string ArcNotificationManager::GetAppId(
+    const std::string& package_name) const {
+  if (get_app_id_callback_.is_null())
+    return std::string();
+
+  return get_app_id_callback_.Run(package_name);
+}
+
 }  // namespace arc
diff --git a/ui/arc/notification/arc_notification_manager.h b/ui/arc/notification/arc_notification_manager.h
index 0705835..3eabb26 100644
--- a/ui/arc/notification/arc_notification_manager.h
+++ b/ui/arc/notification/arc_notification_manager.h
@@ -51,6 +51,12 @@
 
   ~ArcNotificationManager() override;
 
+  void set_get_app_id_callback(
+      base::RepeatingCallback<std::string(const std::string&)>
+          get_app_id_callback) {
+    get_app_id_callback_ = std::move(get_app_id_callback);
+  }
+
   // ConnectionObserver<mojom::NotificationsInstance> implementation:
   void OnConnectionReady() override;
   void OnConnectionClosed() override;
@@ -73,6 +79,9 @@
   bool IsOpeningSettingsSupported() const;
   void SendNotificationToggleExpansionOnChrome(const std::string& key);
 
+  // Overridden from KeyedService:
+  void Shutdown() override;
+
  private:
   ArcNotificationManager(ArcBridgeService* bridge_service,
                          const AccountId& main_profile_id,
@@ -80,6 +89,9 @@
 
   bool ShouldIgnoreNotification(mojom::ArcNotificationData* data);
 
+  // Calls |get_app_id_callback_| to retrieve the app id from ArcAppListPrefs.
+  std::string GetAppId(const std::string& package_name) const;
+
   ArcBridgeService* const arc_bridge_service_;  // Owned by ArcServiceManager.
   const AccountId main_profile_id_;
   message_center::MessageCenter* const message_center_;
@@ -88,6 +100,8 @@
       std::unordered_map<std::string, std::unique_ptr<ArcNotificationItem>>;
   ItemMap items_;
 
+  base::RepeatingCallback<std::string(const std::string&)> get_app_id_callback_;
+
   bool ready_ = false;
 
   DISALLOW_COPY_AND_ASSIGN(ArcNotificationManager);
diff --git a/ui/arc/notification/arc_notification_manager_unittest.cc b/ui/arc/notification/arc_notification_manager_unittest.cc
index 98f5861..5053235c 100644
--- a/ui/arc/notification/arc_notification_manager_unittest.cc
+++ b/ui/arc/notification/arc_notification_manager_unittest.cc
@@ -85,6 +85,7 @@
     data->key = key;
     data->title = "TITLE";
     data->message = "MESSAGE";
+    data->package_name = "PACKAGE_NAME";
 
     arc_notification_manager()->OnNotificationPosted(std::move(data));
 
diff --git a/ui/arc/notification/arc_notification_view_unittest.cc b/ui/arc/notification/arc_notification_view_unittest.cc
index e988fdd..528f896 100644
--- a/ui/arc/notification/arc_notification_view_unittest.cc
+++ b/ui/arc/notification/arc_notification_view_unittest.cc
@@ -123,8 +123,9 @@
   gfx::Rect GetSwipeInputRect() const override { return gfx::Rect(); }
   const base::string16& GetAccessibleName() const override {
     return base::EmptyString16();
-  };
-  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data) override {}
+  }
+  void OnUpdatedFromAndroid(mojom::ArcNotificationDataPtr data,
+                            const std::string& app_id) override {}
   bool IsManuallyExpandedOrCollapsed() const override { return false; }
 
  private:
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index 04f009d7..56f8428 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -151,6 +151,7 @@
     "//components/discardable_memory/client",
     "//components/discardable_memory/public/interfaces",
     "//components/viz/client",
+    "//components/viz/common",
     "//components/viz/host",
     "//components/viz/service",
     "//gpu/ipc/client",
diff --git a/ui/aura/local/window_port_local.cc b/ui/aura/local/window_port_local.cc
index 787fbc5..f4d74d1 100644
--- a/ui/aura/local/window_port_local.cc
+++ b/ui/aura/local/window_port_local.cc
@@ -140,6 +140,16 @@
     frame_sink_->SetLocalSurfaceId(local_surface_id_);
 }
 
+bool WindowPortLocal::IsLocalSurfaceIdAllocationSuppressed() const {
+  return parent_local_surface_id_allocator_.is_allocation_suppressed();
+}
+
+viz::ScopedSurfaceIdAllocator WindowPortLocal::GetSurfaceIdAllocator(
+    base::OnceCallback<void()> allocation_task) {
+  return viz::ScopedSurfaceIdAllocator(&parent_local_surface_id_allocator_,
+                                       std::move(allocation_task));
+}
+
 const viz::LocalSurfaceId& WindowPortLocal::GetLocalSurfaceId() {
   if (!local_surface_id_.is_valid())
     AllocateLocalSurfaceId();
diff --git a/ui/aura/local/window_port_local.h b/ui/aura/local/window_port_local.h
index 58abd724..8c2b4b3 100644
--- a/ui/aura/local/window_port_local.h
+++ b/ui/aura/local/window_port_local.h
@@ -47,6 +47,9 @@
                          std::unique_ptr<ui::PropertyData> data) override;
   std::unique_ptr<cc::LayerTreeFrameSink> CreateLayerTreeFrameSink() override;
   void AllocateLocalSurfaceId() override;
+  bool IsLocalSurfaceIdAllocationSuppressed() const override;
+  viz::ScopedSurfaceIdAllocator GetSurfaceIdAllocator(
+      base::OnceCallback<void()> allocation_task) override;
   const viz::LocalSurfaceId& GetLocalSurfaceId() override;
   void OnEventTargetingPolicyChanged() override;
   bool ShouldRestackTransientChildren() override;
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index 45dd67e..a6f7008 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -409,6 +409,16 @@
   UpdatePrimarySurfaceId();
 }
 
+bool WindowPortMus::IsLocalSurfaceIdAllocationSuppressed() const {
+  return parent_local_surface_id_allocator_.is_allocation_suppressed();
+}
+
+viz::ScopedSurfaceIdAllocator WindowPortMus::GetSurfaceIdAllocator(
+    base::OnceCallback<void()> allocation_task) {
+  return viz::ScopedSurfaceIdAllocator(&parent_local_surface_id_allocator_,
+                                       std::move(allocation_task));
+}
+
 const viz::LocalSurfaceId& WindowPortMus::GetLocalSurfaceId() {
   if (base::FeatureList::IsEnabled(features::kMash))
     return local_surface_id_;
diff --git a/ui/aura/mus/window_port_mus.h b/ui/aura/mus/window_port_mus.h
index 8228ff8..6689943 100644
--- a/ui/aura/mus/window_port_mus.h
+++ b/ui/aura/mus/window_port_mus.h
@@ -273,6 +273,9 @@
                          std::unique_ptr<ui::PropertyData> data) override;
   std::unique_ptr<cc::LayerTreeFrameSink> CreateLayerTreeFrameSink() override;
   void AllocateLocalSurfaceId() override;
+  bool IsLocalSurfaceIdAllocationSuppressed() const override;
+  viz::ScopedSurfaceIdAllocator GetSurfaceIdAllocator(
+      base::OnceCallback<void()> allocation_task) override;
   const viz::LocalSurfaceId& GetLocalSurfaceId() override;
   void OnEventTargetingPolicyChanged() override;
   bool ShouldRestackTransientChildren() override;
diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc
index cc475db..b1c7008 100644
--- a/ui/aura/test/ui_controls_factory_aurawin.cc
+++ b/ui/aura/test/ui_controls_factory_aurawin.cc
@@ -78,12 +78,6 @@
   bool SendTouchEvents(int action, int num, int x, int y) override {
     return SendTouchEventsImpl(action, num, x, y);
   }
-  void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) override {
-    // On windows, posting UI events is synchronous so just post the closure.
-    DCHECK(base::MessageLoopForUI::IsCurrent());
-    base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
-  }
 
  private:
   DISALLOW_COPY_AND_ASSIGN(UIControlsWin);
diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc
index 7115d23..93c2025 100644
--- a/ui/aura/test/ui_controls_factory_aurax11.cc
+++ b/ui/aura/test/ui_controls_factory_aurax11.cc
@@ -181,8 +181,7 @@
   bool SendMouseClick(MouseButton type) override {
     return SendMouseEvents(type, UP | DOWN);
   }
-  void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) override {
+  void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
     if (closure.is_null())
       return;
     static XEvent* marker_event = NULL;
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index c30653c..a8c511e 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -173,8 +173,7 @@
   bool SendMouseClick(ui_controls::MouseButton type) override {
     return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN);
   }
-  void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) override {
+  void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
     if (!closure.is_null())
       base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
   }
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 0f224d8..5a3c82f 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -1100,6 +1100,15 @@
   port_->AllocateLocalSurfaceId();
 }
 
+bool Window::IsLocalSurfaceIdAllocationSuppressed() const {
+  return port_->IsLocalSurfaceIdAllocationSuppressed();
+}
+
+viz::ScopedSurfaceIdAllocator Window::GetSurfaceIdAllocator(
+    base::OnceCallback<void()> allocation_task) {
+  return port_->GetSurfaceIdAllocator(std::move(allocation_task));
+}
+
 const viz::LocalSurfaceId& Window::GetLocalSurfaceId() const {
   return port_->GetLocalSurfaceId();
 }
diff --git a/ui/aura/window.h b/ui/aura/window.h
index b6e2dcf..fd97983 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -19,9 +19,11 @@
 #include "base/observer_list.h"
 #include "base/optional.h"
 #include "base/strings/string16.h"
+#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
 #include "ui/aura/aura_export.h"
 #include "ui/aura/client/window_types.h"
 #include "ui/aura/window_observer.h"
+#include "ui/aura/window_port.h"
 #include "ui/base/class_property.h"
 #include "ui/compositor/layer_animator.h"
 #include "ui/compositor/layer_delegate.h"
@@ -58,7 +60,6 @@
 class ScopedKeyboardHook;
 class WindowDelegate;
 class WindowObserver;
-class WindowPort;
 class WindowPortForShutdown;
 class WindowTreeHost;
 
@@ -386,6 +387,13 @@
   // that does not involve a resize or a device scale factor change.
   void AllocateLocalSurfaceId();
 
+  // When a child-allocated viz::LocalSurfaceId is being processed, this returns
+  // true.
+  bool IsLocalSurfaceIdAllocationSuppressed() const;
+
+  viz::ScopedSurfaceIdAllocator GetSurfaceIdAllocator(
+      base::OnceCallback<void()> allocation_task);
+
   // Gets the current viz::LocalSurfaceId.
   const viz::LocalSurfaceId& GetLocalSurfaceId() const;
 
diff --git a/ui/aura/window_port.h b/ui/aura/window_port.h
index a57c5134..91e6445 100644
--- a/ui/aura/window_port.h
+++ b/ui/aura/window_port.h
@@ -13,6 +13,7 @@
 #include "base/callback.h"
 #include "base/observer_list.h"
 #include "base/strings/string16.h"
+#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
 #include "components/viz/common/surfaces/surface_id.h"
 #include "ui/aura/aura_export.h"
 #include "ui/base/class_property.h"
@@ -90,6 +91,18 @@
   // that does not involve a resize or a device scale factor change.
   virtual void AllocateLocalSurfaceId() = 0;
 
+  // When a child-allocated viz::LocalSurfaceId is being processed, this returns
+  // true.
+  virtual bool IsLocalSurfaceIdAllocationSuppressed() const = 0;
+
+  // When a ScopedSurfaceIdAllocator is alive, it prevents the
+  // allocator from actually allocating. Instead, it triggers its
+  // |allocation_task| upon destruction. This allows us to issue only one
+  // allocation during the lifetime. This is used to continue routing and
+  // processing when a child allocates its own LocalSurfaceId.
+  virtual viz::ScopedSurfaceIdAllocator GetSurfaceIdAllocator(
+      base::OnceCallback<void()> allocation_task) = 0;
+
   // Gets the current viz::LocalSurfaceId. The viz::LocalSurfaceId is allocated
   // lazily on call, and will be updated on changes to size or device scale
   // factor.
diff --git a/ui/aura/window_port_for_shutdown.cc b/ui/aura/window_port_for_shutdown.cc
index a11a2ee..6b71728 100644
--- a/ui/aura/window_port_for_shutdown.cc
+++ b/ui/aura/window_port_for_shutdown.cc
@@ -59,6 +59,15 @@
 
 void WindowPortForShutdown::AllocateLocalSurfaceId() {}
 
+bool WindowPortForShutdown::IsLocalSurfaceIdAllocationSuppressed() const {
+  return false;
+}
+
+viz::ScopedSurfaceIdAllocator WindowPortForShutdown::GetSurfaceIdAllocator(
+    base::OnceCallback<void()> allocation_task) {
+  return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
+}
+
 const viz::LocalSurfaceId& WindowPortForShutdown::GetLocalSurfaceId() {
   return local_surface_id_;
 }
diff --git a/ui/aura/window_port_for_shutdown.h b/ui/aura/window_port_for_shutdown.h
index e3d97a5..2027fcc 100644
--- a/ui/aura/window_port_for_shutdown.h
+++ b/ui/aura/window_port_for_shutdown.h
@@ -40,6 +40,9 @@
                          std::unique_ptr<ui::PropertyData> data) override;
   std::unique_ptr<cc::LayerTreeFrameSink> CreateLayerTreeFrameSink() override;
   void AllocateLocalSurfaceId() override;
+  bool IsLocalSurfaceIdAllocationSuppressed() const override;
+  viz::ScopedSurfaceIdAllocator GetSurfaceIdAllocator(
+      base::OnceCallback<void()> allocation_task) override;
   const viz::LocalSurfaceId& GetLocalSurfaceId() override;
   void OnEventTargetingPolicyChanged() override;
   bool ShouldRestackTransientChildren() override;
diff --git a/ui/base/clipboard/clipboard_mac_unittest.mm b/ui/base/clipboard/clipboard_mac_unittest.mm
index 475db13..9367e97 100644
--- a/ui/base/clipboard/clipboard_mac_unittest.mm
+++ b/ui/base/clipboard/clipboard_mac_unittest.mm
@@ -58,7 +58,12 @@
   }
 };
 
-TEST_F(ClipboardMacTest, ReadImageRetina) {
+#if defined(MEMORY_SANITIZER)
+#define MAYBE_ReadImageRetina DISABLED_ReadImageRetina
+#else
+#define MAYBE_ReadImageRetina ReadImageRetina
+#endif
+TEST_F(ClipboardMacTest, MAYBE_ReadImageRetina) {
   int32_t width = 99;
   int32_t height = 101;
   scoped_refptr<ui::UniquePasteboard> pasteboard = new ui::UniquePasteboard;
@@ -74,7 +79,12 @@
   EXPECT_EQ(2 * height, bitmap.height());
 }
 
-TEST_F(ClipboardMacTest, ReadImageNonRetina) {
+#if defined(MEMORY_SANITIZER)
+#define MAYBE_ReadImageNonRetina DISABLED_ReadImageNonRetina
+#else
+#define MAYBE_ReadImageNonRetina ReadImageNonRetina
+#endif
+TEST_F(ClipboardMacTest, MAYBE_ReadImageNonRetina) {
   int32_t width = 99;
   int32_t height = 101;
   scoped_refptr<ui::UniquePasteboard> pasteboard = new ui::UniquePasteboard;
diff --git a/ui/base/test/ui_controls.h b/ui/base/test/ui_controls.h
index 462ffa5d..6715c823f 100644
--- a/ui/base/test/ui_controls.h
+++ b/ui/base/test/ui_controls.h
@@ -106,11 +106,6 @@
 bool SendTouchEvents(int action, int num, int screen_x, int screen_y);
 #endif
 
-#if defined(TOOLKIT_VIEWS)
-// Runs |closure| after processing all pending ui events.
-void RunClosureAfterAllPendingUIEvents(const base::Closure& closure);
-#endif
-
 #if defined(USE_AURA)
 class UIControlsAura;
 void InstallUIControlsAura(UIControlsAura* instance);
diff --git a/ui/base/test/ui_controls_aura.cc b/ui/base/test/ui_controls_aura.cc
index 98fac1b..512e440 100644
--- a/ui/base/test/ui_controls_aura.cc
+++ b/ui/base/test/ui_controls_aura.cc
@@ -83,11 +83,6 @@
 }
 #endif
 
-// static
-void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
-  instance_->RunClosureAfterAllPendingUIEvents(closure);
-}
-
 UIControlsAura::UIControlsAura() {
 }
 
diff --git a/ui/base/test/ui_controls_aura.h b/ui/base/test/ui_controls_aura.h
index 178b5db2..08fad638 100644
--- a/ui/base/test/ui_controls_aura.h
+++ b/ui/base/test/ui_controls_aura.h
@@ -50,10 +50,6 @@
 #if defined(OS_WIN)
   virtual bool SendTouchEvents(int action, int num, int x, int y) = 0;
 #endif
-
-  // Runs |closure| after processing all pending ui events.
-  virtual void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) = 0;
 };
 
 }  // namespace ui_controls
diff --git a/ui/base/test/ui_controls_internal_win.cc b/ui/base/test/ui_controls_internal_win.cc
index 511c47d..143e7fc 100644
--- a/ui/base/test/ui_controls_internal_win.cc
+++ b/ui/base/test/ui_controls_internal_win.cc
@@ -229,6 +229,17 @@
           << "); check the math in SendMouseMoveImpl.";
     }
     MatchingMessageFound();
+  } else if ((message_waiting_for_ == WM_LBUTTONDOWN &&
+              mouse_message == WM_LBUTTONDBLCLK) ||
+             (message_waiting_for_ == WM_MBUTTONDOWN &&
+              mouse_message == WM_MBUTTONDBLCLK) ||
+             (message_waiting_for_ == WM_RBUTTONDOWN &&
+              mouse_message == WM_RBUTTONDBLCLK)) {
+    LOG(WARNING) << "Double click event being treated as single-click. "
+                 << "This may result in different event processing behavior. "
+                 << "If you need a single click try moving the mouse between "
+                 << "down events.";
+    MatchingMessageFound();
   }
 }
 
diff --git a/ui/base/test/ui_controls_mac.mm b/ui/base/test/ui_controls_mac.mm
index c0af690..ecfbb91 100644
--- a/ui/base/test/ui_controls_mac.mm
+++ b/ui/base/test/ui_controls_mac.mm
@@ -407,11 +407,6 @@
   return SendMouseEventsNotifyWhenDone(type, UP|DOWN, base::Closure());
 }
 
-void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
-  base::ThreadTaskRunnerHandle::Get()->PostTask(
-      FROM_HERE, base::Bind(&EventQueueWatcher, closure));
-}
-
 bool IsFullKeyboardAccessEnabled() {
   return [NSApp isFullKeyboardAccessEnabled];
 }
diff --git a/ui/base/test/ui_controls_win.cc b/ui/base/test/ui_controls_win.cc
index feef4f8..f9f6bf9 100644
--- a/ui/base/test/ui_controls_win.cc
+++ b/ui/base/test/ui_controls_win.cc
@@ -71,9 +71,4 @@
   return internal::SendTouchEventsImpl(action, num, x, y);
 }
 
-void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
-  // On windows, posting UI events is synchronous so just post the closure.
-  base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure);
-}
-
 }  // namespace ui_controls
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc
index ce35f75..34c5ff8 100644
--- a/ui/events/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/events/keycodes/keyboard_code_conversion_x.cc
@@ -25,9 +25,83 @@
 namespace {
 
 // MAP0 - MAP3:
-// These are the generated VKEY code maps for all possible Latin keyboard
-// layouts in Windows. And the maps are only for special letter keys excluding
-// [a-z] & [0-9].
+// These are the generated VKEY code maps from these layout datas on Windows:
+//   KBDA1.DLL
+//   KBDAL.DLL
+//   KBDARME.DLL
+//   KBDARMW.DLL
+//   KBDAZEL.DLL
+//   KBDBE.DLL
+//   KBDBENE.DLL
+//   KBDBR.DLL
+//   KBDCA.DLL
+//   KBDCAN.DLL
+//   KBDCR.DLL
+//   KBDCZ.DLL
+//   KBDCZ1.DLL
+//   KBDCZ2.DLL
+//   KBDDA.DLL
+//   KBDDV.DLL
+//   KBDES.DLL
+//   KBDEST.DLL
+//   KBDFC.DLL
+//   KBDFI.DLL
+//   KBDFI1.DLL
+//   KBDFO.DLL
+//   KBDFR.DLL
+//   KBDHEB.DLL
+//   KBDGAE.DLL
+//   KBDGEO.DLL
+//   kbdgeoer.dll
+//   kbdgeoqw.dll
+//   KBDGR.DLL
+//   KBDGR1.DLL
+//   KBDGRLND.DLL
+//   KBDHAU.DLL
+//   KBDHU.DLL
+//   KBDHU1.DLL
+//   KBDIBO.DLL
+//   KBDIC.DLL
+//   KBDIR.DLL
+//   KBDIT.DLL
+//   KBDIT142.DLL
+//   KBDLA.DLL
+//   KBDLT.DLL
+//   KBDLT1.DLL
+//   KBDLT2.DLL
+//   KBDLV.DLL
+//   KBDLV1.DLL
+//   KBDMLT47.DLL
+//   KBDMLT48.DLL
+//   KBDNE.DLL
+//   KBDNO.DLL
+//   KBDNO1.DLL
+//   KBDPL.DLL
+//   KBDPL1.DLL
+//   KBDPO.DLL
+//   KBDRO.DLL
+//   KBDROPR.DLL
+//   KBDROST.DLL
+//   KBDRU.DLL
+//   KBDSF.DLL
+//   KBDSG.DLL
+//   KBDSL.DLL
+//   KBDSL1.DLL
+//   KBDSOREX.DLL
+//   KBDSORS1.DLL
+//   KBDSORST.DLL
+//   KBDSP.DLL
+//   KBDSW.DLL
+//   KBDSW09.DLL
+//   KBDUK.DLL
+//   KBDUKX.DLL
+//   KBDUS.DLL
+//   KBDUSL.DLL
+//   KBDUSR.DLL
+//   KBDUSX.DLL
+//   KBDVNTC.DLL
+//   KBDYBA.DLL
+// And the maps are only for special letter keys excluding [a-z] & [0-9].
 //
 // ch0: the keysym without modifier states.
 // ch1: the keysym with shift state.
@@ -122,179 +196,183 @@
     return m1.ch0 < m2.ch0;
   }
 } map1[] = {
-      {0x0021, 0x0A, 0x31},  // XK_exclam+AE01: VKEY_1
-      {0x0021, 0x11, 0x38},  // XK_exclam+AE08: VKEY_8
-      {0x0021, 0x3D, 0xDF},  // XK_exclam+AB10: VKEY_OEM_8
-      {0x0022, 0x0B, 0x32},  // XK_quotedbl+AE02: VKEY_2
-      {0x0022, 0x0C, 0x33},  // XK_quotedbl+AE03: VKEY_3
-      {0x0023, 0x31, 0xDE},  // XK_numbersign+TLDE: VKEY_OEM_7
-      {0x0024, 0x23, 0xBA},  // XK_dollar+AD12: VKEY_OEM_1
-      {0x0024, 0x33, 0xDF},  // XK_dollar+BKSL: VKEY_OEM_8
-      {0x0027, 0x0D, 0x34},  // XK_quoteright+AE04: VKEY_4
-      {0x0027, 0x18, 0xDE},  // XK_quoteright+AD01: VKEY_OEM_7
-      {0x0027, 0x23, 0xBA},  // XK_quoteright+AD12: VKEY_OEM_1
-      {0x0027, 0x3D, 0xDE},  // XK_quoteright+AB10: VKEY_OEM_7
-      {0x0028, 0x0E, 0x35},  // XK_parenleft+AE05: VKEY_5
-      {0x0028, 0x12, 0x39},  // XK_parenleft+AE09: VKEY_9
-      {0x0028, 0x33, 0xDC},  // XK_parenleft+BKSL: VKEY_OEM_5
-      {0x0029, 0x13, 0x30},  // XK_parenright+AE10: VKEY_0
-      {0x0029, 0x14, 0xDB},  // XK_parenright+AE11: VKEY_OEM_4
-      {0x0029, 0x23, 0xDD},  // XK_parenright+AD12: VKEY_OEM_6
-      {0x002A, 0x23, 0xBA},  // XK_asterisk+AD12: VKEY_OEM_1
-      {0x002A, 0x33, 0xDC},  // XK_asterisk+BKSL: VKEY_OEM_5
-      {0x002B, 0x0A, 0x31},  // XK_plus+AE01: VKEY_1
-      {0x002B, 0x15, 0xBB},  // XK_plus+AE12: VKEY_OEM_PLUS
-      {0x002B, 0x22, 0xBB},  // XK_plus+AD11: VKEY_OEM_PLUS
-      {0x002B, 0x23, 0xBB},  // XK_plus+AD12: VKEY_OEM_PLUS
-      {0x002B, 0x2F, 0xBB},  // XK_plus+AC10: VKEY_OEM_PLUS
-      {0x002B, 0x33, 0xBF},  // XK_plus+BKSL: VKEY_OEM_2
-      {0x002C, 0x0C, 0x33},  // XK_comma+AE03: VKEY_3
-      {0x002C, 0x0E, 0x35},  // XK_comma+AE05: VKEY_5
-      {0x002C, 0x0F, 0x36},  // XK_comma+AE06: VKEY_6
-      {0x002C, 0x12, 0x39},  // XK_comma+AE09: VKEY_9
-      {0x002C, 0x19, 0xBC},  // XK_comma+AD02: VKEY_OEM_COMMA
-      {0x002C, 0x37, 0xBC},  // XK_comma+AB04: VKEY_OEM_COMMA
-      {0x002C, 0x3A, 0xBC},  // XK_comma+AB07: VKEY_OEM_COMMA
-      {0x002C, 0x3B, 0xBC},  // XK_comma+AB08: VKEY_OEM_COMMA
-      {0x002D, 0x0B, 0x32},  // XK_minus+AE02: VKEY_2
-      {0x002D, 0x0F, 0x36},  // XK_minus+AE06: VKEY_6
-      {0x002D, 0x14, 0xBD},  // XK_minus+AE11: VKEY_OEM_MINUS
-      {0x002D, 0x26, 0xBD},  // XK_minus+AC01: VKEY_OEM_MINUS
-      {0x002D, 0x30, 0xBD},  // XK_minus+AC11: VKEY_OEM_MINUS
-      {0x002E, 0x10, 0x37},  // XK_period+AE07: VKEY_7
-      {0x002E, 0x11, 0x38},  // XK_period+AE08: VKEY_8
-      {0x002E, 0x1A, 0xBE},  // XK_period+AD03: VKEY_OEM_PERIOD
-      {0x002E, 0x1B, 0xBE},  // XK_period+AD04: VKEY_OEM_PERIOD
-      {0x002E, 0x20, 0xBE},  // XK_period+AD09: VKEY_OEM_PERIOD
-      {0x002E, 0x30, 0xDE},  // XK_period+AC11: VKEY_OEM_7
-      {0x002E, 0x3C, 0xBE},  // XK_period+AB09: VKEY_OEM_PERIOD
-      {0x002E, 0x3D, 0xBF},  // XK_period+AB10: VKEY_OEM_2
-      {0x002F, 0x14, 0xDB},  // XK_slash+AE11: VKEY_OEM_4
-      {0x002F, 0x22, 0xBF},  // XK_slash+AD11: VKEY_OEM_2
-      {0x002F, 0x31, 0xDE},  // XK_slash+TLDE: VKEY_OEM_7
-      {0x002F, 0x33, 0xDC},  // XK_slash+BKSL: VKEY_OEM_5
-      {0x002F, 0x3D, 0xBF},  // XK_slash+AB10: VKEY_OEM_2
-      {0x003A, 0x0A, 0x31},  // XK_colon+AE01: VKEY_1
-      {0x003A, 0x0E, 0x35},  // XK_colon+AE05: VKEY_5
-      {0x003A, 0x0F, 0x36},  // XK_colon+AE06: VKEY_6
-      {0x003A, 0x3C, 0xBF},  // XK_colon+AB09: VKEY_OEM_2
-      {0x003B, 0x0D, 0x34},  // XK_semicolon+AE04: VKEY_4
-      {0x003B, 0x11, 0x38},  // XK_semicolon+AE08: VKEY_8
-      {0x003B, 0x18, 0xBA},  // XK_semicolon+AD01: VKEY_OEM_1
-      {0x003B, 0x22, 0xBA},  // XK_semicolon+AD11: VKEY_OEM_1
-      {0x003B, 0x23, 0xDD},  // XK_semicolon+AD12: VKEY_OEM_6
-      {0x003B, 0x2F, 0xBA},  // XK_semicolon+AC10: VKEY_OEM_1
-      {0x003B, 0x31, 0xC0},  // XK_semicolon+TLDE: VKEY_OEM_3
-      {0x003B, 0x34, 0xBA},  // XK_semicolon+AB01: VKEY_OEM_1
-      {0x003B, 0x3B, 0xBE},  // XK_semicolon+AB08: VKEY_OEM_PERIOD
-      {0x003B, 0x3D, 0xBF},  // XK_semicolon+AB10: VKEY_OEM_2
-      {0x003D, 0x11, 0x38},  // XK_equal+AE08: VKEY_8
-      {0x003D, 0x15, 0xBB},  // XK_equal+AE12: VKEY_OEM_PLUS
-      {0x003D, 0x23, 0xBB},  // XK_equal+AD12: VKEY_OEM_PLUS
-      {0x003F, 0x0B, 0x32},  // XK_question+AE02: VKEY_2
-      {0x003F, 0x10, 0x37},  // XK_question+AE07: VKEY_7
-      {0x003F, 0x11, 0x38},  // XK_question+AE08: VKEY_8
-      {0x003F, 0x14, 0xBB},  // XK_question+AE11: VKEY_OEM_PLUS
-      {0x0040, 0x23, 0xDD},  // XK_at+AD12: VKEY_OEM_6
-      {0x0040, 0x31, 0xDE},  // XK_at+TLDE: VKEY_OEM_7
-      {0x005B, 0x0A, 0xDB},  // XK_bracketleft+AE01: VKEY_OEM_4
-      {0x005B, 0x14, 0xDB},  // XK_bracketleft+AE11: VKEY_OEM_4
-      {0x005B, 0x22, 0xDB},  // XK_bracketleft+AD11: VKEY_OEM_4
-      {0x005B, 0x23, 0xDD},  // XK_bracketleft+AD12: VKEY_OEM_6
-      {0x005B, 0x30, 0xDE},  // XK_bracketleft+AC11: VKEY_OEM_7
-      {0x005C, 0x15, 0xDB},  // XK_backslash+AE12: VKEY_OEM_4
-      {0x005D, 0x0B, 0xDD},  // XK_bracketright+AE02: VKEY_OEM_6
-      {0x005D, 0x15, 0xDD},  // XK_bracketright+AE12: VKEY_OEM_6
-      {0x005D, 0x23, 0xDD},  // XK_bracketright+AD12: VKEY_OEM_6
-      {0x005D, 0x31, 0xC0},  // XK_bracketright+TLDE: VKEY_OEM_3
-      {0x005D, 0x33, 0xDC},  // XK_bracketright+BKSL: VKEY_OEM_5
-      {0x005F, 0x11, 0x38},  // XK_underscore+AE08: VKEY_8
-      {0x005F, 0x14, 0xBD},  // XK_underscore+AE11: VKEY_OEM_MINUS
-      {0x00A7, 0x0D, 0x34},  // XK_section+AE04: VKEY_4
-      {0x00A7, 0x0F, 0x36},  // XK_section+AE06: VKEY_6
-      {0x00A7, 0x30, 0xDE},  // XK_section+AC11: VKEY_OEM_7
-      {0x00AB, 0x11, 0x38},  // XK_guillemotleft+AE08: VKEY_8
-      {0x00AB, 0x15, 0xDD},  // XK_guillemotleft+AE12: VKEY_OEM_6
-      {0x00B0, 0x15, 0xBF},  // XK_degree+AE12: VKEY_OEM_2
-      {0x00B0, 0x31, 0xDE},  // XK_degree+TLDE: VKEY_OEM_7
-      {0x00BA, 0x30, 0xDE},  // XK_masculine+AC11: VKEY_OEM_7
-      {0x00BA, 0x31, 0xDC},  // XK_masculine+TLDE: VKEY_OEM_5
-      {0x00E0, 0x13, 0x30},  // XK_agrave+AE10: VKEY_0
-      {0x00E0, 0x33, 0xDC},  // XK_agrave+BKSL: VKEY_OEM_5
-      {0x00E1, 0x11, 0x38},  // XK_aacute+AE08: VKEY_8
-      {0x00E1, 0x30, 0xDE},  // XK_aacute+AC11: VKEY_OEM_7
-      {0x00E2, 0x0B, 0x32},  // XK_acircumflex+AE02: VKEY_2
-      {0x00E2, 0x33, 0xDC},  // XK_acircumflex+BKSL: VKEY_OEM_5
-      {0x00E4, 0x23, 0xDD},  // XK_adiaeresis+AD12: VKEY_OEM_6
-      {0x00E6, 0x2F, 0xC0},  // XK_ae+AC10: VKEY_OEM_3
-      {0x00E6, 0x30, 0xDE},  // XK_ae+AC11: VKEY_OEM_7
-      {0x00E7, 0x12, 0x39},  // XK_ccedilla+AE09: VKEY_9
-      {0x00E7, 0x22, 0xDB},  // XK_ccedilla+AD11: VKEY_OEM_4
-      {0x00E7, 0x23, 0xDD},  // XK_ccedilla+AD12: VKEY_OEM_6
-      {0x00E7, 0x30, 0xDE},  // XK_ccedilla+AC11: VKEY_OEM_7
-      {0x00E7, 0x33, 0xBF},  // XK_ccedilla+BKSL: VKEY_OEM_2
-      {0x00E7, 0x3B, 0xBC},  // XK_ccedilla+AB08: VKEY_OEM_COMMA
-      {0x00E8, 0x10, 0x37},  // XK_egrave+AE07: VKEY_7
-      {0x00E8, 0x22, 0xBA},  // XK_egrave+AD11: VKEY_OEM_1
-      {0x00E8, 0x30, 0xC0},  // XK_egrave+AC11: VKEY_OEM_3
-      {0x00E9, 0x0B, 0x32},  // XK_eacute+AE02: VKEY_2
-      {0x00E9, 0x13, 0x30},  // XK_eacute+AE10: VKEY_0
-      {0x00E9, 0x3D, 0xBF},  // XK_eacute+AB10: VKEY_OEM_2
-      {0x00ED, 0x12, 0x39},  // XK_iacute+AE09: VKEY_9
-      {0x00ED, 0x31, 0x30},  // XK_iacute+TLDE: VKEY_0
-      {0x00F0, 0x22, 0xDD},  // XK_eth+AD11: VKEY_OEM_6
-      {0x00F0, 0x23, 0xBA},  // XK_eth+AD12: VKEY_OEM_1
-      {0x00F3, 0x15, 0xBB},  // XK_oacute+AE12: VKEY_OEM_PLUS
-      {0x00F3, 0x33, 0xDC},  // XK_oacute+BKSL: VKEY_OEM_5
-      {0x00F4, 0x0D, 0x34},  // XK_ocircumflex+AE04: VKEY_4
-      {0x00F4, 0x2F, 0xBA},  // XK_ocircumflex+AC10: VKEY_OEM_1
-      {0x00F6, 0x13, 0xC0},  // XK_odiaeresis+AE10: VKEY_OEM_3
-      {0x00F6, 0x14, 0xBB},  // XK_odiaeresis+AE11: VKEY_OEM_PLUS
-      {0x00F6, 0x22, 0xDB},  // XK_odiaeresis+AD11: VKEY_OEM_4
-      {0x00F8, 0x2F, 0xC0},  // XK_oslash+AC10: VKEY_OEM_3
-      {0x00F8, 0x30, 0xDE},  // XK_oslash+AC11: VKEY_OEM_7
-      {0x00F9, 0x30, 0xC0},  // XK_ugrave+AC11: VKEY_OEM_3
-      {0x00F9, 0x33, 0xBF},  // XK_ugrave+BKSL: VKEY_OEM_2
-      {0x00FA, 0x22, 0xDB},  // XK_uacute+AD11: VKEY_OEM_4
-      {0x00FA, 0x23, 0xDD},  // XK_uacute+AD12: VKEY_OEM_6
-      {0x00FC, 0x19, 0x57},  // XK_udiaeresis+AD02: VKEY_W
-      {0x01B1, 0x0A, 0x31},  // XK_aogonek+AE01: VKEY_1
-      {0x01B1, 0x18, 0x51},  // XK_aogonek+AD01: VKEY_Q
-      {0x01B1, 0x30, 0xDE},  // XK_aogonek+AC11: VKEY_OEM_7
-      {0x01B3, 0x2F, 0xBA},  // XK_lstroke+AC10: VKEY_OEM_1
-      {0x01B3, 0x33, 0xBF},  // XK_lstroke+BKSL: VKEY_OEM_2
-      {0x01B9, 0x0C, 0x33},  // XK_scaron+AE03: VKEY_3
-      {0x01B9, 0x0F, 0x36},  // XK_scaron+AE06: VKEY_6
-      {0x01B9, 0x22, 0xDB},  // XK_scaron+AD11: VKEY_OEM_4
-      {0x01B9, 0x26, 0xBA},  // XK_scaron+AC01: VKEY_OEM_1
-      {0x01B9, 0x29, 0x46},  // XK_scaron+AC04: VKEY_F
-      {0x01B9, 0x3C, 0xBE},  // XK_scaron+AB09: VKEY_OEM_PERIOD
-      {0x01BA, 0x2F, 0xBA},  // XK_scedilla+AC10: VKEY_OEM_1
-      {0x01BA, 0x3C, 0xBE},  // XK_scedilla+AB09: VKEY_OEM_PERIOD
-      {0x01BE, 0x0F, 0x36},  // XK_zcaron+AE06: VKEY_6
-      {0x01BE, 0x15, 0xBB},  // XK_zcaron+AE12: VKEY_OEM_PLUS
-      {0x01BE, 0x19, 0x57},  // XK_zcaron+AD02: VKEY_W
-      {0x01BE, 0x22, 0x59},  // XK_zcaron+AD11: VKEY_Y
-      {0x01BE, 0x33, 0xDC},  // XK_zcaron+BKSL: VKEY_OEM_5
-      {0x01BF, 0x22, 0xDB},  // XK_zabovedot+AD11: VKEY_OEM_4
-      {0x01BF, 0x33, 0xDC},  // XK_zabovedot+BKSL: VKEY_OEM_5
-      {0x01E3, 0x0A, 0x31},  // XK_abreve+AE01: VKEY_1
-      {0x01E3, 0x22, 0xDB},  // XK_abreve+AD11: VKEY_OEM_4
-      {0x01E8, 0x0B, 0x32},  // XK_ccaron+AE02: VKEY_2
-      {0x01E8, 0x0D, 0x34},  // XK_ccaron+AE04: VKEY_4
-      {0x01E8, 0x21, 0x58},  // XK_ccaron+AD10: VKEY_X
-      {0x01E8, 0x2F, 0xBA},  // XK_ccaron+AC10: VKEY_OEM_1
-      {0x01E8, 0x3B, 0xBC},  // XK_ccaron+AB08: VKEY_OEM_COMMA
-      {0x01EA, 0x0C, 0x33},  // XK_eogonek+AE03: VKEY_3
-      {0x01F0, 0x13, 0x30},  // XK_dstroke+AE10: VKEY_0
-      {0x01F0, 0x23, 0xDD},  // XK_dstroke+AD12: VKEY_OEM_6
-      {0x03E7, 0x0E, 0x35},  // XK_iogonek+AE05: VKEY_5
-      {0x03EC, 0x0D, 0x34},  // XK_eabovedot+AE04: VKEY_4
-      {0x03EC, 0x30, 0xDE},  // XK_eabovedot+AC11: VKEY_OEM_7
-      {0x03F9, 0x10, 0x37},  // XK_uogonek+AE07: VKEY_7
-      {0x03FE, 0x11, 0x38},  // XK_umacron+AE08: VKEY_8
-      {0x03FE, 0x18, 0x51},  // XK_umacron+AD01: VKEY_Q
-      {0x03FE, 0x35, 0x58},  // XK_umacron+AB02: VKEY_X
+    {0x0021, 0x0A, 0x31},  // XK_exclam+AE01: VKEY_1
+    {0x0021, 0x11, 0x38},  // XK_exclam+AE08: VKEY_8
+    {0x0021, 0x3D, 0xDF},  // XK_exclam+AB10: VKEY_OEM_8
+    {0x0022, 0x0B, 0x32},  // XK_quotedbl+AE02: VKEY_2
+    {0x0022, 0x0C, 0x33},  // XK_quotedbl+AE03: VKEY_3
+    {0x0023, 0x31, 0xDE},  // XK_numbersign+TLDE: VKEY_OEM_7
+    {0x0024, 0x23, 0xBA},  // XK_dollar+AD12: VKEY_OEM_1
+    {0x0024, 0x33, 0xDF},  // XK_dollar+BKSL: VKEY_OEM_8
+    {0x0027, 0x0D, 0x34},  // XK_quoteright+AE04: VKEY_4
+    {0x0027, 0x18, 0xDE},  // XK_quoteright+AD01: VKEY_OEM_7
+    {0x0027, 0x19, 0x57},  // XK_quoteright+AD02: VKEY_W
+    {0x0027, 0x23, 0xBA},  // XK_quoteright+AD12: VKEY_OEM_1
+    {0x0027, 0x3D, 0xDE},  // XK_quoteright+AB10: VKEY_OEM_7
+    {0x0028, 0x0E, 0x35},  // XK_parenleft+AE05: VKEY_5
+    {0x0028, 0x12, 0x39},  // XK_parenleft+AE09: VKEY_9
+    {0x0028, 0x33, 0xDC},  // XK_parenleft+BKSL: VKEY_OEM_5
+    {0x0029, 0x13, 0x30},  // XK_parenright+AE10: VKEY_0
+    {0x0029, 0x14, 0xDB},  // XK_parenright+AE11: VKEY_OEM_4
+    {0x0029, 0x23, 0xDD},  // XK_parenright+AD12: VKEY_OEM_6
+    {0x002A, 0x23, 0xBA},  // XK_asterisk+AD12: VKEY_OEM_1
+    {0x002A, 0x33, 0xDC},  // XK_asterisk+BKSL: VKEY_OEM_5
+    {0x002B, 0x0A, 0x31},  // XK_plus+AE01: VKEY_1
+    {0x002B, 0x15, 0xBB},  // XK_plus+AE12: VKEY_OEM_PLUS
+    {0x002B, 0x22, 0xBB},  // XK_plus+AD11: VKEY_OEM_PLUS
+    {0x002B, 0x23, 0xBB},  // XK_plus+AD12: VKEY_OEM_PLUS
+    {0x002B, 0x2F, 0xBB},  // XK_plus+AC10: VKEY_OEM_PLUS
+    {0x002B, 0x33, 0xBF},  // XK_plus+BKSL: VKEY_OEM_2
+    {0x002C, 0x0C, 0x33},  // XK_comma+AE03: VKEY_3
+    {0x002C, 0x0E, 0x35},  // XK_comma+AE05: VKEY_5
+    {0x002C, 0x0F, 0x36},  // XK_comma+AE06: VKEY_6
+    {0x002C, 0x12, 0x39},  // XK_comma+AE09: VKEY_9
+    {0x002C, 0x19, 0xBC},  // XK_comma+AD02: VKEY_OEM_COMMA
+    {0x002C, 0x30, 0xDE},  // XK_comma+AC11: VKEY_OEM_7
+    {0x002C, 0x37, 0xBC},  // XK_comma+AB04: VKEY_OEM_COMMA
+    {0x002C, 0x3A, 0xBC},  // XK_comma+AB07: VKEY_OEM_COMMA
+    {0x002C, 0x3B, 0xBC},  // XK_comma+AB08: VKEY_OEM_COMMA
+    {0x002D, 0x0B, 0x32},  // XK_minus+AE02: VKEY_2
+    {0x002D, 0x0F, 0x36},  // XK_minus+AE06: VKEY_6
+    {0x002D, 0x14, 0xBD},  // XK_minus+AE11: VKEY_OEM_MINUS
+    {0x002D, 0x26, 0xBD},  // XK_minus+AC01: VKEY_OEM_MINUS
+    {0x002D, 0x30, 0xBD},  // XK_minus+AC11: VKEY_OEM_MINUS
+    {0x002E, 0x10, 0x37},  // XK_period+AE07: VKEY_7
+    {0x002E, 0x11, 0x38},  // XK_period+AE08: VKEY_8
+    {0x002E, 0x1A, 0xBE},  // XK_period+AD03: VKEY_OEM_PERIOD
+    {0x002E, 0x1B, 0xBE},  // XK_period+AD04: VKEY_OEM_PERIOD
+    {0x002E, 0x20, 0xBE},  // XK_period+AD09: VKEY_OEM_PERIOD
+    {0x002E, 0x30, 0xDE},  // XK_period+AC11: VKEY_OEM_7
+    {0x002E, 0x3C, 0xBE},  // XK_period+AB09: VKEY_OEM_PERIOD
+    {0x002E, 0x3D, 0xBF},  // XK_period+AB10: VKEY_OEM_2
+    {0x002F, 0x14, 0xDB},  // XK_slash+AE11: VKEY_OEM_4
+    {0x002F, 0x18, 0x51},  // XK_slash+AD01: VKEY_Q
+    {0x002F, 0x22, 0xBF},  // XK_slash+AD11: VKEY_OEM_2
+    {0x002F, 0x31, 0xDE},  // XK_slash+TLDE: VKEY_OEM_7
+    {0x002F, 0x33, 0xDC},  // XK_slash+BKSL: VKEY_OEM_5
+    {0x002F, 0x3D, 0xBF},  // XK_slash+AB10: VKEY_OEM_2
+    {0x003A, 0x0A, 0x31},  // XK_colon+AE01: VKEY_1
+    {0x003A, 0x0E, 0x35},  // XK_colon+AE05: VKEY_5
+    {0x003A, 0x0F, 0x36},  // XK_colon+AE06: VKEY_6
+    {0x003A, 0x3C, 0xBF},  // XK_colon+AB09: VKEY_OEM_2
+    {0x003B, 0x0D, 0x34},  // XK_semicolon+AE04: VKEY_4
+    {0x003B, 0x11, 0x38},  // XK_semicolon+AE08: VKEY_8
+    {0x003B, 0x18, 0xBA},  // XK_semicolon+AD01: VKEY_OEM_1
+    {0x003B, 0x22, 0xBA},  // XK_semicolon+AD11: VKEY_OEM_1
+    {0x003B, 0x23, 0xDD},  // XK_semicolon+AD12: VKEY_OEM_6
+    {0x003B, 0x2F, 0xBA},  // XK_semicolon+AC10: VKEY_OEM_1
+    {0x003B, 0x31, 0xC0},  // XK_semicolon+TLDE: VKEY_OEM_3
+    {0x003B, 0x34, 0xBA},  // XK_semicolon+AB01: VKEY_OEM_1
+    {0x003B, 0x3B, 0xBE},  // XK_semicolon+AB08: VKEY_OEM_PERIOD
+    {0x003B, 0x3D, 0xBF},  // XK_semicolon+AB10: VKEY_OEM_2
+    {0x003D, 0x11, 0x38},  // XK_equal+AE08: VKEY_8
+    {0x003D, 0x15, 0xBB},  // XK_equal+AE12: VKEY_OEM_PLUS
+    {0x003D, 0x23, 0xBB},  // XK_equal+AD12: VKEY_OEM_PLUS
+    {0x003F, 0x0B, 0x32},  // XK_question+AE02: VKEY_2
+    {0x003F, 0x10, 0x37},  // XK_question+AE07: VKEY_7
+    {0x003F, 0x11, 0x38},  // XK_question+AE08: VKEY_8
+    {0x003F, 0x14, 0xBB},  // XK_question+AE11: VKEY_OEM_PLUS
+    {0x0040, 0x23, 0xDD},  // XK_at+AD12: VKEY_OEM_6
+    {0x0040, 0x31, 0xDE},  // XK_at+TLDE: VKEY_OEM_7
+    {0x005B, 0x0A, 0xDB},  // XK_bracketleft+AE01: VKEY_OEM_4
+    {0x005B, 0x14, 0xDB},  // XK_bracketleft+AE11: VKEY_OEM_4
+    {0x005B, 0x22, 0xDB},  // XK_bracketleft+AD11: VKEY_OEM_4
+    {0x005B, 0x23, 0xDD},  // XK_bracketleft+AD12: VKEY_OEM_6
+    {0x005B, 0x30, 0xDE},  // XK_bracketleft+AC11: VKEY_OEM_7
+    {0x005C, 0x15, 0xDB},  // XK_backslash+AE12: VKEY_OEM_4
+    {0x005D, 0x0B, 0xDD},  // XK_bracketright+AE02: VKEY_OEM_6
+    {0x005D, 0x15, 0xDD},  // XK_bracketright+AE12: VKEY_OEM_6
+    {0x005D, 0x22, 0xDB},  // XK_bracketright+AD11: VKEY_OEM_4
+    {0x005D, 0x23, 0xDD},  // XK_bracketright+AD12: VKEY_OEM_6
+    {0x005D, 0x31, 0xC0},  // XK_bracketright+TLDE: VKEY_OEM_3
+    {0x005D, 0x33, 0xDC},  // XK_bracketright+BKSL: VKEY_OEM_5
+    {0x005F, 0x11, 0x38},  // XK_underscore+AE08: VKEY_8
+    {0x005F, 0x14, 0xBD},  // XK_underscore+AE11: VKEY_OEM_MINUS
+    {0x00A7, 0x0D, 0x34},  // XK_section+AE04: VKEY_4
+    {0x00A7, 0x0F, 0x36},  // XK_section+AE06: VKEY_6
+    {0x00A7, 0x30, 0xDE},  // XK_section+AC11: VKEY_OEM_7
+    {0x00AB, 0x11, 0x38},  // XK_guillemotleft+AE08: VKEY_8
+    {0x00AB, 0x15, 0xDD},  // XK_guillemotleft+AE12: VKEY_OEM_6
+    {0x00B0, 0x15, 0xBF},  // XK_degree+AE12: VKEY_OEM_2
+    {0x00B0, 0x31, 0xDE},  // XK_degree+TLDE: VKEY_OEM_7
+    {0x00BA, 0x30, 0xDE},  // XK_masculine+AC11: VKEY_OEM_7
+    {0x00BA, 0x31, 0xDC},  // XK_masculine+TLDE: VKEY_OEM_5
+    {0x00E0, 0x13, 0x30},  // XK_agrave+AE10: VKEY_0
+    {0x00E0, 0x33, 0xDC},  // XK_agrave+BKSL: VKEY_OEM_5
+    {0x00E1, 0x11, 0x38},  // XK_aacute+AE08: VKEY_8
+    {0x00E1, 0x30, 0xDE},  // XK_aacute+AC11: VKEY_OEM_7
+    {0x00E2, 0x0B, 0x32},  // XK_acircumflex+AE02: VKEY_2
+    {0x00E2, 0x33, 0xDC},  // XK_acircumflex+BKSL: VKEY_OEM_5
+    {0x00E4, 0x23, 0xDD},  // XK_adiaeresis+AD12: VKEY_OEM_6
+    {0x00E6, 0x2F, 0xC0},  // XK_ae+AC10: VKEY_OEM_3
+    {0x00E6, 0x30, 0xDE},  // XK_ae+AC11: VKEY_OEM_7
+    {0x00E7, 0x12, 0x39},  // XK_ccedilla+AE09: VKEY_9
+    {0x00E7, 0x22, 0xDB},  // XK_ccedilla+AD11: VKEY_OEM_4
+    {0x00E7, 0x23, 0xDD},  // XK_ccedilla+AD12: VKEY_OEM_6
+    {0x00E7, 0x30, 0xDE},  // XK_ccedilla+AC11: VKEY_OEM_7
+    {0x00E7, 0x33, 0xBF},  // XK_ccedilla+BKSL: VKEY_OEM_2
+    {0x00E7, 0x3B, 0xBC},  // XK_ccedilla+AB08: VKEY_OEM_COMMA
+    {0x00E8, 0x10, 0x37},  // XK_egrave+AE07: VKEY_7
+    {0x00E8, 0x22, 0xBA},  // XK_egrave+AD11: VKEY_OEM_1
+    {0x00E8, 0x30, 0xC0},  // XK_egrave+AC11: VKEY_OEM_3
+    {0x00E9, 0x0B, 0x32},  // XK_eacute+AE02: VKEY_2
+    {0x00E9, 0x13, 0x30},  // XK_eacute+AE10: VKEY_0
+    {0x00E9, 0x3D, 0xBF},  // XK_eacute+AB10: VKEY_OEM_2
+    {0x00ED, 0x12, 0x39},  // XK_iacute+AE09: VKEY_9
+    {0x00ED, 0x31, 0x30},  // XK_iacute+TLDE: VKEY_0
+    {0x00F0, 0x22, 0xDD},  // XK_eth+AD11: VKEY_OEM_6
+    {0x00F0, 0x23, 0xBA},  // XK_eth+AD12: VKEY_OEM_1
+    {0x00F3, 0x15, 0xBB},  // XK_oacute+AE12: VKEY_OEM_PLUS
+    {0x00F3, 0x33, 0xDC},  // XK_oacute+BKSL: VKEY_OEM_5
+    {0x00F4, 0x0D, 0x34},  // XK_ocircumflex+AE04: VKEY_4
+    {0x00F4, 0x2F, 0xBA},  // XK_ocircumflex+AC10: VKEY_OEM_1
+    {0x00F6, 0x13, 0xC0},  // XK_odiaeresis+AE10: VKEY_OEM_3
+    {0x00F6, 0x14, 0xBB},  // XK_odiaeresis+AE11: VKEY_OEM_PLUS
+    {0x00F6, 0x22, 0xDB},  // XK_odiaeresis+AD11: VKEY_OEM_4
+    {0x00F8, 0x2F, 0xC0},  // XK_oslash+AC10: VKEY_OEM_3
+    {0x00F8, 0x30, 0xDE},  // XK_oslash+AC11: VKEY_OEM_7
+    {0x00F9, 0x30, 0xC0},  // XK_ugrave+AC11: VKEY_OEM_3
+    {0x00F9, 0x33, 0xBF},  // XK_ugrave+BKSL: VKEY_OEM_2
+    {0x00FA, 0x22, 0xDB},  // XK_uacute+AD11: VKEY_OEM_4
+    {0x00FA, 0x23, 0xDD},  // XK_uacute+AD12: VKEY_OEM_6
+    {0x00FC, 0x19, 0x57},  // XK_udiaeresis+AD02: VKEY_W
+    {0x01B1, 0x0A, 0x31},  // XK_aogonek+AE01: VKEY_1
+    {0x01B1, 0x18, 0x51},  // XK_aogonek+AD01: VKEY_Q
+    {0x01B1, 0x30, 0xDE},  // XK_aogonek+AC11: VKEY_OEM_7
+    {0x01B3, 0x2F, 0xBA},  // XK_lstroke+AC10: VKEY_OEM_1
+    {0x01B3, 0x33, 0xBF},  // XK_lstroke+BKSL: VKEY_OEM_2
+    {0x01B9, 0x0C, 0x33},  // XK_scaron+AE03: VKEY_3
+    {0x01B9, 0x0F, 0x36},  // XK_scaron+AE06: VKEY_6
+    {0x01B9, 0x22, 0xDB},  // XK_scaron+AD11: VKEY_OEM_4
+    {0x01B9, 0x26, 0xBA},  // XK_scaron+AC01: VKEY_OEM_1
+    {0x01B9, 0x29, 0x46},  // XK_scaron+AC04: VKEY_F
+    {0x01B9, 0x3C, 0xBE},  // XK_scaron+AB09: VKEY_OEM_PERIOD
+    {0x01BA, 0x2F, 0xBA},  // XK_scedilla+AC10: VKEY_OEM_1
+    {0x01BA, 0x3C, 0xBE},  // XK_scedilla+AB09: VKEY_OEM_PERIOD
+    {0x01BE, 0x0F, 0x36},  // XK_zcaron+AE06: VKEY_6
+    {0x01BE, 0x15, 0xBB},  // XK_zcaron+AE12: VKEY_OEM_PLUS
+    {0x01BE, 0x19, 0x57},  // XK_zcaron+AD02: VKEY_W
+    {0x01BE, 0x22, 0x59},  // XK_zcaron+AD11: VKEY_Y
+    {0x01BE, 0x33, 0xDC},  // XK_zcaron+BKSL: VKEY_OEM_5
+    {0x01BF, 0x22, 0xDB},  // XK_zabovedot+AD11: VKEY_OEM_4
+    {0x01BF, 0x33, 0xDC},  // XK_zabovedot+BKSL: VKEY_OEM_5
+    {0x01E3, 0x0A, 0x31},  // XK_abreve+AE01: VKEY_1
+    {0x01E3, 0x22, 0xDB},  // XK_abreve+AD11: VKEY_OEM_4
+    {0x01E8, 0x0B, 0x32},  // XK_ccaron+AE02: VKEY_2
+    {0x01E8, 0x0D, 0x34},  // XK_ccaron+AE04: VKEY_4
+    {0x01E8, 0x21, 0x58},  // XK_ccaron+AD10: VKEY_X
+    {0x01E8, 0x2F, 0xBA},  // XK_ccaron+AC10: VKEY_OEM_1
+    {0x01E8, 0x3B, 0xBC},  // XK_ccaron+AB08: VKEY_OEM_COMMA
+    {0x01EA, 0x0C, 0x33},  // XK_eogonek+AE03: VKEY_3
+    {0x01F0, 0x13, 0x30},  // XK_dstroke+AE10: VKEY_0
+    {0x01F0, 0x23, 0xDD},  // XK_dstroke+AD12: VKEY_OEM_6
+    {0x03E7, 0x0E, 0x35},  // XK_iogonek+AE05: VKEY_5
+    {0x03EC, 0x0D, 0x34},  // XK_eabovedot+AE04: VKEY_4
+    {0x03EC, 0x30, 0xDE},  // XK_eabovedot+AC11: VKEY_OEM_7
+    {0x03F9, 0x10, 0x37},  // XK_uogonek+AE07: VKEY_7
+    {0x03FE, 0x11, 0x38},  // XK_umacron+AE08: VKEY_8
+    {0x03FE, 0x18, 0x51},  // XK_umacron+AD01: VKEY_Q
+    {0x03FE, 0x35, 0x58},  // XK_umacron+AB02: VKEY_X
 };
 
 const struct MAP2 {
@@ -326,7 +404,6 @@
       {0x002F, 0x13, 0x003F, 0xBF},  // XK_slash+AE10+XK_question: VKEY_OEM_2
       {0x003D, 0x3D, 0x0025, 0xDF},  // XK_equal+AB10+XK_percent: VKEY_OEM_8
       {0x003D, 0x3D, 0x002B, 0xBB},  // XK_equal+AB10+XK_plus: VKEY_OEM_PLUS
-      {0x005C, 0x33, 0x002F, 0xDE},  // XK_backslash+BKSL+XK_slash: VKEY_OEM_7
       {0x005C, 0x33, 0x007C, 0xDC},  // XK_backslash+BKSL+XK_bar: VKEY_OEM_5
       {0x0060, 0x31, 0x0000, 0xC0},  // XK_quoteleft+TLDE+NoSymbol: VKEY_OEM_3
       {0x0060, 0x31, 0x00AC, 0xDF},  // XK_quoteleft+TLDE+XK_notsign: VKEY_OEM_8
@@ -357,94 +434,98 @@
     return m1.ch0 < m2.ch0;
   }
 } map3[] = {
-      {0x0023, 0x33, 0x007E, 0x0000,
-       0xDE},  // XK_numbersign+BKSL+XK_asciitilde+NoSymbol: VKEY_OEM_7
-      {0x0027, 0x14, 0x003F, 0x0000,
-       0xDB},  // XK_quoteright+AE11+XK_question+NoSymbol: VKEY_OEM_4
-      {0x0027, 0x14, 0x003F, 0x00DD,
-       0xDB},  // XK_quoteright+AE11+XK_question+XK_Yacute: VKEY_OEM_4
-      {0x0027, 0x15, 0x002A, 0x0000,
-       0xBB},  // XK_quoteright+AE12+XK_asterisk+NoSymbol: VKEY_OEM_PLUS
-      {0x0027, 0x30, 0x0040, 0x0000,
-       0xC0},  // XK_quoteright+AC11+XK_at+NoSymbol: VKEY_OEM_3
-      {0x0027, 0x33, 0x002A, 0x0000,
-       0xBF},  // XK_quoteright+BKSL+XK_asterisk+NoSymbol: VKEY_OEM_2
-      {0x0027, 0x33, 0x002A, 0x00BD,
-       0xDC},  // XK_quoteright+BKSL+XK_asterisk+XK_onehalf: VKEY_OEM_5
-      {0x0027, 0x33, 0x002A, 0x01A3,
-       0xBF},  // XK_quoteright+BKSL+XK_asterisk+XK_Lstroke: VKEY_OEM_2
-      {0x0027, 0x34, 0x0022, 0x0000,
-       0x5A},  // XK_quoteright+AB01+XK_quotedbl+NoSymbol: VKEY_Z
-      {0x0027, 0x34, 0x0022, 0x01D8,
-       0xDE},  // XK_quoteright+AB01+XK_quotedbl+XK_Rcaron: VKEY_OEM_7
-      {0x002B, 0x14, 0x003F, 0x0000,
-       0xBB},  // XK_plus+AE11+XK_question+NoSymbol: VKEY_OEM_PLUS
-      {0x002B, 0x14, 0x003F, 0x005C,
-       0xBD},  // XK_plus+AE11+XK_question+XK_backslash: VKEY_OEM_MINUS
-      {0x002B, 0x14, 0x003F, 0x01F5,
-       0xBB},  // XK_plus+AE11+XK_question+XK_odoubleacute: VKEY_OEM_PLUS
-      {0x002D, 0x15, 0x005F, 0x0000,
-       0xBD},  // XK_minus+AE12+XK_underscore+NoSymbol: VKEY_OEM_MINUS
-      {0x002D, 0x15, 0x005F, 0x03B3,
-       0xDB},  // XK_minus+AE12+XK_underscore+XK_rcedilla: VKEY_OEM_4
-      {0x002D, 0x3D, 0x005F, 0x0000,
-       0xBD},  // XK_minus+AB10+XK_underscore+NoSymbol: VKEY_OEM_MINUS
-      {0x002D, 0x3D, 0x005F, 0x002A,
-       0xBD},  // XK_minus+AB10+XK_underscore+XK_asterisk: VKEY_OEM_MINUS
-      {0x002D, 0x3D, 0x005F, 0x002F,
-       0xBF},  // XK_minus+AB10+XK_underscore+XK_slash: VKEY_OEM_2
-      {0x002D, 0x3D, 0x005F, 0x006E,
-       0xBD},  // XK_minus+AB10+XK_underscore+XK_n: VKEY_OEM_MINUS
-      {0x003D, 0x14, 0x0025, 0x0000,
-       0xBB},  // XK_equal+AE11+XK_percent+NoSymbol: VKEY_OEM_PLUS
-      {0x003D, 0x14, 0x0025, 0x002D,
-       0xBD},  // XK_equal+AE11+XK_percent+XK_minus: VKEY_OEM_MINUS
-      {0x005C, 0x31, 0x007C, 0x0031,
-       0xDC},  // XK_backslash+TLDE+XK_bar+XK_1: VKEY_OEM_5
-      {0x005C, 0x31, 0x007C, 0x03D1,
-       0xC0},  // XK_backslash+TLDE+XK_bar+XK_Ncedilla: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x0000,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+NoSymbol: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x0031,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_1: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x003B,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_semicolon: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x0060,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_quoteleft: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x00BF,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_questiondown: VKEY_OEM_3
-      {0x0060, 0x31, 0x007E, 0x01F5,
-       0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_odoubleacute: VKEY_OEM_3
-      {0x00E4, 0x30, 0x00C4, 0x0000,
-       0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+NoSymbol: VKEY_OEM_7
-      {0x00E4, 0x30, 0x00C4, 0x01A6,
-       0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+XK_Sacute: VKEY_OEM_7
-      {0x00E4, 0x30, 0x00C4, 0x01F8,
-       0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+XK_rcaron: VKEY_OEM_7
-      {0x00E7, 0x2F, 0x00C7, 0x0000,
-       0xBA},  // XK_ccedilla+AC10+XK_Ccedilla+NoSymbol: VKEY_OEM_1
-      {0x00E7, 0x2F, 0x00C7, 0x00DE,
-       0xC0},  // XK_ccedilla+AC10+XK_Ccedilla+XK_Thorn: VKEY_OEM_3
-      {0x00F6, 0x2F, 0x00D6, 0x0000,
-       0xC0},  // XK_odiaeresis+AC10+XK_Odiaeresis+NoSymbol: VKEY_OEM_3
-      {0x00F6, 0x2F, 0x00D6, 0x01DE,
-       0xC0},  // XK_odiaeresis+AC10+XK_Odiaeresis+XK_Tcedilla: VKEY_OEM_3
-      {0x00FC, 0x14, 0x00DC, 0x0000,
-       0xBF},  // XK_udiaeresis+AE11+XK_Udiaeresis+NoSymbol: VKEY_OEM_2
-      {0x00FC, 0x22, 0x00DC, 0x0000,
-       0xBA},  // XK_udiaeresis+AD11+XK_Udiaeresis+NoSymbol: VKEY_OEM_1
-      {0x00FC, 0x22, 0x00DC, 0x01A3,
-       0xC0},  // XK_udiaeresis+AD11+XK_Udiaeresis+XK_Lstroke: VKEY_OEM_3
-      {0x01EA, 0x3D, 0x01CA, 0x0000,
-       0xBD},  // XK_eogonek+AB10+XK_Eogonek+NoSymbol: VKEY_OEM_MINUS
-      {0x01EA, 0x3D, 0x01CA, 0x006E,
-       0xBF},  // XK_eogonek+AB10+XK_Eogonek+XK_n: VKEY_OEM_2
-      {0x03E7, 0x22, 0x03C7, 0x0000,
-       0xDB},  // XK_iogonek+AD11+XK_Iogonek+NoSymbol: VKEY_OEM_4
-      {0x03F9, 0x2F, 0x03D9, 0x0000,
-       0xC0},  // XK_uogonek+AC10+XK_Uogonek+NoSymbol: VKEY_OEM_3
-      {0x03F9, 0x2F, 0x03D9, 0x01DE,
-       0xBA},  // XK_uogonek+AC10+XK_Uogonek+XK_Tcedilla: VKEY_OEM_1
+    {0x0023, 0x33, 0x007E, 0x0000,
+     0xDE},  // XK_numbersign+BKSL+XK_asciitilde+NoSymbol: VKEY_OEM_7
+    {0x0027, 0x14, 0x003F, 0x0000,
+     0xDB},  // XK_quoteright+AE11+XK_question+NoSymbol: VKEY_OEM_4
+    {0x0027, 0x14, 0x003F, 0x00DD,
+     0xDB},  // XK_quoteright+AE11+XK_question+XK_Yacute: VKEY_OEM_4
+    {0x0027, 0x15, 0x002A, 0x0000,
+     0xBB},  // XK_quoteright+AE12+XK_asterisk+NoSymbol: VKEY_OEM_PLUS
+    {0x0027, 0x30, 0x0040, 0x0000,
+     0xC0},  // XK_quoteright+AC11+XK_at+NoSymbol: VKEY_OEM_3
+    {0x0027, 0x33, 0x002A, 0x0000,
+     0xBF},  // XK_quoteright+BKSL+XK_asterisk+NoSymbol: VKEY_OEM_2
+    {0x0027, 0x33, 0x002A, 0x00BD,
+     0xDC},  // XK_quoteright+BKSL+XK_asterisk+XK_onehalf: VKEY_OEM_5
+    {0x0027, 0x33, 0x002A, 0x01A3,
+     0xBF},  // XK_quoteright+BKSL+XK_asterisk+XK_Lstroke: VKEY_OEM_2
+    {0x0027, 0x34, 0x0022, 0x0000,
+     0x5A},  // XK_quoteright+AB01+XK_quotedbl+NoSymbol: VKEY_Z
+    {0x0027, 0x34, 0x0022, 0x01D8,
+     0xDE},  // XK_quoteright+AB01+XK_quotedbl+XK_Rcaron: VKEY_OEM_7
+    {0x002B, 0x14, 0x003F, 0x0000,
+     0xBB},  // XK_plus+AE11+XK_question+NoSymbol: VKEY_OEM_PLUS
+    {0x002B, 0x14, 0x003F, 0x005C,
+     0xBD},  // XK_plus+AE11+XK_question+XK_backslash: VKEY_OEM_MINUS
+    {0x002B, 0x14, 0x003F, 0x01F5,
+     0xBB},  // XK_plus+AE11+XK_question+XK_odoubleacute: VKEY_OEM_PLUS
+    {0x002D, 0x15, 0x005F, 0x0000,
+     0xBD},  // XK_minus+AE12+XK_underscore+NoSymbol: VKEY_OEM_MINUS
+    {0x002D, 0x15, 0x005F, 0x03B3,
+     0xDB},  // XK_minus+AE12+XK_underscore+XK_rcedilla: VKEY_OEM_4
+    {0x002D, 0x3D, 0x005F, 0x0000,
+     0xBD},  // XK_minus+AB10+XK_underscore+NoSymbol: VKEY_OEM_MINUS
+    {0x002D, 0x3D, 0x005F, 0x002A,
+     0xBD},  // XK_minus+AB10+XK_underscore+XK_asterisk: VKEY_OEM_MINUS
+    {0x002D, 0x3D, 0x005F, 0x002F,
+     0xBF},  // XK_minus+AB10+XK_underscore+XK_slash: VKEY_OEM_2
+    {0x002D, 0x3D, 0x005F, 0x006E,
+     0xBD},  // XK_minus+AB10+XK_underscore+XK_n: VKEY_OEM_MINUS
+    {0x003D, 0x14, 0x0025, 0x0000,
+     0xBB},  // XK_equal+AE11+XK_percent+NoSymbol: VKEY_OEM_PLUS
+    {0x003D, 0x14, 0x0025, 0x002D,
+     0xBD},  // XK_equal+AE11+XK_percent+XK_minus: VKEY_OEM_MINUS
+    {0x005C, 0x31, 0x007C, 0x0031,
+     0xDC},  // XK_backslash+TLDE+XK_bar+XK_1: VKEY_OEM_5
+    {0x005C, 0x31, 0x007C, 0x03D1,
+     0xC0},  // XK_backslash+TLDE+XK_bar+XK_Ncedilla: VKEY_OEM_3
+    {0x005C, 0x33, 0x002F, 0x0000,
+     0xDC},  // XK_backslash+BKSL+XK_slash+NoSymbol: VKEY_OEM_5
+    {0x005C, 0x33, 0x002F, 0x01A3,
+     0xDE},  // XK_backslash+BKSL+XK_slash+XK_Lstroke: VKEY_OEM_7
+    {0x0060, 0x31, 0x007E, 0x0000,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+NoSymbol: VKEY_OEM_3
+    {0x0060, 0x31, 0x007E, 0x0031,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_1: VKEY_OEM_3
+    {0x0060, 0x31, 0x007E, 0x003B,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_semicolon: VKEY_OEM_3
+    {0x0060, 0x31, 0x007E, 0x0060,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_quoteleft: VKEY_OEM_3
+    {0x0060, 0x31, 0x007E, 0x00BF,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_questiondown: VKEY_OEM_3
+    {0x0060, 0x31, 0x007E, 0x01F5,
+     0xC0},  // XK_quoteleft+TLDE+XK_asciitilde+XK_odoubleacute: VKEY_OEM_3
+    {0x00E4, 0x30, 0x00C4, 0x0000,
+     0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+NoSymbol: VKEY_OEM_7
+    {0x00E4, 0x30, 0x00C4, 0x01A6,
+     0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+XK_Sacute: VKEY_OEM_7
+    {0x00E4, 0x30, 0x00C4, 0x01F8,
+     0xDE},  // XK_adiaeresis+AC11+XK_Adiaeresis+XK_rcaron: VKEY_OEM_7
+    {0x00E7, 0x2F, 0x00C7, 0x0000,
+     0xBA},  // XK_ccedilla+AC10+XK_Ccedilla+NoSymbol: VKEY_OEM_1
+    {0x00E7, 0x2F, 0x00C7, 0x00DE,
+     0xC0},  // XK_ccedilla+AC10+XK_Ccedilla+XK_Thorn: VKEY_OEM_3
+    {0x00F6, 0x2F, 0x00D6, 0x0000,
+     0xC0},  // XK_odiaeresis+AC10+XK_Odiaeresis+NoSymbol: VKEY_OEM_3
+    {0x00F6, 0x2F, 0x00D6, 0x01DE,
+     0xC0},  // XK_odiaeresis+AC10+XK_Odiaeresis+XK_Tcedilla: VKEY_OEM_3
+    {0x00FC, 0x14, 0x00DC, 0x0000,
+     0xBF},  // XK_udiaeresis+AE11+XK_Udiaeresis+NoSymbol: VKEY_OEM_2
+    {0x00FC, 0x22, 0x00DC, 0x0000,
+     0xBA},  // XK_udiaeresis+AD11+XK_Udiaeresis+NoSymbol: VKEY_OEM_1
+    {0x00FC, 0x22, 0x00DC, 0x01A3,
+     0xC0},  // XK_udiaeresis+AD11+XK_Udiaeresis+XK_Lstroke: VKEY_OEM_3
+    {0x01EA, 0x3D, 0x01CA, 0x0000,
+     0xBD},  // XK_eogonek+AB10+XK_Eogonek+NoSymbol: VKEY_OEM_MINUS
+    {0x01EA, 0x3D, 0x01CA, 0x006E,
+     0xBF},  // XK_eogonek+AB10+XK_Eogonek+XK_n: VKEY_OEM_2
+    {0x03E7, 0x22, 0x03C7, 0x0000,
+     0xDB},  // XK_iogonek+AD11+XK_Iogonek+NoSymbol: VKEY_OEM_4
+    {0x03F9, 0x2F, 0x03D9, 0x0000,
+     0xC0},  // XK_uogonek+AC10+XK_Uogonek+NoSymbol: VKEY_OEM_3
+    {0x03F9, 0x2F, 0x03D9, 0x01DE,
+     0xBA},  // XK_uogonek+AC10+XK_Uogonek+XK_Tcedilla: VKEY_OEM_1
 };
 
 template <class T_MAP>
diff --git a/ui/gl/gl_image_glx.cc b/ui/gl/gl_image_glx.cc
index 4c4ba1a2..87385d3 100644
--- a/ui/gl/gl_image_glx.cc
+++ b/ui/gl/gl_image_glx.cc
@@ -13,16 +13,6 @@
 namespace gl {
 namespace {
 
-bool ValidFormat(unsigned internalformat) {
-  switch (internalformat) {
-    case GL_RGB:
-    case GL_RGBA:
-      return true;
-    default:
-      return false;
-  }
-}
-
 int TextureFormat(unsigned internalformat) {
   switch (internalformat) {
     case GL_RGB:
@@ -199,4 +189,14 @@
   // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
 }
 
+bool GLImageGLX::ValidFormat(unsigned internalformat) {
+  switch (internalformat) {
+    case GL_RGB:
+    case GL_RGBA:
+      return true;
+    default:
+      return false;
+  }
+}
+
 }  // namespace gl
diff --git a/ui/gl/gl_image_glx.h b/ui/gl/gl_image_glx.h
index abff58f..39687b6 100644
--- a/ui/gl/gl_image_glx.h
+++ b/ui/gl/gl_image_glx.h
@@ -45,6 +45,8 @@
   ~GLImageGLX() override;
 
  private:
+  static bool ValidFormat(unsigned internalformat);
+
   XID glx_pixmap_;
   const gfx::Size size_;
   unsigned internalformat_;
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index fd9741d..077cee5 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -89,6 +89,7 @@
   ~GLImageIOSurface() override;
   virtual bool BindTexImageImpl(unsigned internalformat);
 
+  static bool ValidFormat(gfx::BufferFormat format);
   Type GetType() const override;
   class RGBConverter;
 
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index 12bb779..ce724040 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -55,36 +55,6 @@
   }
 }
 
-bool ValidFormat(gfx::BufferFormat format) {
-  switch (format) {
-    case gfx::BufferFormat::R_8:
-    case gfx::BufferFormat::BGRA_8888:
-    case gfx::BufferFormat::BGRX_8888:
-    case gfx::BufferFormat::RGBA_8888:
-    case gfx::BufferFormat::RGBA_F16:
-    case gfx::BufferFormat::BGRX_1010102:
-    case gfx::BufferFormat::UYVY_422:
-    case gfx::BufferFormat::YUV_420_BIPLANAR:
-      return true;
-    case gfx::BufferFormat::R_16:
-    case gfx::BufferFormat::RG_88:
-    case gfx::BufferFormat::ATC:
-    case gfx::BufferFormat::ATCIA:
-    case gfx::BufferFormat::DXT1:
-    case gfx::BufferFormat::DXT5:
-    case gfx::BufferFormat::ETC1:
-    case gfx::BufferFormat::BGR_565:
-    case gfx::BufferFormat::RGBA_4444:
-    case gfx::BufferFormat::RGBX_8888:
-    case gfx::BufferFormat::RGBX_1010102:
-    case gfx::BufferFormat::YVU_420:
-      return false;
-  }
-
-  NOTREACHED();
-  return false;
-}
-
 GLenum TextureFormat(gfx::BufferFormat format) {
   switch (format) {
     case gfx::BufferFormat::R_8:
@@ -493,4 +463,35 @@
   return static_cast<GLImageIOSurface*>(image);
 }
 
+// static
+bool GLImageIOSurface::ValidFormat(gfx::BufferFormat format) {
+  switch (format) {
+    case gfx::BufferFormat::R_8:
+    case gfx::BufferFormat::BGRA_8888:
+    case gfx::BufferFormat::BGRX_8888:
+    case gfx::BufferFormat::RGBA_8888:
+    case gfx::BufferFormat::RGBA_F16:
+    case gfx::BufferFormat::BGRX_1010102:
+    case gfx::BufferFormat::UYVY_422:
+    case gfx::BufferFormat::YUV_420_BIPLANAR:
+      return true;
+    case gfx::BufferFormat::R_16:
+    case gfx::BufferFormat::RG_88:
+    case gfx::BufferFormat::ATC:
+    case gfx::BufferFormat::ATCIA:
+    case gfx::BufferFormat::DXT1:
+    case gfx::BufferFormat::DXT5:
+    case gfx::BufferFormat::ETC1:
+    case gfx::BufferFormat::BGR_565:
+    case gfx::BufferFormat::RGBA_4444:
+    case gfx::BufferFormat::RGBX_8888:
+    case gfx::BufferFormat::RGBX_1010102:
+    case gfx::BufferFormat::YVU_420:
+      return false;
+  }
+
+  NOTREACHED();
+  return false;
+}
+
 }  // namespace gl
diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
index 1f5b768..6bc87c2 100644
--- a/ui/gl/gl_image_memory.cc
+++ b/ui/gl/gl_image_memory.cc
@@ -39,36 +39,6 @@
   }
 }
 
-bool ValidFormat(gfx::BufferFormat format) {
-  switch (format) {
-    case gfx::BufferFormat::ATC:
-    case gfx::BufferFormat::ATCIA:
-    case gfx::BufferFormat::DXT1:
-    case gfx::BufferFormat::DXT5:
-    case gfx::BufferFormat::ETC1:
-    case gfx::BufferFormat::R_8:
-    case gfx::BufferFormat::R_16:
-    case gfx::BufferFormat::RG_88:
-    case gfx::BufferFormat::BGR_565:
-    case gfx::BufferFormat::RGBA_4444:
-    case gfx::BufferFormat::RGBX_8888:
-    case gfx::BufferFormat::RGBA_8888:
-    case gfx::BufferFormat::BGRX_8888:
-    case gfx::BufferFormat::BGRX_1010102:
-    case gfx::BufferFormat::RGBX_1010102:
-    case gfx::BufferFormat::BGRA_8888:
-    case gfx::BufferFormat::RGBA_F16:
-      return true;
-    case gfx::BufferFormat::YVU_420:
-    case gfx::BufferFormat::YUV_420_BIPLANAR:
-    case gfx::BufferFormat::UYVY_422:
-      return false;
-  }
-
-  NOTREACHED();
-  return false;
-}
-
 bool IsCompressedFormat(gfx::BufferFormat format) {
   switch (format) {
     case gfx::BufferFormat::ATC:
@@ -546,4 +516,35 @@
   return TextureFormat(format);
 }
 
+// static
+bool GLImageMemory::ValidFormat(gfx::BufferFormat format) {
+  switch (format) {
+    case gfx::BufferFormat::ATC:
+    case gfx::BufferFormat::ATCIA:
+    case gfx::BufferFormat::DXT1:
+    case gfx::BufferFormat::DXT5:
+    case gfx::BufferFormat::ETC1:
+    case gfx::BufferFormat::R_8:
+    case gfx::BufferFormat::R_16:
+    case gfx::BufferFormat::RG_88:
+    case gfx::BufferFormat::BGR_565:
+    case gfx::BufferFormat::RGBA_4444:
+    case gfx::BufferFormat::RGBX_8888:
+    case gfx::BufferFormat::RGBA_8888:
+    case gfx::BufferFormat::BGRX_8888:
+    case gfx::BufferFormat::BGRX_1010102:
+    case gfx::BufferFormat::RGBX_1010102:
+    case gfx::BufferFormat::BGRA_8888:
+    case gfx::BufferFormat::RGBA_F16:
+      return true;
+    case gfx::BufferFormat::YVU_420:
+    case gfx::BufferFormat::YUV_420_BIPLANAR:
+    case gfx::BufferFormat::UYVY_422:
+      return false;
+  }
+
+  NOTREACHED();
+  return false;
+}
+
 }  // namespace gl
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 75a3aef..e156244 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -55,6 +55,8 @@
   ~GLImageMemory() override;
 
  private:
+  static bool ValidFormat(gfx::BufferFormat format);
+
   const gfx::Size size_;
   const unsigned internalformat_;
   const unsigned char* memory_;
diff --git a/ui/gl/gl_image_native_pixmap.cc b/ui/gl/gl_image_native_pixmap.cc
index a917940b..2210431 100644
--- a/ui/gl/gl_image_native_pixmap.cc
+++ b/ui/gl/gl_image_native_pixmap.cc
@@ -59,36 +59,6 @@
   }
 }
 
-bool ValidFormat(gfx::BufferFormat format) {
-  switch (format) {
-    case gfx::BufferFormat::R_8:
-    case gfx::BufferFormat::R_16:
-    case gfx::BufferFormat::RG_88:
-    case gfx::BufferFormat::BGR_565:
-    case gfx::BufferFormat::RGBA_8888:
-    case gfx::BufferFormat::RGBX_8888:
-    case gfx::BufferFormat::BGRA_8888:
-    case gfx::BufferFormat::BGRX_8888:
-    case gfx::BufferFormat::BGRX_1010102:
-    case gfx::BufferFormat::RGBX_1010102:
-    case gfx::BufferFormat::YVU_420:
-    case gfx::BufferFormat::YUV_420_BIPLANAR:
-      return true;
-    case gfx::BufferFormat::ATC:
-    case gfx::BufferFormat::ATCIA:
-    case gfx::BufferFormat::DXT1:
-    case gfx::BufferFormat::DXT5:
-    case gfx::BufferFormat::ETC1:
-    case gfx::BufferFormat::RGBA_4444:
-    case gfx::BufferFormat::RGBA_F16:
-    case gfx::BufferFormat::UYVY_422:
-      return false;
-  }
-
-  NOTREACHED();
-  return false;
-}
-
 EGLint FourCC(gfx::BufferFormat format) {
   switch (format) {
     case gfx::BufferFormat::R_8:
@@ -448,4 +418,35 @@
   return GL_NONE;
 }
 
+// static
+bool GLImageNativePixmap::ValidFormat(gfx::BufferFormat format) {
+  switch (format) {
+    case gfx::BufferFormat::R_8:
+    case gfx::BufferFormat::R_16:
+    case gfx::BufferFormat::RG_88:
+    case gfx::BufferFormat::BGR_565:
+    case gfx::BufferFormat::RGBA_8888:
+    case gfx::BufferFormat::RGBX_8888:
+    case gfx::BufferFormat::BGRA_8888:
+    case gfx::BufferFormat::BGRX_8888:
+    case gfx::BufferFormat::BGRX_1010102:
+    case gfx::BufferFormat::RGBX_1010102:
+    case gfx::BufferFormat::YVU_420:
+    case gfx::BufferFormat::YUV_420_BIPLANAR:
+      return true;
+    case gfx::BufferFormat::ATC:
+    case gfx::BufferFormat::ATCIA:
+    case gfx::BufferFormat::DXT1:
+    case gfx::BufferFormat::DXT5:
+    case gfx::BufferFormat::ETC1:
+    case gfx::BufferFormat::RGBA_4444:
+    case gfx::BufferFormat::RGBA_F16:
+    case gfx::BufferFormat::UYVY_422:
+      return false;
+  }
+
+  NOTREACHED();
+  return false;
+}
+
 }  // namespace gl
diff --git a/ui/gl/gl_image_native_pixmap.h b/ui/gl/gl_image_native_pixmap.h
index 66c985c..7f44588a 100644
--- a/ui/gl/gl_image_native_pixmap.h
+++ b/ui/gl/gl_image_native_pixmap.h
@@ -49,6 +49,8 @@
   ~GLImageNativePixmap() override;
 
  private:
+  static bool ValidFormat(gfx::BufferFormat format);
+
   unsigned internalformat_;
   scoped_refptr<gfx::NativePixmap> pixmap_;
   bool has_image_flush_external_;
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index f1413f21..22a0031 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -131,7 +131,7 @@
 
 namespace {
 
-EGLDisplay g_display = EGL_NO_DISPLAY;
+EGLDisplay g_egl_display = EGL_NO_DISPLAY;
 EGLNativeDisplayType g_native_display = EGL_DEFAULT_DISPLAY;
 
 const char* g_egl_extensions = nullptr;
@@ -184,9 +184,10 @@
                      int64_t* media_stream_counter,
                      int64_t* swap_buffer_counter) override {
     uint64_t u_system_time, u_media_stream_counter, u_swap_buffer_counter;
-    bool result = eglGetSyncValuesCHROMIUM(
-        g_display, surface_, &u_system_time,
-        &u_media_stream_counter, &u_swap_buffer_counter) == EGL_TRUE;
+    bool result =
+        eglGetSyncValuesCHROMIUM(g_egl_display, surface_, &u_system_time,
+                                 &u_media_stream_counter,
+                                 &u_swap_buffer_counter) == EGL_TRUE;
     if (result) {
       *system_time = static_cast<int64_t>(u_system_time);
       *media_stream_counter = static_cast<int64_t>(u_media_stream_counter);
@@ -411,7 +412,7 @@
     EGLConfig config = nullptr;
     EGLConfig* config_data = &config;
     // Validate if there are any configs for given attribs.
-    if (!ValidateEglConfig(g_display, choose_attributes, &num_configs)) {
+    if (!ValidateEglConfig(g_egl_display, choose_attributes, &num_configs)) {
       // Try the next renderable_type
       continue;
     }
@@ -422,8 +423,8 @@
       config_data = matching_configs.get();
     }
 
-    if (!eglChooseConfig(g_display, choose_attributes, config_data, config_size,
-                         &num_configs)) {
+    if (!eglChooseConfig(g_egl_display, choose_attributes, config_data,
+                         config_size, &num_configs)) {
       LOG(ERROR) << "eglChooseConfig failed with error "
                  << GetLastEGLErrorString();
       return config;
@@ -437,14 +438,14 @@
       for (int i = 0; i < num_configs; i++) {
         EGLint red, green, blue, alpha;
         // Read the relevant attributes of the EGLConfig.
-        if (eglGetConfigAttrib(g_display, matching_configs[i], EGL_RED_SIZE,
+        if (eglGetConfigAttrib(g_egl_display, matching_configs[i], EGL_RED_SIZE,
                                &red) &&
-            eglGetConfigAttrib(g_display, matching_configs[i], EGL_BLUE_SIZE,
-                               &blue) &&
-            eglGetConfigAttrib(g_display, matching_configs[i], EGL_GREEN_SIZE,
-                               &green) &&
-            eglGetConfigAttrib(g_display, matching_configs[i], EGL_ALPHA_SIZE,
-                               &alpha) &&
+            eglGetConfigAttrib(g_egl_display, matching_configs[i],
+                               EGL_BLUE_SIZE, &blue) &&
+            eglGetConfigAttrib(g_egl_display, matching_configs[i],
+                               EGL_GREEN_SIZE, &green) &&
+            eglGetConfigAttrib(g_egl_display, matching_configs[i],
+                               EGL_ALPHA_SIZE, &alpha) &&
             alpha == 0 && red == 5 && green == 6 && blue == 5) {
           config = matching_configs[i];
           match_found = true;
@@ -454,11 +455,12 @@
       if (!match_found) {
         // To fall back to default 32 bit format, choose with
         // the right attributes again.
-        if (!ValidateEglConfig(g_display, config_attribs_8888, &num_configs)) {
+        if (!ValidateEglConfig(g_egl_display, config_attribs_8888,
+                               &num_configs)) {
           // Try the next renderable_type
           continue;
         }
-        if (!eglChooseConfig(g_display, config_attribs_8888, &config, 1,
+        if (!eglChooseConfig(g_egl_display, config_attribs_8888, &config, 1,
                              &num_configs)) {
           LOG(ERROR) << "eglChooseConfig failed with error "
                      << GetLastEGLErrorString();
@@ -549,7 +551,7 @@
 }
 
 EGLDisplay GLSurfaceEGL::GetDisplay() {
-  return g_display;
+  return g_egl_display;
 }
 
 EGLConfig GLSurfaceEGL::GetConfig() {
@@ -568,7 +570,7 @@
   g_driver_egl.InitializeClientExtensionBindings();
 
   InitializeDisplay(native_display);
-  if (g_display == EGL_NO_DISPLAY)
+  if (g_egl_display == EGL_NO_DISPLAY)
     return false;
 
   // Must be called after InitializeDisplay().
@@ -580,14 +582,14 @@
 // static
 bool GLSurfaceEGL::InitializeOneOffForTesting() {
   g_driver_egl.InitializeClientExtensionBindings();
-  g_display = eglGetCurrentDisplay();
+  g_egl_display = eglGetCurrentDisplay();
   g_driver_egl.InitializeExtensionBindings();
   return InitializeOneOffCommon();
 }
 
 // static
 bool GLSurfaceEGL::InitializeOneOffCommon() {
-  g_egl_extensions = eglQueryString(g_display, EGL_EXTENSIONS);
+  g_egl_extensions = eglQueryString(g_egl_display, EGL_EXTENSIONS);
 
   g_egl_create_context_robustness_supported =
       HasEGLExtension("EGL_EXT_create_context_robustness");
@@ -690,20 +692,20 @@
   if (!initialized_)
     return false;
   g_driver_egl.UpdateConditionalExtensionBindings();
-  g_egl_extensions = eglQueryString(g_display, EGL_EXTENSIONS);
+  g_egl_extensions = eglQueryString(g_egl_display, EGL_EXTENSIONS);
 
   return true;
 }
 
 // static
 void GLSurfaceEGL::ShutdownOneOff() {
-  angle::ResetPlatform(g_display);
+  angle::ResetPlatform(g_egl_display);
 
-  if (g_display != EGL_NO_DISPLAY) {
+  if (g_egl_display != EGL_NO_DISPLAY) {
     DCHECK(g_driver_egl.fn.eglTerminateFn);
-    eglTerminate(g_display);
+    eglTerminate(g_egl_display);
   }
-  g_display = EGL_NO_DISPLAY;
+  g_egl_display = EGL_NO_DISPLAY;
 
   g_egl_extensions = nullptr;
   g_egl_create_context_robustness_supported = false;
@@ -723,7 +725,7 @@
 
 // static
 EGLDisplay GLSurfaceEGL::GetHardwareDisplay() {
-  return g_display;
+  return g_egl_display;
 }
 
 // static
@@ -792,8 +794,8 @@
 // static
 EGLDisplay GLSurfaceEGL::InitializeDisplay(
     EGLNativeDisplayType native_display) {
-  if (g_display != EGL_NO_DISPLAY) {
-    return g_display;
+  if (g_egl_display != EGL_NO_DISPLAY) {
+    return g_egl_display;
   }
 
   g_native_display = native_display;
@@ -846,12 +848,12 @@
     } else {
       UMA_HISTOGRAM_ENUMERATION("GPU.EGLDisplayType", display_type,
                                 DISPLAY_TYPE_MAX);
-      g_display = display;
+      g_egl_display = display;
       break;
     }
   }
 
-  return g_display;
+  return g_egl_display;
 }
 
 NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(
@@ -1523,8 +1525,7 @@
     return NULL;
 
   void* handle;
-  if (!eglQuerySurfacePointerANGLE(g_display,
-                                   GetHandle(),
+  if (!eglQuerySurfacePointerANGLE(g_egl_display, GetHandle(),
                                    EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE,
                                    &handle)) {
     return NULL;
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index fb42631..4b051e1 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -35,7 +35,6 @@
 
 namespace {
 
-Display* g_display = nullptr;
 bool g_glx_context_create = false;
 bool g_glx_create_context_robustness_supported = false;
 bool g_glx_create_context_profile_supported = false;
@@ -150,7 +149,7 @@
   bool GetSyncValues(int64_t* system_time,
                      int64_t* media_stream_counter,
                      int64_t* swap_buffer_counter) override {
-    return glXGetSyncValuesOML(g_display, glx_window_, system_time,
+    return glXGetSyncValuesOML(gfx::GetXDisplay(), glx_window_, system_time,
                                media_stream_counter, swap_buffer_counter);
   }
 
@@ -158,7 +157,8 @@
     if (!g_glx_get_msc_rate_oml_supported)
       return false;
 
-    if (!glXGetMscRateOML(g_display, glx_window_, numerator, denominator)) {
+    if (!glXGetMscRateOML(gfx::GetXDisplay(), glx_window_, numerator,
+                          denominator)) {
       // Once glXGetMscRateOML has been found to fail, don't try again,
       // since each failing call may spew an error message.
       g_glx_get_msc_rate_oml_supported = false;
@@ -218,7 +218,7 @@
         vsync_lock_() {
     // This ensures that creation of |parent_window_| has occured when this shim
     // is executing in the same thread as the call to create |parent_window_|.
-    XSync(g_display, x11::False);
+    XSync(gfx::GetXDisplay(), x11::False);
   }
 
   virtual ~SGIVideoSyncProviderThreadShim() {
@@ -415,14 +415,13 @@
   // it's own thread.
   gfx::InitializeThreadedX11();
 
-  g_display = gfx::GetXDisplay();
-  if (!g_display) {
+  if (!gfx::GetXDisplay()) {
     LOG(ERROR) << "XOpenDisplay failed.";
     return false;
   }
 
   int major, minor;
-  if (!glXQueryVersion(g_display, &major, &minor)) {
+  if (!glXQueryVersion(gfx::GetXDisplay(), &major, &minor)) {
     LOG(ERROR) << "glxQueryVersion failed";
     return false;
   }
@@ -436,8 +435,9 @@
       gl::GLVisualPickerGLX::GetInstance()->system_visual();
   g_visual = visual_info.visual;
   g_depth = visual_info.depth;
-  g_colormap = XCreateColormap(g_display, DefaultRootWindow(g_display),
-                               visual_info.visual, AllocNone);
+  g_colormap =
+      XCreateColormap(gfx::GetXDisplay(), DefaultRootWindow(gfx::GetXDisplay()),
+                      visual_info.visual, AllocNone);
 
   // We create a dummy unmapped window for both the main Display and the video
   // sync Display so that the Nvidia driver can initialize itself before the
@@ -445,8 +445,8 @@
   // Unfortunately some fds e.g. /dev/nvidia0 are cached per thread and because
   // we can't start threads before the sandbox is set up, these are accessed
   // through the broker process. See GpuProcessPolicy::InitGpuBrokerProcess.
-  if (!CreateDummyWindow(g_display)) {
-    LOG(ERROR) << "CreateDummyWindow(g_display) failed";
+  if (!CreateDummyWindow(gfx::GetXDisplay())) {
+    LOG(ERROR) << "CreateDummyWindow(gfx::GetXDisplay()) failed";
     return false;
   }
 
@@ -494,7 +494,6 @@
 // static
 void GLSurfaceGLX::ShutdownOneOff() {
   initialized_ = false;
-  g_display = nullptr;
   g_glx_context_create = false;
   g_glx_create_context_robustness_supported = false;
   g_glx_create_context_profile_supported = false;
@@ -514,7 +513,7 @@
 
 // static
 const char* GLSurfaceGLX::GetGLXExtensions() {
-  return glXQueryExtensionsString(g_display, 0);
+  return glXQueryExtensionsString(gfx::GetXDisplay(), 0);
 }
 
 // static
@@ -563,7 +562,7 @@
 }
 
 void* GLSurfaceGLX::GetDisplay() {
-  return g_display;
+  return gfx::GetXDisplay();
 }
 
 GLSurfaceGLX::~GLSurfaceGLX() {}
@@ -577,7 +576,7 @@
 
 bool NativeViewGLSurfaceGLX::Initialize(GLSurfaceFormat format) {
   XWindowAttributes attributes;
-  if (!XGetWindowAttributes(g_display, parent_window_, &attributes)) {
+  if (!XGetWindowAttributes(gfx::GetXDisplay(), parent_window_, &attributes)) {
     LOG(ERROR) << "XGetWindowAttributes failed for window " << parent_window_
                << ".";
     return false;
@@ -592,24 +591,25 @@
   memset(&swa, 0, sizeof(swa));
   swa.background_pixmap = 0;
   swa.bit_gravity = NorthWestGravity;
-  window_ = XCreateWindow(g_display, parent_window_, 0, 0, size_.width(),
-                          size_.height(), 0, CopyFromParent, InputOutput,
-                          CopyFromParent, CWBackPixmap | CWBitGravity, &swa);
+  window_ =
+      XCreateWindow(gfx::GetXDisplay(), parent_window_, 0, 0, size_.width(),
+                    size_.height(), 0, CopyFromParent, InputOutput,
+                    CopyFromParent, CWBackPixmap | CWBitGravity, &swa);
   if (!window_) {
     LOG(ERROR) << "XCreateWindow failed";
     return false;
   }
-  XMapWindow(g_display, window_);
+  XMapWindow(gfx::GetXDisplay(), window_);
 
   RegisterEvents();
-  XFlush(g_display);
+  XFlush(gfx::GetXDisplay());
 
   GetConfig();
   if (!config_) {
     LOG(ERROR) << "Failed to get GLXConfig";
     return false;
   }
-  glx_window_ = glXCreateWindow(g_display, config_, window_, NULL);
+  glx_window_ = glXCreateWindow(gfx::GetXDisplay(), config_, window_, NULL);
   if (!glx_window_) {
     LOG(ERROR) << "glXCreateWindow failed";
     return false;
@@ -647,14 +647,14 @@
   presentation_helper_ = nullptr;
   vsync_provider_ = nullptr;
   if (glx_window_) {
-    glXDestroyWindow(g_display, glx_window_);
+    glXDestroyWindow(gfx::GetXDisplay(), glx_window_);
     glx_window_ = 0;
   }
   if (window_) {
     UnregisterEvents();
-    XDestroyWindow(g_display, window_);
+    XDestroyWindow(gfx::GetXDisplay(), window_);
     window_ = 0;
-    XFlush(g_display);
+    XFlush(gfx::GetXDisplay());
   }
 }
 
@@ -664,7 +664,7 @@
                                     bool has_alpha) {
   size_ = size;
   glXWaitGL();
-  XResizeWindow(g_display, window_, size.width(), size.height());
+  XResizeWindow(gfx::GetXDisplay(), window_, size.width(), size.height());
   glXWaitX();
   return true;
 }
@@ -679,7 +679,7 @@
                GetSize().width(), "height", GetSize().height());
   GLSurfacePresentationHelper::ScopedSwapBuffers scoped_swap_buffers(
       presentation_helper_.get(), callback);
-  glXSwapBuffers(g_display, GetDrawableHandle());
+  glXSwapBuffers(gfx::GetXDisplay(), GetDrawableHandle());
   return scoped_swap_buffers.result();
 }
 
@@ -701,7 +701,7 @@
 
 void* NativeViewGLSurfaceGLX::GetConfig() {
   if (!config_)
-    config_ = GetConfigForWindow(g_display, window_);
+    config_ = GetConfigForWindow(gfx::GetXDisplay(), window_);
   return config_;
 }
 
@@ -723,7 +723,8 @@
 
   GLSurfacePresentationHelper::ScopedSwapBuffers scoped_swap_buffers(
       presentation_helper_.get(), callback);
-  glXCopySubBufferMESA(g_display, GetDrawableHandle(), x, y, width, height);
+  glXCopySubBufferMESA(gfx::GetXDisplay(), GetDrawableHandle(), x, y, width,
+                       height);
   return scoped_swap_buffers.result();
 }
 
@@ -743,9 +744,9 @@
 void NativeViewGLSurfaceGLX::ForwardExposeEvent(XEvent* event) {
   XEvent forwarded_event = *event;
   forwarded_event.xexpose.window = parent_window_;
-  XSendEvent(g_display, parent_window_, x11::False, ExposureMask,
+  XSendEvent(gfx::GetXDisplay(), parent_window_, x11::False, ExposureMask,
              &forwarded_event);
-  XFlush(g_display);
+  XFlush(gfx::GetXDisplay());
 }
 
 bool NativeViewGLSurfaceGLX::CanHandleEvent(XEvent* event) {
@@ -768,14 +769,14 @@
 bool UnmappedNativeViewGLSurfaceGLX::Initialize(GLSurfaceFormat format) {
   DCHECK(!window_);
 
-  gfx::AcceleratedWidget parent_window = DefaultRootWindow(g_display);
+  gfx::AcceleratedWidget parent_window = DefaultRootWindow(gfx::GetXDisplay());
 
   XSetWindowAttributes attrs;
   attrs.border_pixel = 0;
   attrs.colormap = g_colormap;
-  window_ = XCreateWindow(g_display, parent_window, 0, 0, size_.width(),
-                          size_.height(), 0, g_depth, InputOutput, g_visual,
-                          CWBorderPixel | CWColormap, &attrs);
+  window_ = XCreateWindow(
+      gfx::GetXDisplay(), parent_window, 0, 0, size_.width(), size_.height(), 0,
+      g_depth, InputOutput, g_visual, CWBorderPixel | CWColormap, &attrs);
   if (!window_) {
     LOG(ERROR) << "XCreateWindow failed";
     return false;
@@ -785,7 +786,7 @@
     LOG(ERROR) << "Failed to get GLXConfig";
     return false;
   }
-  glx_window_ = glXCreateWindow(g_display, config_, window_, NULL);
+  glx_window_ = glXCreateWindow(gfx::GetXDisplay(), config_, window_, NULL);
   if (!glx_window_) {
     LOG(ERROR) << "glXCreateWindow failed";
     return false;
@@ -796,11 +797,11 @@
 void UnmappedNativeViewGLSurfaceGLX::Destroy() {
   config_ = nullptr;
   if (glx_window_) {
-    glXDestroyWindow(g_display, glx_window_);
+    glXDestroyWindow(gfx::GetXDisplay(), glx_window_);
     glx_window_ = 0;
   }
   if (window_) {
-    XDestroyWindow(g_display, window_);
+    XDestroyWindow(gfx::GetXDisplay(), window_);
     window_ = 0;
   }
 }
@@ -825,7 +826,7 @@
 
 void* UnmappedNativeViewGLSurfaceGLX::GetConfig() {
   if (!config_)
-    config_ = GetConfigForWindow(g_display, window_);
+    config_ = GetConfigForWindow(gfx::GetXDisplay(), window_);
   return config_;
 }
 
diff --git a/ui/gl/gl_surface_wgl.cc b/ui/gl/gl_surface_wgl.cc
index d3a91b9..f880c83 100644
--- a/ui/gl/gl_surface_wgl.cc
+++ b/ui/gl/gl_surface_wgl.cc
@@ -145,7 +145,7 @@
   HDC device_context_;
   int pixel_format_;
 };
-DisplayWGL* g_display;
+DisplayWGL* g_wgl_display;
 }  // namespace
 
 // static
@@ -166,12 +166,12 @@
   if (initialized_)
     return true;
 
-  DCHECK(g_display == NULL);
+  DCHECK(g_wgl_display == NULL);
   std::unique_ptr<DisplayWGL> wgl_display(new DisplayWGL);
   if (!wgl_display->Init())
     return false;
 
-  g_display = wgl_display.release();
+  g_wgl_display = wgl_display.release();
   initialized_ = true;
   return true;
 }
@@ -185,13 +185,13 @@
 }
 
 void GLSurfaceWGL::InitializeOneOffForTesting() {
-  if (g_display == NULL) {
-    g_display = new DisplayWGL;
+  if (g_wgl_display == NULL) {
+    g_wgl_display = new DisplayWGL;
   }
 }
 
 HDC GLSurfaceWGL::GetDisplayDC() {
-  return g_display->device_context();
+  return g_wgl_display->device_context();
 }
 
 NativeViewGLSurfaceWGL::NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window)
@@ -215,19 +215,11 @@
 
   // Create a child window. WGL has problems using a window handle owned by
   // another process.
-  child_window_ =
-      CreateWindowEx(WS_EX_NOPARENTNOTIFY,
-                     reinterpret_cast<wchar_t*>(g_display->window_class()),
-                     L"",
-                     WS_CHILDWINDOW | WS_DISABLED | WS_VISIBLE,
-                     0,
-                     0,
-                     rect.right - rect.left,
-                     rect.bottom - rect.top,
-                     window_,
-                     NULL,
-                     NULL,
-                     NULL);
+  child_window_ = CreateWindowEx(
+      WS_EX_NOPARENTNOTIFY,
+      reinterpret_cast<wchar_t*>(g_wgl_display->window_class()), L"",
+      WS_CHILDWINDOW | WS_DISABLED | WS_VISIBLE, 0, 0, rect.right - rect.left,
+      rect.bottom - rect.top, window_, NULL, NULL, NULL);
   if (!child_window_) {
     LOG(ERROR) << "CreateWindow failed.\n";
     Destroy();
@@ -242,8 +234,7 @@
     return false;
   }
 
-  if (!SetPixelFormat(device_context_,
-                      g_display->pixel_format(),
+  if (!SetPixelFormat(device_context_, g_wgl_display->pixel_format(),
                       &kPixelFormatDescriptor)) {
     LOG(ERROR) << "Unable to set the pixel format for GL context.";
     Destroy();
@@ -362,10 +353,9 @@
   }
 
   const int kNoAttributes[] = { 0 };
-  pbuffer_ = wglCreatePbufferARB(g_display->device_context(),
-                                 g_display->pixel_format(),
-                                 size_.width(), size_.height(),
-                                 kNoAttributes);
+  pbuffer_ = wglCreatePbufferARB(g_wgl_display->device_context(),
+                                 g_wgl_display->pixel_format(), size_.width(),
+                                 size_.height(), kNoAttributes);
 
   if (!pbuffer_) {
     LOG(ERROR) << "Unable to create pbuffer.";
diff --git a/ui/views/test/ui_controls_factory_desktop_aurax11.cc b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 875ac82..a8d6b5c 100644
--- a/ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -210,8 +210,7 @@
   bool SendMouseClick(MouseButton type) override {
     return SendMouseEvents(type, UP | DOWN);
   }
-  void RunClosureAfterAllPendingUIEvents(
-      const base::Closure& closure) override {
+  void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
     if (closure.is_null())
       return;
     static XEvent* marker_event = NULL;